luci-app-mwan3: remove diagnostics service section
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
119730448d
commit
8371e40dbf
2 changed files with 54 additions and 83 deletions
|
@ -96,16 +96,6 @@ function diagnosticsData(interface, tool, task)
|
||||||
local mArray = {}
|
local mArray = {}
|
||||||
|
|
||||||
local results = ""
|
local results = ""
|
||||||
if tool == "service" then
|
|
||||||
os.execute("/usr/sbin/mwan3 " .. task)
|
|
||||||
if task == "restart" then
|
|
||||||
results = "MWAN3 restarted"
|
|
||||||
elseif task == "stop" then
|
|
||||||
results = "MWAN3 stopped"
|
|
||||||
else
|
|
||||||
results = "MWAN3 started"
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local interfaceDevice = ut.trim(sys.exec("uci -q -p /var/state get network." .. interface .. ".ifname"))
|
local interfaceDevice = ut.trim(sys.exec("uci -q -p /var/state get network." .. interface .. ".ifname"))
|
||||||
if interfaceDevice ~= "" then
|
if interfaceDevice ~= "" then
|
||||||
if tool == "ping" then
|
if tool == "ping" then
|
||||||
|
@ -159,7 +149,6 @@ function diagnosticsData(interface, tool, task)
|
||||||
else
|
else
|
||||||
results = "Unable to perform diagnostic tests on " .. interface .. ". There is no physical or virtual device associated with this interface"
|
results = "Unable to perform diagnostic tests on " .. interface .. ". There is no physical or virtual device associated with this interface"
|
||||||
end
|
end
|
||||||
end
|
|
||||||
if results ~= "" then
|
if results ~= "" then
|
||||||
results = ut.trim(results)
|
results = ut.trim(results)
|
||||||
mArray.diagnostics = { results }
|
mArray.diagnostics = { results }
|
||||||
|
|
|
@ -27,20 +27,10 @@
|
||||||
var iface = document.getElementById('mwaniface').value;
|
var iface = document.getElementById('mwaniface').value;
|
||||||
var output = document.getElementById('diag_output');
|
var output = document.getElementById('diag_output');
|
||||||
|
|
||||||
if (tool == "service")
|
output.innerHTML = '<img src="<%=resource%>/icons/loading.gif" ' +
|
||||||
{
|
'alt="<%:Loading%>" ' +
|
||||||
output.innerHTML =
|
'style="padding: 20px; vertical-align: middle;" />' +
|
||||||
'<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="padding: 20px; vertical-align: middle;" /> ' +
|
"<%:Waiting for diagnostic results...%>";
|
||||||
String.format("<%:Waiting for MWAN to %s...%>", task_name)
|
|
||||||
;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
output.innerHTML =
|
|
||||||
'<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="padding: 20px; vertical-align: middle;" /> ' +
|
|
||||||
"<%:Waiting for diagnostic results...%>"
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
output.parentNode.style.display = 'block';
|
output.parentNode.style.display = 'block';
|
||||||
output.style.display = 'inline';
|
output.style.display = 'inline';
|
||||||
|
@ -76,14 +66,6 @@
|
||||||
<input type="button" value="<%:Hotplug ifdown%>" class="cbi-button cbi-button-apply" onclick="update_status('hotplug', 'ifdown', null)" />
|
<input type="button" value="<%:Hotplug ifdown%>" class="cbi-button cbi-button-apply" onclick="update_status('hotplug', 'ifdown', null)" />
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset id="diag_select" class="cbi-section">
|
|
||||||
<legend><%:MWAN Service Control%></legend>
|
|
||||||
<div id="buttoncss">
|
|
||||||
<input type="button" value="<%:Restart MWAN%>" class="cbi-button cbi-button-apply" onclick="update_status('service', 'restart', '<%:restart%>')" />
|
|
||||||
<input type="button" value="<%:Stop MWAN%>" class="cbi-button cbi-button-apply" onclick="update_status('service', 'stop', '<%:stop%>')" />
|
|
||||||
<input type="button" value="<%:Start MWAN%>" class="cbi-button cbi-button-apply" onclick="update_status('service', 'start', '<%:start%>')" />
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<fieldset class="cbi-section" style="display:none">
|
<fieldset class="cbi-section" style="display:none">
|
||||||
<legend><%:Diagnostic Results%></legend>
|
<legend><%:Diagnostic Results%></legend>
|
||||||
<div id="diag_output"></div>
|
<div id="diag_output"></div>
|
||||||
|
|
Loading…
Reference in a new issue