From: Paul Donald Date: Wed, 12 Nov 2025 15:59:39 +0000 (+0100) Subject: luci-mod-status: hide disabled interfaces and show SSIDs X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=cbd1b7a19aa560e9e5cdabc775b64356a280124b;p=openwrt-luci.git luci-mod-status: hide disabled interfaces and show SSIDs This reduces the amount of data polled for inactive entities. Signed-off-by: Paul Donald --- diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/bandwidth.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/bandwidth.js index 6ae358f2b0..5f3165a502 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/bandwidth.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/bandwidth.js @@ -243,21 +243,20 @@ return view.extend({ }); }, - render: function(data) { - var svg = data[0], - devs = data[1]; + render: function([svg, devs]) { var v = E('div', { 'class': 'cbi-map', 'id': 'map' }, E('div')); for (var i = 0; i < devs.length; i++) { var ifname = devs[i].getName(); + const ssid = devs[i].wif?.getSSID?.() || null; - if (!ifname) + if (!ifname || !devs[i].isUp() || devs[i].wif?.isDisabled()) continue; var csvg = svg.cloneNode(true); - v.firstElementChild.appendChild(E('div', { 'class': 'cbi-section', 'data-tab': ifname, 'data-tab-title': ifname }, [ + v.firstElementChild.appendChild(E('div', { 'class': 'cbi-section', 'data-tab': ifname, 'data-tab-title': ssid ? `${ifname} ${ssid}` : ifname }, [ csvg, E('div', { 'class': 'right' }, E('small', { 'id': 'scale' }, '-')), E('br'),