L.ui.view.extend({
title: L.tr('Routes'),
description: L.tr('The following rules are currently active on this system.'),
+
+ getRoutes: L.rpc.declare({
+ object: 'luci2.network',
+ method: 'routes',
+ expect: { routes: [ ] }
+ }),
+
+ getIPv6Routes: L.rpc.declare({
+ object: 'luci2.network',
+ method: 'routes',
+ expect: { routes: [ ] }
+ }),
+
+ getARPTable: L.rpc.declare({
+ object: 'luci2.network',
+ method: 'arp_table',
+ expect: { entries: [ ] }
+ }),
+
execute: function() {
+ var self = this;
return $.when(
- L.network.getARPTable(function(arp) {
+ self.getARPTable().then(function(arp) {
var arpTable = new L.ui.table({
caption: L.tr('ARP'),
columns: [{
arpTable.rows(arp);
arpTable.insertInto('#arp_table');
}),
- L.network.getRoutes(function(routes) {
+ self.getRoutes().then(function(routes) {
var routeTable = new L.ui.table({
caption: L.tr('Active IPv4-Routes'),
columns: [{
routeTable.rows(routes);
routeTable.insertInto('#route_table');
}),
- L.network.getIPv6Routes(function(routes) {
+ self.getIPv6Routes().then(function(routes) {
var route6Table = new L.ui.table({
caption: L.tr('Active IPv6-Routes'),
columns: [{