summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-11-03 18:12:28 +0100
committerJo-Philipp Wich <jo@mein.io>2019-11-03 18:12:28 +0100
commit8de9b69b1a32e120b838caa284372e03765a0fdc (patch)
tree0298fb3f0935b1d80c488d04d3a9af434bdacf57 /modules/luci-mod-status/htdocs/luci-static/resources
parent54163c95e1a92ecafe5a51caf248d9b1eb20c0fb (diff)
luci-mod-status: 60_wifi.js: fix channel and bitrate display
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-status/htdocs/luci-static/resources')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js
index 08a2f5de1..8242711b6 100644
--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js
+++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js
@@ -3,10 +3,9 @@
'require network';
function renderbox(radio) {
- var net0 = radio.networks[0],
- chan = net0 ? net0.getChannel() : null,
- freq = net0 ? net0.getFrequency() : null,
- rate = net0 ? net0.getBitRate() : null,
+ var chan = null,
+ freq = null,
+ rate = null,
badges = [];
for (var i = 0; i < radio.networks.length; i++) {
@@ -42,6 +41,10 @@ function renderbox(radio) {
badge.lastElementChild.style.textOverflow = 'ellipsis';
badges.push(badge);
+
+ chan = (chan != null) ? chan : net.getChannel();
+ freq = (freq != null) ? freq : net.getFrequency();
+ rate = (rate != null) ? rate : net.getBitRate();
}
return E('div', { class: 'ifacebox' }, [