3 description
: L
.tr('The following rules are currently active on this system.'),
5 getRoutes
: L
.rpc
.declare({
6 object
: 'luci2.network',
8 expect
: { routes
: [ ] }
11 getIPv6Routes
: L
.rpc
.declare({
12 object
: 'luci2.network',
14 expect
: { routes
: [ ] }
17 getARPTable
: L
.rpc
.declare({
18 object
: 'luci2.network',
20 expect
: { entries
: [ ] }
26 self
.getARPTable().then(function(arp
) {
27 var arpTable
= new L
.ui
.table({
30 caption
: L
.tr('IPv4-Address'),
33 caption
: L
.tr('MAC-Address'),
36 caption
: L
.tr('Interface'),
42 arpTable
.insertInto('#arp_table');
44 self
.getRoutes().then(function(routes
) {
45 var routeTable
= new L
.ui
.table({
46 caption
: L
.tr('Active IPv4-Routes'),
48 caption
: L
.tr('Target'),
51 caption
: L
.tr('Gateway'),
54 caption
: L
.tr('Metric'),
57 caption
: L
.tr('Interface'),
62 routeTable
.rows(routes
);
63 routeTable
.insertInto('#route_table');
65 self
.getIPv6Routes().then(function(routes
) {
66 var route6Table
= new L
.ui
.table({
67 caption
: L
.tr('Active IPv6-Routes'),
69 caption
: L
.tr('Target'),
72 caption
: L
.tr('Gateway'),
75 caption
: L
.tr('Source'),
78 caption
: L
.tr('Metric'),
81 caption
: L
.tr('Interface'),
86 for (var i
= 0; i
< routes
.length
; i
++)
88 var prefix
= routes
[i
].target
.substr(0, 5).toLowerCase();
89 if (prefix
== 'fe80:' || prefix
== 'fe90:' || prefix
== 'fea0:' || prefix
== 'feb0:' || prefix
== 'ff00:')
92 route6Table
.row(routes
[i
]);
95 route6Table
.insertInto('#route6_table');