3 description: L.tr('Routes specify over which interface and gateway a certain host or network can be reached.'),
7 return L.network.listNetworkNames().then(function(list) {
8 var m = new L.cbi.Map('network', {
9 readonly: !self.options.acls.network
12 var s4 = m.section(L.cbi.TableSection, 'route', {
13 caption: L.tr('Static IPv4 Routes'),
16 add_caption: L.tr('Add new route'),
17 remove_caption: L.tr('Remove route')
20 var ifc = s4.option(L.cbi.ListValue, 'interface', {
21 caption: L.tr('Interface')
24 for (var i = 0; i < list.length; i++)
27 s4.option(L.cbi.InputValue, 'target', {
28 caption: L.tr('Target'),
32 s4.option(L.cbi.InputValue, 'netmask', {
33 caption: L.tr('IPv4-Netmask'),
35 placeholder: '255.255.255.255',
39 s4.option(L.cbi.InputValue, 'gateway', {
40 caption: L.tr('IPv4-Gateway'),
45 s4.option(L.cbi.InputValue, 'metric', {
46 caption: L.tr('Metric'),
47 datatype: 'range(0,255)',
52 s4.option(L.cbi.InputValue, 'mtu', {
54 datatype: 'range(64,9000)',
60 var s6 = m.section(L.cbi.TableSection, 'route6', {
61 caption: L.tr('Static IPv6 Routes'),
64 add_caption: L.tr('Add new route'),
65 remove_caption: L.tr('Remove route')
68 var ifc = s6.option(L.cbi.ListValue, 'interface', {
69 caption: L.tr('Interface')
72 for (var i = 0; i < list.length; i++)
75 s6.option(L.cbi.InputValue, 'target', {
76 caption: L.tr('Target'),
80 s6.option(L.cbi.InputValue, 'gateway', {
81 caption: L.tr('IPv6-Gateway'),
86 s6.option(L.cbi.InputValue, 'metric', {
87 caption: L.tr('Metric'),
88 datatype: 'range(0,255)',
93 s6.option(L.cbi.InputValue, 'mtu', {
95 datatype: 'range(64,9000)',
100 m.insertInto('#map');