Fix: A disabled wireless network may be shown as enabled, when multiple networks...
[project/luci.git] / modules / luci-mod-admin-full / luasrc / view / admin_status / index.htm
index 6fca1c6..07a96b2 100644 (file)
@@ -1,20 +1,14 @@
 <%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008-2011 Jo-Philipp Wich <xm@subsignal.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
+ Copyright 2008 Steven Barth <steven@midlink.org>
+ Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
+ Licensed to the public under the Apache License 2.0.
 -%>
 
 <%
        local fs = require "nixio.fs"
        local util = require "luci.util"
        local stat = require "luci.tools.status"
+       local ver = require "luci.version"
 
        local has_ipv6 = fs.access("/proc/net/ipv6_route")
        local has_dhcp = fs.access("/etc/config/dhcp")
@@ -22,6 +16,7 @@ You may obtain a copy of the License at
 
        local sysinfo = luci.util.ubus("system", "info") or { }
        local boardinfo = luci.util.ubus("system", "board") or { }
+       local unameinfo = nixio.uname() or { }
 
        local meminfo = sysinfo.memory or {
                total = 0,
@@ -357,7 +352,7 @@ You may obtain a copy of the License at
                                        for (var nidx = 0; nidx < dev.networks.length; nidx++)
                                        {
                                                var net = dev.networks[nidx];
-                                               var is_assoc = (net.bssid != '00:00:00:00:00:00' && net.channel);
+                                               var is_assoc = (net.bssid != '00:00:00:00:00:00' && net.channel && !net.disabled);
 
                                                var icon;
                                                if (!is_assoc)
@@ -564,10 +559,10 @@ You may obtain a copy of the License at
                <tr><td width="33%"><%:Hostname%></td><td><%=luci.sys.hostname() or "?"%></td></tr>
                <tr><td width="33%"><%:Model%></td><td><%=pcdata(boardinfo.model or boardinfo.system 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(ver.distname)%> <%=pcdata(ver.distversion)%> /
+                       <%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>)
                </td></tr>
-               <tr><td width="33%"><%:Kernel Version%></td><td><%=luci.sys.exec("uname -r")%></td></tr>
+               <tr><td width="33%"><%:Kernel Version%></td><td><%=unameinfo.release or "?"%></td></tr>
                <tr><td width="33%"><%:Local Time%></td><td id="localtime">-</td></tr>
                <tr><td width="33%"><%:Uptime%></td><td id="uptime">-</td></tr>
                <tr><td width="33%"><%:Load Average%></td><td id="loadavg">-</td></tr>