3 <script type=
"text/javascript">//<![CDATA[
4 XHR.poll(
5, '<%=luci.dispatcher.build_url(
"admin",
"network",
"wireless_status", self.ifname)%
>', null,
7 if (iw && (iw = iw[
0]))
9 var is_assoc = (iw.bssid && iw.bssid != '
00:
00:
00:
00:
00:
00' && iw.channel);
11 var q = is_assoc ? p : -
1;
15 icon =
"<%=resource%>/icons/signal-none.png";
17 icon =
"<%=resource%>/icons/signal-0.png";
19 icon =
"<%=resource%>/icons/signal-0-25.png";
21 icon =
"<%=resource%>/icons/signal-25-50.png";
23 icon =
"<%=resource%>/icons/signal-50-75.png";
25 icon =
"<%=resource%>/icons/signal-75-100.png";
27 var s = document.getElementById('<%=self.option%
>-iw-signal');
29 s.innerHTML = String.format(
30 '
<img src=
"%s" title=
"<%:Signal%>: %d <%:dBm%> / <%:Noise%>: %d <%:dBm%>" /><br />' +
31 '
<small>%d%%
</small>', icon, iw.signal, iw.noise, p
34 var d = document.getElementById('<%=self.option%
>-iw-description');
36 d.innerHTML = String.format(
37 '
<strong><%:Mode%
>:
</strong> %s | ' +
38 '
<strong><%:SSID%
>:
</strong> %h
<br />' +
39 '
<strong><%:BSSID%
>:
</strong> %s | ' +
40 '
<strong><%:Encryption%
>:
</strong> %s
<br />' +
41 '
<strong><%:Channel%
>:
</strong> %d (%
.3f <%:GHz%
>) | ' +
42 '
<strong><%:Tx-Power%
>:
</strong> %d <%:dBm%
><br />' +
43 '
<strong><%:Signal%
>:
</strong> %d <%:dBm%
> | ' +
44 '
<strong><%:Noise%
>:
</strong> %d <%:dBm%
><br />' +
45 '
<strong><%:Bitrate%
>:
</strong> %
.1f <%:Mbit/s%
> | ' +
46 '
<strong><%:Country%
>:
</strong> %s',
47 iw.mode, iw.ssid, iw.bssid,
48 iw.encryption ? iw.encryption : '<%:None%
>',
49 iw.channel, iw.frequency ? iw.frequency :
0,
50 iw.txpower, iw.signal, iw.noise,
51 iw.bitrate ? iw.bitrate :
0, iw.country
54 d.innerHTML = String.format(
55 '
<strong><%:SSID%
>:
</strong> %h | ' +
56 '
<strong><%:Mode%
>:
</strong> %s
<br />' +
57 '
<em><%:Wireless is disabled or not associated%
></em>',
58 iw.ssid || '?', iw.mode
66 <tr class=
"cbi-section-table">
68 <td class=
"cbi-value-field" style=
"width:16px; padding:3px" id=
"<%=self.option%>-iw-signal">
69 <img src=
"<%=resource%>/icons/signal-none.png" title=
"<%:Not associated%>" /><br />
72 <td class=
"cbi-value-field" style=
"vertical-align:middle; text-align:left; padding:3px" id=
"<%=self.option%>-iw-description">
73 <em><%:Collecting data...%
></em>