summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc/controller
diff options
context:
space:
mode:
authorDaniel Dickinson <cshoredaniel@users.noreply.github.com>2017-01-16 01:42:00 -0500
committerGitHub <noreply@github.com>2017-01-16 01:42:00 -0500
commit98d1a09b577a0365ae0a98980d49c6ef5ffe70eb (patch)
tree3fb3656ec541806388903ed1a9a6ea4b10604150 /modules/luci-mod-admin-full/luasrc/controller
parentd7328360632d7fbf5fd4006b4172a9fe9861d838 (diff)
parent3c7d76677806df13b7d3d1979ca5defa662003fe (diff)
Merge pull request #859 from feckert/realtime_wlan
luci-mod-admin-full: show realtime wlan graph only if iw command is installed
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/controller')
-rw-r--r--modules/luci-mod-admin-full/luasrc/controller/admin/status.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua
index 24db1e4ff5..ad575e0d26 100644
--- a/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua
+++ b/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua
@@ -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