3 description: L.tr('Routes specify over which interface and gateway a certain host or network can be reached.'),
7 var ifaces = L.network.getInterfaces();
9 var m = new L.cbi.Map('network', {
10 readonly: !self.options.acls.network
13 var s4 = m.section(L.cbi.TableSection, 'route', {
14 caption: L.tr('Static IPv4 Routes'),
18 add_caption: L.tr('Add new route'),
19 remove_caption: L.tr('Remove route')
22 var ifc = s4.option(L.cbi.ListValue, 'interface', {
23 caption: L.tr('Interface')
26 for (var i = 0; i < ifaces.length; i++)
27 ifc.value(ifaces[i].name());
29 s4.option(L.cbi.InputValue, 'target', {
30 caption: L.tr('Target'),
34 s4.option(L.cbi.InputValue, 'netmask', {
35 caption: L.tr('IPv4-Netmask'),
37 placeholder: '255.255.255.255',
41 s4.option(L.cbi.InputValue, 'gateway', {
42 caption: L.tr('IPv4-Gateway'),
47 s4.option(L.cbi.InputValue, 'metric', {
48 caption: L.tr('Metric'),
49 datatype: 'range(0,255)',
54 s4.option(L.cbi.InputValue, 'mtu', {
56 datatype: 'range(64,9000)',
62 var s6 = m.section(L.cbi.TableSection, 'route6', {
63 caption: L.tr('Static IPv6 Routes'),
67 add_caption: L.tr('Add new route'),
68 remove_caption: L.tr('Remove route')
71 var ifc = s6.option(L.cbi.ListValue, 'interface', {
72 caption: L.tr('Interface')
75 for (var i = 0; i < ifaces.length; i++)
76 ifc.value(ifaces[i].name());
78 s6.option(L.cbi.InputValue, 'target', {
79 caption: L.tr('Target'),
83 s6.option(L.cbi.InputValue, 'gateway', {
84 caption: L.tr('IPv6-Gateway'),
89 s6.option(L.cbi.InputValue, 'metric', {
90 caption: L.tr('Metric'),
91 datatype: 'range(0,255)',
96 s6.option(L.cbi.InputValue, 'mtu', {
98 datatype: 'range(64,9000)',
103 m.insertInto('#map');