Merge pull request #1626 from TDT-AG/pr/20180105-luci-app-mwan3-add-service
luci-app-mwan3: add service hint
This commit is contained in:
commit
90369e78d7
6 changed files with 25 additions and 7 deletions
|
@ -1 +1,3 @@
|
|||
<%if require("luci.sys").init.enabled("mwan3") then%>
|
||||
<%+mwan/overview_status_interface%>
|
||||
<%end%>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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 />
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue