summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2018-02-05 17:43:44 +0200
committerGitHub <noreply@github.com>2018-02-05 17:43:44 +0200
commit90369e78d77e35fbc065579a6709abeb6a260408 (patch)
tree52eba06773656c6f25b3c04a295ac9fe185258f0 /applications
parent251656126a79a47e063c81c46511fd665254a8e4 (diff)
parent66b93ab784ad287142964559eaf9f89cb2fa39df (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')
-rw-r--r--applications/luci-app-mwan3/luasrc/view/admin_status/index/mwan.htm2
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm3
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/status_diagnostics.htm4
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm18
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/status_troubleshooting.htm3
-rwxr-xr-xapplications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan32
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 d76db724b..e4b3c0699 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 b7bb6de1c..70eac7252 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 f9a0fa2be..f1c5d8fd9 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 2fb5ea484..21e59a801 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 b812e5b88..77d009231 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 50c65ad67..150ea5a3f 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