var wifidevs = <%=luci.http.write_json(netdevs)%>;
var arptable = <%=luci.http.write_json(arpcache)%>;
- var update_status = function() {
+ (function() {
+ var func = arguments.callee;
+
iwxhr.get('<%=REQUEST_URI%>', { status: 1 },
function(x, info)
{
'<strong><%:Gateway%>: </strong>%s<br />',
ifc.proto,
(ifc.ipaddr) ? ifc.ipaddr : '0.0.0.0',
- (ifc.netmask != ifc.ipaddr) ? ifc.netmask : '255.255.255.255',
+ (ifc.netmask && ifc.netmask != ifc.ipaddr) ? ifc.netmask : '255.255.255.255',
(ifc.gwaddr) ? ifc.gwaddr : '0.0.0.0'
);
s += String.format(
'<table><tr><td style="text-align:center; width:32px; padding:3px">' +
- '<img src="%s" title="<%:Signal%>: %d dBm / Noise: <%:Noise%>: %d dBm" />' +
+ '<img src="%s" title="<%:Signal%>: %d dBm / <%:Noise%>: %d dBm" />' +
'<br /><small>%d%%</small>' +
'</td><td style="text-align:left; padding:3px"><small>' +
'<strong><%:SSID%>:</strong> <a href="%s">%h</a><br />' +
tr.insertCell(-1).innerHTML = String.format('%d dBm', assoclist[i].noise);
}
- if (ac.rows.length == 0)
+ if (ac.rows.length == 1)
{
var tr = ac.rows[0].parentNode.insertRow(-1);
tr.className = 'cbi-section-table-row';
if (e = document.getElementById('conns'))
e.innerHTML = progressbar(info.conncount, info.connmax);
- window.setTimeout(update_status, 5000);
+ window.setTimeout(func, 5000);
}
)
- };
-
- update_status();
+ })();
//]]></script>
<h2><a id="content" name="content"><%:Status%></a></h2>
<tr><td width="33%"><%:Router Model%></td><td><%=pcdata(model or "?")%></td></tr>
<tr><td width="33%"><%:Firmware Version%></td><td>
<%=pcdata(luci.version.distname)%> <%=pcdata(luci.version.distversion)%> /
- <%=pcdata(luci.version.luciname)%> <%=pcdata(luci.version.luciversion)%>
+ <%=pcdata(luci.version.luciname)%> (<%=pcdata(luci.version.luciversion)%>)
</td></tr>
<tr><td width="33%"><%:Kernel Version%></td><td><%=luci.sys.exec("uname -r")%></td></tr>
<tr><td width="33%"><%:Local Time%></td><td id="localtime">-</td></tr>
</tr></table>
</td></tr>
<% end %>
- <tr><td width="33%"><%:Active IP Connections%></td><td id="conns">-</td></tr>
+ <tr><td width="33%"><%:Active Connections%></td><td id="conns">-</td></tr>
</table>
</fieldset>
<table class="cbi-section-table" id="wifi_assoc_table">
<tr class="cbi-section-table-titles">
- <th class="cbi-section-table-cell"> </th>
+ <th class="cbi-section-table-cell"> </th>
<th class="cbi-section-table-cell"><%:BSSID%></th>
<th class="cbi-section-table-cell"><%:Network%></th>
<th class="cbi-section-table-cell"><%:Signal%></th>
</fieldset>
<% end %>
+<%-
+ require "luci.util"
+ require "nixio.fs"
+
+ local plugins = nixio.fs.dir(luci.util.libpath() .. "/view/admin_status/index")
+ if plugins then
+ local inc
+ for inc in plugins do
+ if inc:match("%.htm$") then
+ include("admin_status/index/" .. inc:gsub("%.htm$", ""))
+ end
+ end
+ end
+-%>
+
<%+footer%>