var net = nets[i] = networks[i];
var dev = net.l3_device || net.l2_device;
if (dev)
- net.device = devs[dev] = { };
+ net.device = devs[dev] || (devs[dev] = { });
}
_luci2.rpc.batch();
for (var dev in devs)
- _luci2.network.listDeviceNamestatus(dev);
+ _luci2.network.getDeviceStatus(dev);
return _luci2.rpc.flush();
}).then(function(devices) {
if (!devs[brm[j]])
{
devs[brm[j]] = { };
- _luci2.network.listDeviceNamestatus(brm[j]);
+ _luci2.network.getDeviceStatus(brm[j]);
}
devs[devices[i]['device']].subdevices[j] = devs[brm[j]];
for (var i = 0; i < interfaces.length; i++)
{
+ if (!interfaces[i].route)
+ continue;
+
for (var j = 0; j < interfaces[i].route.length; j++)
{
var rt = interfaces[i].route[j];
}
}),
- listDeviceNamestatus: _luci2.rpc.declare({
+ getDeviceStatus: _luci2.rpc.declare({
object: 'network.device',
method: 'status',
params: [ 'name' ],