- var d = document.getElementById('<%=self.option%>-iw-description');
- if (d && is_assoc)
- d.innerHTML = String.format(
- '<strong><%:Mode%>:</strong> %s | ' +
- '<strong><%:SSID%>:</strong> %h<br />' +
- '<strong><%:BSSID%>:</strong> %s | ' +
- '<strong><%:Encryption%>:</strong> %s<br />' +
- '<strong><%:Channel%>:</strong> %d (%.3f GHz) | ' +
- '<strong><%:Tx-Power%>:</strong> %d dBm<br />' +
- '<strong><%:Signal%>:</strong> %d dBm | ' +
- '<strong><%:Noise%>:</strong> %d dBm<br />' +
- '<strong><%:Bit Rate%>:</strong> %.1f MBit/s | ' +
- '<strong><%:Country%>:</strong> %s',
- iw.mode, iw.ssid, iw.bssid,
- iw.encryption ? iw.encryption : '<%:None%>',
- iw.channel, iw.frequency ? iw.frequency : 0,
- iw.txpower, iw.signal, iw.noise,
- iw.bitrate ? iw.bitrate : 0, iw.country
- );
- else if (d)
- d.innerHTML = String.format(
- '<strong><%:SSID%>:</strong> %h | ' +
- '<strong><%:Mode%>:</strong> %s<br />' +
- '<em><%:Wireless is disabled or not associated%></em>',
- iw.ssid || '?', iw.mode
- );
- }
+ var s = document.getElementById('<%=self.option%>-iw-signal');
+ if (s)
+ s.innerHTML = String.format(
+ '<img src="%s" title="<%:Signal%>: %d dBm / <%:Noise%>: %d dBm" /><br />' +
+ '<small>%d%%</small>', icon, iw.signal, iw.noise, p
+ );