From 5c42bba054da46e09d0facbedf50a0d2a21734bd Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 11 Jan 2018 10:55:09 +0100 Subject: [PATCH] luci-app-mwan3: move diagnostic and troubleshooting page to status page move diagnostic and troubleshooting page to status page Signed-off-by: Florian Eckert --- .../luci-app-mwan3/luasrc/controller/mwan3.lua | 17 +++++++++-------- .../luasrc/view/mwan/advanced_diagnostics.htm | 11 +++++------ .../luasrc/view/mwan/advanced_mwanconfig.htm | 2 -- .../luasrc/view/mwan/advanced_networkconfig.htm | 2 -- .../view/mwan/advanced_troubleshooting.htm | 11 +++++------ .../view/mwan/advanced_wirelessconfig.htm | 2 -- .../luasrc/view/mwan/overview_detailed.htm | 2 ++ .../luasrc/view/mwan/overview_interface.htm | 2 ++ 8 files changed, 23 insertions(+), 26 deletions(-) diff --git a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua index 4bb0d492e2..2261815221 100644 --- a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua +++ b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua @@ -19,10 +19,19 @@ function index() template("mwan/overview_interface")) entry({"admin", "status", "mwan", "overview_detailed"}, template("mwan/overview_detailed")) + entry({"admin", "status", "mwan", "diagnostics"}, + template("mwan/advanced_diagnostics")) + entry({"admin", "status", "mwan", "troubleshooting"}, + template("mwan/advanced_troubleshooting")) entry({"admin", "status", "mwan", "interface_status"}, call("interfaceStatus")) 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", "configuration"), @@ -58,14 +67,6 @@ function index() 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")) end function getInterfaceStatus(ruleNumber, interfaceName) diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm b/applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm index d290095957..74fe6743d7 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/advanced_diagnostics.htm @@ -1,11 +1,10 @@ <%+header%> <% @@ -46,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/advanced_mwanconfig.htm b/applications/luci-app-mwan3/luasrc/view/mwan/advanced_mwanconfig.htm index 17e2589e74..da73f234dc 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/advanced_mwanconfig.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/advanced_mwanconfig.htm @@ -2,8 +2,6 @@
  • "><%:MWAN Config%>
  • "><%:Network Config%>
  • "><%:Wireless Config%>
  • -
  • "><%:Diagnostics%>
  • -
  • "><%:Troubleshooting%>