luci-mod-network: interfaces: show bridge port device icons again
authorJo-Philipp Wich <jo@mein.io>
Wed, 9 Jun 2021 08:22:38 +0000 (10:22 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 9 Jun 2021 08:22:38 +0000 (10:22 +0200)
Restore the display of bridge port device icons in the interface overviews.
This feature has been lost after migrating the network config from legacy
bridge declarations to device bridge declarations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 9b2c9bfd5df21d47a208b23d108b363b9308b235..98b51c8a8b42d4f6be98a50d2bd64d8232aba123 100644 (file)
@@ -128,7 +128,7 @@ function render_modal_status(node, ifc) {
 
 function render_ifacebox_status(node, ifc) {
        var dev = ifc.getL3Device() || ifc.getDevice(),
-           subdevs = ifc.getDevices(),
+           subdevs = dev ? dev.getPorts() : null,
            c = [ render_iface(dev, ifc.isAlias()) ];
 
        if (subdevs && subdevs.length) {