diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2018-01-11 16:46:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-11 16:46:24 +0200 |
commit | 74eaa6bedfa80b7382259bd6c93302d55d2d8073 (patch) | |
tree | 45acc01c0d90e1a32ad4be64694e5ad1916c5bdf | |
parent | 43867a89689e8928f63b59066be827248a6ce0f7 (diff) | |
parent | e40282cb382987b3d3e223c8f158924044283f71 (diff) |
Merge pull request #1526 from TDT-AG/pr/20180111-luci-app-mwan3-refactoring
luci-app-mwan3: refactoring
22 files changed, 75 insertions, 238 deletions
diff --git a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua index c24beda28..f429cc60f 100644 --- a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua +++ b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua @@ -10,59 +10,50 @@ function index() return end - entry({"admin", "network", "mwan"}, - alias("admin", "network", "mwan", "overview"), + entry({"admin", "status", "mwan"}, + alias("admin", "status", "mwan", "overview"), _("Load Balancing"), 600) - entry({"admin", "network", "mwan", "overview"}, - alias("admin", "network", "mwan", "overview", "overview_interface"), - _("Overview"), 10) - entry({"admin", "network", "mwan", "overview", "overview_interface"}, - template("mwan/overview_interface")) - entry({"admin", "network", "mwan", "overview", "interface_status"}, + entry({"admin", "status", "mwan", "overview"}, + template("mwan/status_interface")) + entry({"admin", "status", "mwan", "detail"}, + template("mwan/status_detail")) + entry({"admin", "status", "mwan", "diagnostics"}, + template("mwan/status_diagnostics")) + entry({"admin", "status", "mwan", "troubleshooting"}, + template("mwan/status_troubleshooting")) + entry({"admin", "status", "mwan", "interface_status"}, call("interfaceStatus")) - entry({"admin", "network", "mwan", "overview", "overview_detailed"}, - template("mwan/overview_detailed")) - entry({"admin", "network", "mwan", "overview", "detailed_status"}, + entry({"admin", "status", "mwan", "detailed_status"}, call("detailedStatus")) + entry({"admin", "status", "mwan", "diagnostics_display"}, + call("diagnosticsData"), nil).leaf = true + entry({"admin", "status", "mwan", "troubleshooting_display"}, + call("troubleshootingData")) + + + entry({"admin", "network", "mwan"}, + alias("admin", "network", "mwan", "interface"), + _("Load Balancing"), 600) - entry({"admin", "network", "mwan", "configuration"}, - alias("admin", "network", "mwan", "configuration", "interface"), - _("Configuration"), 20) - entry({"admin", "network", "mwan", "configuration", "globals"}, - cbi("mwan/globalsconfig"),_("Globals"), 5).leaf = true - entry({"admin", "network", "mwan", "configuration", "interface"}, + entry({"admin", "network", "mwan", "globals"}, + cbi("mwan/globalsconfig"), + _("Globals"), 5).leaf = true + entry({"admin", "network", "mwan", "interface"}, arcombine(cbi("mwan/interface"), cbi("mwan/interfaceconfig")), _("Interfaces"), 10).leaf = true - entry({"admin", "network", "mwan", "configuration", "member"}, + entry({"admin", "network", "mwan", "member"}, arcombine(cbi("mwan/member"), cbi("mwan/memberconfig")), _("Members"), 20).leaf = true - entry({"admin", "network", "mwan", "configuration", "policy"}, + entry({"admin", "network", "mwan", "policy"}, arcombine(cbi("mwan/policy"), cbi("mwan/policyconfig")), _("Policies"), 30).leaf = true - entry({"admin", "network", "mwan", "configuration", "rule"}, + entry({"admin", "network", "mwan", "rule"}, arcombine(cbi("mwan/rule"), cbi("mwan/ruleconfig")), _("Rules"), 40).leaf = true - - entry({"admin", "network", "mwan", "advanced"}, - alias("admin", "network", "mwan", "advanced", "hotplugscript"), - _("Advanced"), 100) - entry({"admin", "network", "mwan", "advanced", "hotplugscript"}, - form("mwan/advanced_hotplugscript")) - entry({"admin", "network", "mwan", "advanced", "mwanconfig"}, - form("mwan/advanced_mwanconfig")) - entry({"admin", "network", "mwan", "advanced", "networkconfig"}, - form("mwan/advanced_networkconfig")) - entry({"admin", "network", "mwan", "advanced", "wirelessconfig"}, - form("mwan/advanced_wirelessconfig")) - entry({"admin", "network", "mwan", "advanced", "diagnostics"}, - template("mwan/advanced_diagnostics")) - entry({"admin", "network", "mwan", "advanced", "diagnostics_display"}, - call("diagnosticsData"), nil).leaf = true - entry({"admin", "network", "mwan", "advanced", "troubleshooting"}, - template("mwan/advanced_troubleshooting")) - entry({"admin", "network", "mwan", "advanced", "troubleshooting_display"}, - call("troubleshootingData")) + entry({"admin", "network", "mwan", "notify"}, + cbi("mwan/notify"), + _("Notification"), 50).leaf = true end function getInterfaceStatus(ruleNumber, interfaceName) diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_mwanconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_mwanconfig.lua deleted file mode 100644 index e0a99e836..000000000 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_mwanconfig.lua +++ /dev/null @@ -1,32 +0,0 @@ --- ------ mwan configuration ------ -- - -ut = require "luci.util" - -mwanConfig = "/etc/config/mwan3" - - -m5 = SimpleForm("luci", nil) - m5:append(Template("mwan/advanced_mwanconfig")) -- highlight current tab - - -f = m5:section(SimpleSection, nil, - translate("This section allows you to modify the contents of /etc/config/mwan3")) - -t = f:option(TextValue, "lines") - t.rmempty = true - t.rows = 20 - - function t.cfgvalue() - return nixio.fs.readfile(mwanConfig) or "" - end - - function t.write(self, section, data) -- format and write new data to script - return nixio.fs.writefile(mwanConfig, "\n" .. ut.trim(data:gsub("\r\n", "\n")) .. "\n") - end - - function f.handle(self, state, data) - return true - end - - -return m5 diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_networkconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_networkconfig.lua deleted file mode 100644 index b93d89751..000000000 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_networkconfig.lua +++ /dev/null @@ -1,32 +0,0 @@ --- ------ network configuration ------ -- - -ut = require "luci.util" - -networkConfig = "/etc/config/network" - - -m5 = SimpleForm("networkconf", nil) - m5:append(Template("mwan/advanced_networkconfig")) -- highlight current tab - - -f = m5:section(SimpleSection, nil, - translate("This section allows you to modify the contents of /etc/config/network")) - -t = f:option(TextValue, "lines") - t.rmempty = true - t.rows = 20 - - function t.cfgvalue() - return nixio.fs.readfile(networkConfig) or "" - end - - function t.write(self, section, data) -- format and write new data to script - return nixio.fs.writefile(networkConfig, "\n" .. ut.trim(data:gsub("\r\n", "\n")) .. "\n") - end - - function f.handle(self, state, data) - return true - end - - -return m5 diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_wirelessconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_wirelessconfig.lua deleted file mode 100644 index 95e9f7c7e..000000000 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_wirelessconfig.lua +++ /dev/null @@ -1,32 +0,0 @@ --- ------ wireless configuration ------ -- - -ut = require "luci.util" - -wirelessConfig = "/etc/config/wireless" - - -m5 = SimpleForm("wirelessconf", nil) - m5:append(Template("mwan/advanced_wirelessconfig")) -- highlight current tab - - -f = m5:section(SimpleSection, nil, - translate("This section allows you to modify the contents of /etc/config/wireless")) - -t = f:option(TextValue, "lines") - t.rmempty = true - t.rows = 20 - - function t.cfgvalue() - return nixio.fs.readfile(wirelessConfig) or "" - end - - function t.write(self, section, data) -- format and write new data to script - return nixio.fs.writefile(wirelessConfig, "\n" .. ut.trim(data:gsub("\r\n", "\n")) .. "\n") - end - - function f.handle(self, state, data) - return true - end - - -return m5 diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua index 5ee5fb39f..77198d5c3 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua @@ -114,11 +114,11 @@ mwan_interface = m5:section(TypedSection, "interface", translate("Interfaces"), mwan_interface.sectionhead = translate("Interface") mwan_interface.sortable = false mwan_interface.template = "cbi/tblsection" - mwan_interface.extedit = dsp.build_url("admin", "network", "mwan", "configuration", "interface", "%s") + mwan_interface.extedit = dsp.build_url("admin", "network", "mwan", "interface", "%s") function mwan_interface.create(self, section) TypedSection.create(self, section) m5.uci:save("mwan3") - luci.http.redirect(dsp.build_url("admin", "network", "mwan", "configuration", "interface", section)) + luci.http.redirect(dsp.build_url("admin", "network", "mwan", "interface", section)) end diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua index a7d7c5af7..86e959771 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua @@ -89,7 +89,7 @@ interfaceCheck() m5 = Map("mwan3", translatef("MWAN Interface Configuration - %s", arg[1]), interfaceWarnings()) - m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "interface") + m5.redirect = dsp.build_url("admin", "network", "mwan", "interface") mwan_interface = m5:section(NamedSection, arg[1], "interface", "") diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/member.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/member.lua index efbe8f790..b73ee5765 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/member.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/member.lua @@ -16,11 +16,11 @@ mwan_member = m5:section(TypedSection, "member", translate("Members"), mwan_member.sectionhead = translate("Member") mwan_member.sortable = true mwan_member.template = "cbi/tblsection" - mwan_member.extedit = ds.build_url("admin", "network", "mwan", "configuration", "member", "%s") + mwan_member.extedit = ds.build_url("admin", "network", "mwan", "member", "%s") function mwan_member.create(self, section) TypedSection.create(self, section) m5.uci:save("mwan3") - luci.http.redirect(ds.build_url("admin", "network", "mwan", "configuration", "member", section)) + luci.http.redirect(ds.build_url("admin", "network", "mwan", "member", section)) end diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/memberconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/memberconfig.lua index dc2e0da44..220c4bddd 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/memberconfig.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/memberconfig.lua @@ -15,7 +15,7 @@ arg[1] = arg[1] or "" m5 = Map("mwan3", translatef("MWAN Member Configuration - %s", arg[1])) - m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "member") + m5.redirect = dsp.build_url("admin", "network", "mwan", "member") mwan_member = m5:section(NamedSection, arg[1], "member", "") diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_hotplugscript.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/notify.lua index 1b9708021..20e86fc02 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_hotplugscript.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/notify.lua @@ -1,14 +1,12 @@ -- ------ hotplug script configuration ------ -- -fs = require "nixio.fs" -ut = require "luci.util" - +local fs = require "nixio.fs" +local ut = require "luci.util" script = "/etc/mwan3.user" m5 = SimpleForm("luci", nil) - m5:append(Template("mwan/advanced_hotplugscript")) -- highlight current tab -f = m5:section(SimpleSection, nil, +f = m5:section(SimpleSection, translate("MWAN Notification"), translate("This section allows you to modify the content of \"/etc/mwan3.user\".<br />" .. "The file is also preserved during sysupgrade.<br />" .. "<br />" .. @@ -28,13 +26,13 @@ f = m5:section(SimpleSection, nil, "<br />")) t = f:option(TextValue, "lines") - t.rmempty = true - t.rows = 20 - function t.cfgvalue() - return fs.readfile(script) - end - function t.write(self, section, data) -- format and write new data to script - return fs.writefile(script, ut.trim(data:gsub("\r\n", "\n")) .. "\n") - end +t.rmempty = true +t.rows = 20 +function t.cfgvalue() + return fs.readfile(script) +end +function t.write(self, section, data) + return fs.writefile(script, ut.trim(data:gsub("\r\n", "\n")) .. "\n") +end return m5 diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua index 6640564d5..495b45e64 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua @@ -45,11 +45,11 @@ mwan_policy = m5:section(TypedSection, "policy", translate("Policies"), mwan_policy.sectionhead = translate("Policy") mwan_policy.sortable = true mwan_policy.template = "cbi/tblsection" - mwan_policy.extedit = ds.build_url("admin", "network", "mwan", "configuration", "policy", "%s") + mwan_policy.extedit = ds.build_url("admin", "network", "mwan", "policy", "%s") function mwan_policy.create(self, section) TypedSection.create(self, section) m5.uci:save("mwan3") - luci.http.redirect(ds.build_url("admin", "network", "mwan", "configuration", "policy", section)) + luci.http.redirect(ds.build_url("admin", "network", "mwan", "policy", section)) end diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policyconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policyconfig.lua index feb62dc8a..cdf6521a7 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policyconfig.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policyconfig.lua @@ -34,7 +34,7 @@ policyCheck() m5 = Map("mwan3", translatef("MWAN Policy Configuration - %s", arg[1]), policyWarn()) - m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "policy") + m5.redirect = dsp.build_url("admin", "network", "mwan", "policy") mwan_policy = m5:section(NamedSection, arg[1], "policy", "") diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua index 9cb4756fc..586f174b2 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua @@ -50,11 +50,11 @@ mwan_rule = m5:section(TypedSection, "rule", translate("Traffic Rules"), mwan_rule.sectionhead = translate("Rule") mwan_rule.sortable = true mwan_rule.template = "cbi/tblsection" - mwan_rule.extedit = dsp.build_url("admin", "network", "mwan", "configuration", "rule", "%s") + mwan_rule.extedit = dsp.build_url("admin", "network", "mwan", "rule", "%s") function mwan_rule.create(self, section) TypedSection.create(self, section) m5.uci:save("mwan3") - luci.http.redirect(dsp.build_url("admin", "network", "mwan", "configuration", "rule", section)) + luci.http.redirect(dsp.build_url("admin", "network", "mwan", "rule", section)) end diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua index cb1b45d26..87c4691af 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua @@ -47,7 +47,7 @@ ruleCheck() m5 = Map("mwan3", translatef("MWAN Rule Configuration - %s", arg[1]), ruleWarn()) - m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "rule") + m5.redirect = dsp.build_url("admin", "network", "mwan", "rule") mwan_rule = m5:section(NamedSection, arg[1], "rule", "") diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_hotplugscript.htm b/applications/luci-app-mwan3/luasrc/view/mwan/advanced_hotplugscript.htm deleted file mode 100644 index 10b4f1055..000000000 --- a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_hotplugscript.htm +++ /dev/null @@ -1,14 +0,0 @@ -<ul class="cbi-tabmenu"> - <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/hotplugscript")%>"><%:Hotplug Script%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/mwanconfig")%>"><%:MWAN Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/networkconfig")%>"><%:Network Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/wirelessconfig")%>"><%:Wireless Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/diagnostics")%>"><%:Diagnostics%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/troubleshooting")%>"><%:Troubleshooting%></a></li> -</ul> - -<style type="text/css"> - .cbi-section { - padding: 20px; - } -</style> diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_mwanconfig.htm b/applications/luci-app-mwan3/luasrc/view/mwan/advanced_mwanconfig.htm deleted file mode 100644 index 20ae6036f..000000000 --- a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_mwanconfig.htm +++ /dev/null @@ -1,14 +0,0 @@ -<ul class="cbi-tabmenu"> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/hotplugscript")%>"><%:Hotplug Script%></a></li> - <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/mwanconfig")%>"><%:MWAN Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/networkconfig")%>"><%:Network Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/wirelessconfig")%>"><%:Wireless Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/diagnostics")%>"><%:Diagnostics%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/troubleshooting")%>"><%:Troubleshooting%></a></li> -</ul> - -<style type="text/css"> - .cbi-section { - padding: 20px; - } -</style> diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_networkconfig.htm b/applications/luci-app-mwan3/luasrc/view/mwan/advanced_networkconfig.htm deleted file mode 100644 index bed43107c..000000000 --- a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_networkconfig.htm +++ /dev/null @@ -1,14 +0,0 @@ -<ul class="cbi-tabmenu"> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/hotplugscript")%>"><%:Hotplug Script%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/mwanconfig")%>"><%:MWAN Config%></a></li> - <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/networkconfig")%>"><%:Network Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/wirelessconfig")%>"><%:Wireless Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/diagnostics")%>"><%:Diagnostics%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/troubleshooting")%>"><%:Troubleshooting%></a></li> -</ul> - -<style type="text/css"> - .cbi-section { - padding: 20px; - } -</style> diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_wirelessconfig.htm b/applications/luci-app-mwan3/luasrc/view/mwan/advanced_wirelessconfig.htm deleted file mode 100644 index bb18d5349..000000000 --- a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_wirelessconfig.htm +++ /dev/null @@ -1,14 +0,0 @@ -<ul class="cbi-tabmenu"> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/hotplugscript")%>"><%:Hotplug Script%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/mwanconfig")%>"><%:MWAN Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/networkconfig")%>"><%:Network Config%></a></li> - <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/wirelessconfig")%>"><%:Wireless Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/diagnostics")%>"><%:Diagnostics%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/troubleshooting")%>"><%:Troubleshooting%></a></li> -</ul> - -<style type="text/css"> - .cbi-section { - padding: 20px; - } -</style> diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/openwrt_overview_status.htm b/applications/luci-app-mwan3/luasrc/view/mwan/openwrt_overview_status.htm index 7cef0630e..335c95c8f 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/openwrt_overview_status.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/openwrt_overview_status.htm @@ -1,5 +1,5 @@ <script type="text/javascript">//<![CDATA[ - XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "network", "mwan", "overview", "interface_status")%>', null, + XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_status")%>', null, function(x, mArray) { var status = document.getElementById('mwan_status_text'); diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/overview_detailed.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm index 6a800c3f9..0ff2824ed 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/overview_detailed.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm @@ -1,13 +1,15 @@ <%+header%> <ul class="cbi-tabmenu"> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/overview")%>"><%:Interface Status%></a></li> - <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/overview/overview_detailed")%>"><%:Detailed Status%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface Status%></a></li> + <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detailed Status%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/diagnostics")%>"><%:Diagnostics%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li> </ul> <script type="text/javascript" src="<%=resource%>/cbi.js"></script> <script type="text/javascript">//<![CDATA[ - XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "network", "mwan", "overview", "detailed_status")%>', null, + XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "detailed_status")%>', null, function(x, mArray) { var status = document.getElementById('mwan_detail_text'); diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_diagnostics.htm index 448348594..19433f4d9 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_diagnostics.htm @@ -1,12 +1,10 @@ <%+header%> <ul class="cbi-tabmenu"> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/hotplugscript")%>"><%:Hotplug Script%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/mwanconfig")%>"><%:MWAN Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/networkconfig")%>"><%:Network Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/wirelessconfig")%>"><%:Wireless Config%></a></li> - <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/diagnostics")%>"><%:Diagnostics%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/troubleshooting")%>"><%:Troubleshooting%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface Status%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detailed Status%></a></li> + <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/diagnostics")%>"><%:Diagnostics%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li> </ul> <% @@ -47,7 +45,7 @@ output.parentNode.style.display = 'block'; output.style.display = 'inline'; - stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "mwan", "advanced")%>/diagnostics_display' + '/' + iface + '/' + tool + '/' + task, null, + stxhr.get('<%=luci.dispatcher.build_url("admin", "status", "mwan")%>/diagnostics_display' + '/' + iface + '/' + tool + '/' + task, null, function(x, mArray) { if (mArray.diagnostics) diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/overview_interface.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm index 2929a6df6..c7039f7a6 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/overview_interface.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm @@ -1,13 +1,15 @@ <%+header%> <ul class="cbi-tabmenu"> - <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/overview")%>"><%:Interface Status%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/overview/overview_detailed")%>"><%:Detailed Status%></a></li> + <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface Status%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detailed Status%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/diagnostics")%>"><%:Diagnostics%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li> </ul> <script type="text/javascript" src="<%=resource%>/cbi.js"></script> <script type="text/javascript">//<![CDATA[ - XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "network", "mwan", "overview", "interface_status")%>', null, + XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_status")%>', null, function(x, mArray) { var statusDiv = document.getElementById('mwan_status_text'); diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_troubleshooting.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_troubleshooting.htm index 4174ef4b2..483e28949 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_troubleshooting.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_troubleshooting.htm @@ -1,17 +1,15 @@ <%+header%> <ul class="cbi-tabmenu"> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/hotplugscript")%>"><%:Hotplug Script%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/mwanconfig")%>"><%:MWAN Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/networkconfig")%>"><%:Network Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/wirelessconfig")%>"><%:Wireless Config%></a></li> - <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/diagnostics")%>"><%:Diagnostics%></a></li> - <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/troubleshooting")%>"><%:Troubleshooting%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface Status%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detailed Status%></a></li> + <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/diagnostics")%>"><%:Diagnostics%></a></li> + <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li> </ul> <script type="text/javascript" src="<%=resource%>/cbi.js"></script> <script type="text/javascript">//<![CDATA[ - XHR.poll(15, '<%=luci.dispatcher.build_url("admin", "network", "mwan", "advanced", "troubleshooting_display")%>', null, + XHR.poll(15, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "troubleshooting_display")%>', null, function(x, mArray) { var tshoot = document.getElementById('troubleshoot_text'); |