diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-10-31 16:43:48 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-11-01 12:03:33 +0100 |
commit | 650d7f64d5b1b76d58b6c719e9efe15270468cc8 (patch) | |
tree | 9a2fb7b5148227e0c9d62ba20616852c91900799 /modules/luci-base/luasrc/controller | |
parent | c85af3d7618b55c499ce4bf58e3896068bd413ae (diff) |
luci-base: remove unused Lua code
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/controller')
-rw-r--r-- | modules/luci-base/luasrc/controller/admin/index.lua | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/modules/luci-base/luasrc/controller/admin/index.lua b/modules/luci-base/luasrc/controller/admin/index.lua index 928faa14b4..0cebfa4f57 100644 --- a/modules/luci-base/luasrc/controller/admin/index.lua +++ b/modules/luci-base/luasrc/controller/admin/index.lua @@ -71,27 +71,6 @@ function index() page.index = true toplevel_page(page, false, false) - if nixio.fs.access("/etc/config/dhcp") then - page = entry({"admin", "dhcplease_status"}, call("lease_status"), nil) - page.leaf = true - end - - local has_wifi = false - - uci:foreach("wireless", "wifi-device", - function(s) - has_wifi = true - return false - end) - - if has_wifi then - page = entry({"admin", "wireless_assoclist"}, call("wifi_assoclist"), nil) - page.leaf = true - - page = entry({"admin", "wireless_deauth"}, post("wifi_deauth"), nil) - page.leaf = true - end - page = entry({"admin", "translations"}, call("action_translations"), nil) page.leaf = true @@ -282,36 +261,3 @@ function action_ubus() luci.http.prepare_content("application/json") luci.http.write_json(response) end - -function lease_status() - local s = require "luci.tools.status" - - luci.http.prepare_content("application/json") - luci.http.write('[') - luci.http.write_json(s.dhcp_leases()) - luci.http.write(',') - luci.http.write_json(s.dhcp6_leases()) - luci.http.write(']') -end - -function wifi_assoclist() - local s = require "luci.tools.status" - - luci.http.prepare_content("application/json") - luci.http.write_json(s.wifi_assoclist()) -end - -function wifi_deauth() - local iface = luci.http.formvalue("iface") - local bssid = luci.http.formvalue("bssid") - - if iface and bssid then - luci.util.ubus("hostapd.%s" % iface, "del_client", { - addr = bssid, - deauth = true, - reason = 5, - ban_time = 60000 - }) - end - luci.http.status(200, "OK") -end |