summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources/network.js
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-07-27 15:44:03 +0200
committerJo-Philipp Wich <jo@mein.io>2020-08-05 13:53:12 +0200
commit354ca57ec86f1ee64a24d8d079dd8e6d9e36abf4 (patch)
tree17df78f6e31b692dba80a98465f4e1f6b002cab7 /modules/luci-base/htdocs/luci-static/resources/network.js
parentb8d381b677fa4de8ac01805b08dfe38ddd59d5e3 (diff)
luci-base: network.js: recognize uci declared network devices
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/network.js')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/network.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js
index 8d825d73a0..856421cd31 100644
--- a/modules/luci-base/htdocs/luci-static/resources/network.js
+++ b/modules/luci-base/htdocs/luci-static/resources/network.js
@@ -1224,6 +1224,22 @@ Network = baseclass.extend(/** @lends LuCI.network.prototype */ {
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 = [];
for (var netdev in devices)