end)
if has_switch then
- page = node("admin", "network", "vlan")
- page.target = cbi("admin_network/vlan")
- page.title = _("Switch")
- page.order = 20
-
- page = entry({"admin", "network", "switch_status"}, call("switch_status"), nil)
- page.leaf = true
+ entry({"admin", "network", "switch"}, view("network/switch"), _("Switch"), 20)
end
end
end
-function switch_status(switches)
- local s = require "luci.tools.status"
-
- luci.http.prepare_content("application/json")
- luci.http.write_json(s.switch_status(switches))
-end
-
function diag_command(cmd, addr)
if addr and addr:match("^[a-zA-Z0-9%-%.:_]+$") then
luci.http.prepare_content("text/plain")