luci-mod-admin-full: status: survive broken DSL status output
[project/luci.git] / modules / luci-mod-admin-full / luasrc / view / admin_status / index.htm
index 5f4539c..a98d790 100644 (file)
@@ -1,14 +1,7 @@
 <%#
 <%#
-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.
 -%>
 
 <%
 -%>
 
 <%
@@ -95,7 +88,9 @@ You may obtain a copy of the License at
                if has_dsl then
                        local dsl_stat = luci.sys.exec("/etc/init.d/dsl_control lucistat")
                        local dsl_func = loadstring(dsl_stat)
                if has_dsl then
                        local dsl_stat = luci.sys.exec("/etc/init.d/dsl_control lucistat")
                        local dsl_func = loadstring(dsl_stat)
-                       rv.dsl = dsl_func()
+                       if dsl_func then
+                               rv.dsl = dsl_func()
+                       end
                end
 
                luci.http.prepare_content("application/json")
                end
 
                luci.http.prepare_content("application/json")
@@ -359,7 +354,7 @@ You may obtain a copy of the License at
                                        for (var nidx = 0; nidx < dev.networks.length; nidx++)
                                        {
                                                var net = dev.networks[nidx];
                                        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)
 
                                                var icon;
                                                if (!is_assoc)