luci-mod-admin-full: status page formatting fix
authorJo-Philipp Wich <jo@mein.io>
Thu, 4 Aug 2016 09:42:40 +0000 (11:42 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 4 Aug 2016 09:45:30 +0000 (11:45 +0200)
Display a question mark for undefined SSID and BSSID strings.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm

index 8c3e01e603ba79a4d58025c39e43eefc8ae45231..eb4648806227782138451b7ce6f2496c538f2eb9 100644 (file)
                                                                '<strong><%:Bitrate%>:</strong> %s <%:Mbit/s%><br />',
                                                                icon, net.signal, net.noise,
                                                                net.quality,
-                                                               net.link, net.ssid,
+                                                               net.link, net.ssid || '?',
                                                                net.mode,
                                                                net.channel, net.frequency,
                                                                net.bitrate || '?'
                                                        s += String.format(
                                                                '<strong><%:BSSID%>:</strong> %s<br />' +
                                                                '<strong><%:Encryption%>:</strong> %s',
-                                                                       net.bssid,
+                                                                       net.bssid || '?',
                                                                        net.encryption
                                                        );
                                                }