diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2018-02-05 17:43:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-05 17:43:44 +0200 |
commit | 90369e78d77e35fbc065579a6709abeb6a260408 (patch) | |
tree | 52eba06773656c6f25b3c04a295ac9fe185258f0 /applications/luci-app-mwan3 | |
parent | 251656126a79a47e063c81c46511fd665254a8e4 (diff) | |
parent | 66b93ab784ad287142964559eaf9f89cb2fa39df (diff) |
Merge pull request #1626 from TDT-AG/pr/20180105-luci-app-mwan3-add-service
luci-app-mwan3: add service hint
Diffstat (limited to 'applications/luci-app-mwan3')
6 files changed, 25 insertions, 7 deletions
diff --git a/applications/luci-app-mwan3/luasrc/view/admin_status/index/mwan.htm b/applications/luci-app-mwan3/luasrc/view/admin_status/index/mwan.htm index d76db724bd..e4b3c06999 100644 --- a/applications/luci-app-mwan3/luasrc/view/admin_status/index/mwan.htm +++ b/applications/luci-app-mwan3/luasrc/view/admin_status/index/mwan.htm @@ -1 +1,3 @@ +<%if require("luci.sys").init.enabled("mwan3") then%> <%+mwan/overview_status_interface%> +<%end%> diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm index b7bb6de1c7..70eac72520 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm @@ -28,6 +28,9 @@ <div class="cbi-map"> <h2 name="content"><%:MWAN Status - Detail%></h2> + <%if not require("luci.sys").init.enabled("mwan3") then%> + <div><strong><%:INFO: MWAN not running%></strong></div> + <%end%> <fieldset class="cbi-section"> <legend id="diag-rc-legend"><%:Collecting data...%></legend> <span id="diag-rc-output"> diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/status_diagnostics.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_diagnostics.htm index f9a0fa2be4..f1c5d8fd98 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/status_diagnostics.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_diagnostics.htm @@ -55,7 +55,9 @@ <form method="post" action="<%=url('admin/network/diagnostics')%>"> <div class="cbi-map"> <h2 name="content"><%:MWAN Status - Diagnostics%></h2> - + <%if not require("luci.sys").init.enabled("mwan3") then%> + <div><strong><%:INFO: MWAN not running%></strong></div> + <%end%> <fieldset class="cbi-section"> <br /> diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm index 2fb5ea484f..21e59a8017 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm @@ -18,7 +18,9 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_status")%>', null, function(x, status) { - var statusDiv = document.getElementById('mwan_status_text'); + var legend = document.getElementById('diag-rc-legend'); + var statusDiv = document.getElementById('diag-rc-output'); + legend.style.display = 'none'; if (status.interfaces) { var statusview = ''; @@ -62,10 +64,16 @@ ); //]]></script> -<div id="mwan_interface_status"> - <fieldset id="interface_field" class="cbi-section"> - <legend><%:MWAN status - Interface Live Status%></legend> - <div id="mwan_status_text"><img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /><%:Collecting data...%></div> +<div class="cbi-map"> + <h2 name="content"><%:MWAN Status - Interface%></h2> + <%if not require("luci.sys").init.enabled("mwan3") then%> + <div><strong><%:INFO: MWAN not running%></strong></div> + <%end%> + <fieldset class="cbi-section"> + <legend id="diag-rc-legend"><%:Collecting data...%></legend> + <span id="diag-rc-output"> + <img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align: middle;" /> + </span> </fieldset> </div> diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/status_troubleshooting.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_troubleshooting.htm index b812e5b888..77d009231e 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/status_troubleshooting.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_troubleshooting.htm @@ -28,6 +28,9 @@ <div class="cbi-map"> <h2 name="content"><%:MWAN Status - Troubleshooting%></h2> + <%if not require("luci.sys").init.enabled("mwan3") then%> + <div><strong><%:INFO: MWAN not running%></strong></div> + <%end%> <fieldset class="cbi-section"> <legend id="diag-rc-legend"><%:Collecting data...%></legend> <span id="diag-rc-output"> diff --git a/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3 b/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3 index 50c65ad678..150ea5a3f1 100755 --- a/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3 +++ b/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3 @@ -4,7 +4,7 @@ uci -q batch <<-EOF >/dev/null del ucitrack.@mwan3[-1] add ucitrack mwan3 - set ucitrack.@mwan3[-1].exec="/usr/sbin/mwan3 restart" + set ucitrack.@mwan3[-1].exec="/etc/init.d/mwan3 reload" commit ucitrack EOF |