luci-mod-admin-full: show realtime wlan graph only if iw command is installed 859/head
authorFlorian Eckert <Eckert.Florian@googlemail.com>
Mon, 28 Nov 2016 07:06:04 +0000 (08:06 +0100)
committerFlorian Eckert <Eckert.Florian@googlemail.com>
Mon, 12 Dec 2016 14:08:50 +0000 (15:08 +0100)
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
modules/luci-mod-admin-full/luasrc/controller/admin/status.lua

index 24db1e4ff5c65a8a45d44772f0d1a81834095441..ad575e0d2611e4c0c8baae77fe15e2bec4a62e07 100644 (file)
@@ -24,8 +24,10 @@ function index()
        entry({"admin", "status", "realtime", "bandwidth"}, template("admin_status/bandwidth"), _("Traffic"), 2).leaf = true
        entry({"admin", "status", "realtime", "bandwidth_status"}, call("action_bandwidth")).leaf = true
 
-       entry({"admin", "status", "realtime", "wireless"}, template("admin_status/wireless"), _("Wireless"), 3).leaf = true
-       entry({"admin", "status", "realtime", "wireless_status"}, call("action_wireless")).leaf = true
+       if nixio.fs.access("/etc/config/wireless") then
+               entry({"admin", "status", "realtime", "wireless"}, template("admin_status/wireless"), _("Wireless"), 3).leaf = true
+               entry({"admin", "status", "realtime", "wireless_status"}, call("action_wireless")).leaf = true
+       end
 
        entry({"admin", "status", "realtime", "connections"}, template("admin_status/connections"), _("Connections"), 4).leaf = true
        entry({"admin", "status", "realtime", "connections_status"}, call("action_connections")).leaf = true