luci-base: network.js: recognize uci declared network devices
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
b8d381b677
commit
354ca57ec8
1 changed files with 16 additions and 0 deletions
|
@ -1224,6 +1224,22 @@ Network = baseclass.extend(/** @lends LuCI.network.prototype */ {
|
||||||
devices[netid] = this.instantiateDevice(netid);
|
devices[netid] = this.instantiateDevice(netid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* find uci declared devices */
|
||||||
|
var uciDevices = uci.sections('network', 'device');
|
||||||
|
|
||||||
|
for (var i = 0; i < uciDevices.length; i++) {
|
||||||
|
var type = uciDevices[i].type,
|
||||||
|
name = uciDevices[i].name;
|
||||||
|
|
||||||
|
if (!type || !name || devices.hasOwnProperty(name))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (type == 'bridge')
|
||||||
|
_state.isBridge[name] = true;
|
||||||
|
|
||||||
|
devices[name] = this.instantiateDevice(name);
|
||||||
|
}
|
||||||
|
|
||||||
var rv = [];
|
var rv = [];
|
||||||
|
|
||||||
for (var netdev in devices)
|
for (var netdev in devices)
|
||||||
|
|
Loading…
Reference in a new issue