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
.GridSection
, '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'),
35 s4
.option(L
.cbi
.InputValue
, 'netmask', {
36 caption
: L
.tr('IPv4-Netmask'),
38 placeholder
: '255.255.255.255',
43 s4
.option(L
.cbi
.InputValue
, 'gateway', {
44 caption
: L
.tr('IPv4-Gateway'),
50 s4
.option(L
.cbi
.InputValue
, 'metric', {
51 caption
: L
.tr('Metric'),
52 datatype
: 'range(0,255)',
57 s4
.option(L
.cbi
.InputValue
, 'mtu', {
59 datatype
: 'range(64,9000)',
65 var s6
= m
.section(L
.cbi
.GridSection
, 'route6', {
66 caption
: L
.tr('Static IPv6 Routes'),
70 add_caption
: L
.tr('Add new route'),
71 remove_caption
: L
.tr('Remove route')
74 var ifc
= s6
.option(L
.cbi
.ListValue
, 'interface', {
75 caption
: L
.tr('Interface')
78 for (var i
= 0; i
< ifaces
.length
; i
++)
79 ifc
.value(ifaces
[i
].name());
81 s6
.option(L
.cbi
.InputValue
, 'target', {
82 caption
: L
.tr('Target'),
87 s6
.option(L
.cbi
.InputValue
, 'gateway', {
88 caption
: L
.tr('IPv6-Gateway'),
94 s6
.option(L
.cbi
.InputValue
, 'metric', {
95 caption
: L
.tr('Metric'),
96 datatype
: 'range(0,255)',
101 s6
.option(L
.cbi
.InputValue
, 'mtu', {
102 caption
: L
.tr('MTU'),
103 datatype
: 'range(64,9000)',
108 m
.insertInto('#map');