summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-mwan3/luasrc/view/mwan
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-mwan3/luasrc/view/mwan')
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/config_css.htm28
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm (renamed from applications/luci-app-mwan3/luasrc/view/mwan/openwrt_overview_status.htm)54
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm41
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/status_diagnostics.htm133
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm59
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/status_troubleshooting.htm60
6 files changed, 151 insertions, 224 deletions
diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/config_css.htm b/applications/luci-app-mwan3/luasrc/view/mwan/config_css.htm
deleted file mode 100644
index 5d91c536eb..0000000000
--- a/applications/luci-app-mwan3/luasrc/view/mwan/config_css.htm
+++ /dev/null
@@ -1,28 +0,0 @@
-<style type="text/css">
- table td { /* cells showing the configuration values */
- padding: 0px;
- text-align: center;
- vertical-align: middle;
- }
- table th { /* column for configuration section name */
- padding: 0px;
- text-align: center;
- vertical-align: middle;
- }
- table tbody th { /* column for configuration section name */
- padding: 0px;
- vertical-align: middle;
- }
- .cbi-section-node table div { /* rows */
- padding-top: 5px;
- }
- table.cbi-section-table td.cbi-section-table-cell { /* sort buttons column */
- text-align: center;
- }
- .cbi-section h3 {
- color: rgb(85, 85, 85);
- font-family: Trebuchet MS,Verdana,sans-serif;
- font-style: italic;
- font-weight: normal;
- }
-</style>
diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/openwrt_overview_status.htm b/applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm
index 335c95c8fd..6dc3d12749 100644
--- a/applications/luci-app-mwan3/luasrc/view/mwan/openwrt_overview_status.htm
+++ b/applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm
@@ -1,44 +1,52 @@
+<%#
+ Copyright 2014 Aedan Renner <chipdankly@gmail.com>
+ Copyright 2018 Florian Eckert <fe@dev.tdt.de>
+ Licensed to the public under the GNU General Public License v2.
+-%>
+
<script type="text/javascript">//<![CDATA[
- XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_status")%>', null,
- function(x, mArray)
+XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_status")%>', null,
+ function(x, status)
{
- var status = document.getElementById('mwan_status_text');
- if (mArray.wans)
+ var statusDiv = document.getElementById('mwan_status_text');
+ if (status.interfaces)
{
- var temp = '';
- for ( var i = 0; i < mArray.wans.length; i++ )
+ var statusview = '';
+ for ( var iface in status.interfaces)
{
- var stat = '';
- var cssc = '';
- switch (mArray.wans[i].status)
+ var state = '';
+ var css = '';
+ switch (status.interfaces[iface].status)
{
case 'online':
- stat = '<%:Online (tracking active)%>';
- cssc = 'wanon';
+ state = '<%:Online (tracking active)%>';
+ css = 'wanon';
break;
case 'notMonitored':
- stat = '<%:Online (tracking off)%>';
- cssc = 'wanon';
+ state = '<%:Online (tracking off)%>';
+ css = 'wanon';
break;
case 'offline':
- stat = '<%:Offline%>';
- cssc = 'wanoff';
+ state = '<%:Offline%>';
+ css = 'wanoff';
break;
- case 'notEnabled':
- stat = '<%:Disabled%>';
- cssc = 'wanoff';
+ default:
+ state = '<%:Disabled%>';
+ css = 'wanoff';
break;
}
- temp += String.format(
- '<span class="%s"><strong>%s (<a href="%q">%s</a>)</strong><br />%s</span>',
- cssc, mArray.wans[i].name, mArray.wans[i].link, mArray.wans[i].ifname, stat
+ statusview += String.format(
+ '<span class="%s"><strong>%s</strong><br />%s</span>',
+ css,
+ iface,
+ state
);
}
- status.innerHTML = temp;
+ statusDiv.innerHTML = statusview;
}
else
{
- status.innerHTML = '<strong><%:No MWAN interfaces found%></strong>';
+ statusDiv.innerHTML = '<strong><%:No MWAN interfaces found%></strong>';
}
}
);
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 0ff2824ed2..b7bb6de1c7 100644
--- a/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm
+++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm
@@ -1,8 +1,14 @@
+<%#
+ Copyright 2014 Aedan Renner <chipdankly@gmail.com>
+ Copyright 2018 Florian Eckert <fe@dev.tdt.de>
+ Licensed to the public under the GNU General Public License v2.
+-%>
+
<%+header%>
<ul class="cbi-tabmenu">
- <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface Status%></a></li>
- <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detailed Status%></a></li>
+ <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface%></a></li>
+ <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detail%></a></li>
<li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/diagnostics")%>"><%:Diagnostics%></a></li>
<li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li>
</ul>
@@ -10,33 +16,24 @@
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "detailed_status")%>', null,
- function(x, mArray)
+ function(x)
{
- var status = document.getElementById('mwan_detail_text');
- if (mArray.mwandetail)
- {
- status.innerHTML = String.format('<pre>%s</pre>', mArray.mwandetail[0]);
- }
- else
- {
- status.innerHTML = '<strong><%:No detailed status information available%></strong>';
- }
+ var legend = document.getElementById('diag-rc-legend');
+ var output = document.getElementById('diag-rc-output');
+ legend.style.display = 'none';
+ output.innerHTML = String.format('<pre>%h</pre>', x.responseText);
}
);
//]]></script>
-<div id="mwan_detail_status">
+<div class="cbi-map">
+ <h2 name="content"><%:MWAN Status - Detail%></h2>
<fieldset class="cbi-section">
- <legend><%:MWAN Detailed Status%></legend>
- <div id="mwan_detail_text"><img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /><%:Collecting data...%></div>
+ <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>
-<style type="text/css">
- #mwan_detail_text {
- padding: 20px;
- text-align: left;
- }
-</style>
-
<%+footer%>
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 19433f4d9f..f9a0fa2be4 100644
--- a/applications/luci-app-mwan3/luasrc/view/mwan/status_diagnostics.htm
+++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_diagnostics.htm
@@ -1,8 +1,14 @@
+<%#
+ Copyright 2014 Aedan Renner <chipdankly@gmail.com>
+ Copyright 2018 Florian Eckert <fe@dev.tdt.de>
+ Licensed to the public under the GNU General Public License v2.
+-%>
+
<%+header%>
<ul class="cbi-tabmenu">
- <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface Status%></a></li>
- <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detailed Status%></a></li>
+ <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface%></a></li>
+ <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detail%></a></li>
<li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/diagnostics")%>"><%:Diagnostics%></a></li>
<li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li>
</ul>
@@ -10,10 +16,11 @@
<%
local uci = require "luci.model.uci"
- interfaceNames = ""
+ local iface = {}
+
uci.cursor():foreach("mwan3", "interface",
function (section)
- interfaceNames = interfaceNames .. section[".name"] .. " "
+ table.insert(iface, section[".name"])
end
)
%>
@@ -22,92 +29,64 @@
<script type="text/javascript">//<![CDATA[
var stxhr = new XHR();
- function update_status(tool, task, task_name)
+ function update_status(iface, task)
{
- var iface = document.getElementById('mwaniface').value;
- var output = document.getElementById('diag_output');
+ var legend = document.getElementById('diag-rc-legend');
+ var output = document.getElementById('diag-rc-output');
- if (tool == "service")
- {
- output.innerHTML =
- '<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="padding: 20px; vertical-align: middle;" /> ' +
- 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.innerHTML =
+ '<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align: middle;" />' +
+ "<%:Waiting for command to complete...%>"
+ ;
output.parentNode.style.display = 'block';
output.style.display = 'inline';
- stxhr.get('<%=luci.dispatcher.build_url("admin", "status", "mwan")%>/diagnostics_display' + '/' + iface + '/' + tool + '/' + task, null,
- function(x, mArray)
+ stxhr.post('<%=url('admin/status/mwan')%>/diagnostics_display' + '/' + iface + '/' + task, { token: '<%=token%>' },
+ function(x)
{
- if (mArray.diagnostics)
- {
- output.innerHTML = String.format('<pre id="diag_output_css">%h</pre>', mArray.diagnostics[0]);
- }
- else
- {
- output.innerHTML = '<pre id="diag_output_css"><strong><%:No diagnostic results returned%></strong></pre>';
- }
+ legend.style.display = 'none';
+ output.innerHTML = String.format('<pre>%h</pre>', x.responseText);
}
);
}
//]]></script>
-<div id="mwan_diagnostics" class="cbi-map">
- <fieldset id="diag_select" class="cbi-section">
- <legend><%:MWAN Interface Diagnostics%></legend>
- <select id="mwaniface">
- <% for z in interfaceNames:gmatch("[^ ]+") do -%><option value="<%=z%>"><%=z%></option><%- end %>
- </select>
- <div id="buttoncss">
- <input type="button" value="<%:Ping default gateway%>" class="cbi-button cbi-button-apply" onclick="update_status('ping', 'gateway', null)" />
- <input type="button" value="<%:Ping tracking IP%>" class="cbi-button cbi-button-apply" onclick="update_status('ping', 'track_ip', null)" />
- <input type="button" value="<%:Check IP rules%>" class="cbi-button cbi-button-apply" onclick="update_status('rulechk', null, null)" />
- <input type="button" value="<%:Check routing table%>" class="cbi-button cbi-button-apply" onclick="update_status('routechk', null, null)" />
- <input type="button" value="<%:Hotplug ifup%>" class="cbi-button cbi-button-apply" onclick="update_status('hotplug', 'ifup', null)" />
- <input type="button" value="<%:Hotplug ifdown%>" class="cbi-button cbi-button-apply" onclick="update_status('hotplug', 'ifdown', null)" />
- </div>
- </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>
+<form method="post" action="<%=url('admin/network/diagnostics')%>">
+ <div class="cbi-map">
+ <h2 name="content"><%:MWAN Status - Diagnostics%></h2>
+
+ <fieldset class="cbi-section">
+ <br />
+
+ <div style="width:30%; float:left">
+ <label class="cbi-value-title"><%:Interface%></label>
+ <select name="iface" style="width:auto">
+ <% for _, z in ipairs(iface) do -%><option value="<%=z%>"><%=z%></option><%- end %>
+ </select>
+ </div>
+
+ <div style="width:30%; float:left">
+ <label class="cbi-value-title"><%:Task%></label>
+ <select name="task" style="width:auto">
+ <option value="ping_gateway"><%:Ping default gateway%></option>
+ <option value="ping_trackips"><%:Ping tracking IP%></option>
+ <option value="check_rules"><%:Check IP rules%></option>
+ <option value="check_routes"><%:Check routing table%></option>
+ <option value="hotplug_ifup"><%:Hotplug ifup%></option>
+ <option value="hotplug_ifdown"><%:Hotplug ifdown%></option>
+ </select>
+ </div>
+
+ <div style="width:30%; float:left">
+ <input type="button" value="<%:Execute%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.iface.value, this.form.task.value)"/>
+ </div>
+ </fieldset>
+ </div>
<fieldset class="cbi-section" style="display:none">
- <legend><%:Diagnostic Results%></legend>
- <div id="diag_output"></div>
+ <legend id="diag-rc-legend"><%:Collecting data...%></legend>
+ <span id="diag-rc-output"></span>
</fieldset>
-</div>
-
-<style type="text/css">
- #mwaniface {
- float: left;
- margin: 8px 20px 0px 0px;
- }
- #buttoncss {
- display: table;
- float: left;
- text-align: left;
- }
- .cbi-button {
- margin: 8px 20px 0px 0px;
- min-width: 153px;
- }
- #diag_output_css {
- padding: 20px;
- text-align: left;
- }
-</style>
+</form>
<%+footer%>
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 c7039f7a61..2fb5ea484f 100644
--- a/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm
+++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm
@@ -1,8 +1,14 @@
+<%#
+ Copyright 2014 Aedan Renner <chipdankly@gmail.com>
+ Copyright 2018 Florian Eckert <fe@dev.tdt.de>
+ Licensed to the public under the GNU General Public License v2.
+-%>
+
<%+header%>
<ul class="cbi-tabmenu">
- <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface Status%></a></li>
- <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detailed Status%></a></li>
+ <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface%></a></li>
+ <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detail%></a></li>
<li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/diagnostics")%>"><%:Diagnostics%></a></li>
<li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li>
</ul>
@@ -10,70 +16,57 @@
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_status")%>', null,
- function(x, mArray)
+ function(x, status)
{
var statusDiv = document.getElementById('mwan_status_text');
- if (mArray.wans)
+ if (status.interfaces)
{
- var interfaceStatus = '';
- for ( var i = 0; i < mArray.wans.length; i++ )
+ var statusview = '';
+ for ( var iface in status.interfaces)
{
- var status = '';
+ var state = '';
var css = '';
- switch (mArray.wans[i].status)
+ switch (status.interfaces[iface].status)
{
case 'online':
- status = '<%:Online (tracking active)%>';
+ state = '<%:Online (tracking active)%>';
css = 'wanon';
break;
case 'notMonitored':
- status = '<%:Online (tracking off)%>';
+ state = '<%:Online (tracking off)%>';
css = 'wanon';
break;
case 'offline':
- status = '<%:Offline%>';
+ state = '<%:Offline%>';
css = 'wanoff';
break;
- case 'notEnabled':
- status = '<%:Disabled%>';
+ default:
+ state = '<%:Disabled%>';
css = 'wanoff';
break;
}
- interfaceStatus += String.format(
- '<span class="%s"><strong>%s (<a href="%q">%s</a>)</strong><br />%s</span>',
- css, mArray.wans[i].name, mArray.wans[i].link, mArray.wans[i].ifname, status
+ statusview += String.format(
+ '<span class="%s"><strong>%s</strong><br />%s</span>',
+ css,
+ iface,
+ state
);
}
- statusDiv.innerHTML = interfaceStatus;
+ statusDiv.innerHTML = statusview;
}
else
{
statusDiv.innerHTML = '<strong><%:No MWAN interfaces found%></strong>';
}
-
- var logs = document.getElementById('mwan_statuslog_text');
- if (mArray.mwanlog)
- {
- var mwanLog = '<%:Last 50 MWAN systemlog entries. Newest entries sorted at the top :%>';
- logs.innerHTML = String.format('<pre>%s<br /><br />%s</pre>', mwanLog, mArray.mwanlog[0]);
- }
- else
- {
- logs.innerHTML = '<strong><%:No MWAN systemlog history found%></strong>';
- }
}
);
//]]></script>
<div id="mwan_interface_status">
<fieldset id="interface_field" class="cbi-section">
- <legend><%:MWAN Interface Live Status%></legend>
+ <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>
</fieldset>
- <fieldset class="cbi-section">
- <legend><%:MWAN Interface Systemlog%></legend>
- <div id="mwan_statuslog_text"><img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /><%:Collecting data...%></div>
- </fieldset>
</div>
<style type="text/css">
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 483e289493..b812e5b888 100644
--- a/applications/luci-app-mwan3/luasrc/view/mwan/status_troubleshooting.htm
+++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_troubleshooting.htm
@@ -1,8 +1,14 @@
+<%#
+ Copyright 2014 Aedan Renner <chipdankly@gmail.com>
+ Copyright 2018 Florian Eckert <fe@dev.tdt.de>
+ Licensed to the public under the GNU General Public License v2.
+-%>
+
<%+header%>
<ul class="cbi-tabmenu">
- <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface Status%></a></li>
- <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detailed Status%></a></li>
+ <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface%></a></li>
+ <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detail%></a></li>
<li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/diagnostics")%>"><%:Diagnostics%></a></li>
<li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li>
</ul>
@@ -10,52 +16,24 @@
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript">//<![CDATA[
XHR.poll(15, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "troubleshooting_display")%>', null,
- function(x, mArray)
+ function(x)
{
- var tshoot = document.getElementById('troubleshoot_text');
- if (mArray.versions)
- {
- var versions = '<span class="description">Software versions : </span><br /><br />';
- var mwanConfig = '<br /><br /><span class="description">Output of &#34;cat /etc/config/mwan3&#34; : </span><br /><br />';
- var netConfig = '<br /><br /><span class="description">Output of &#34;cat /etc/config/network&#34; : </span><br /><br />';
- var wifiConfig = '<br /><br /><span class="description">Output of &#34;cat /etc/config/wireless&#34; : </span><br /><br />';
- var ifconfig = '<br /><br /><span class="description">Output of &#34;ifconfig&#34; : </span><br /><br />';
- var ipRoute = '<br /><br /><span class="description">Output of &#34;route -n&#34; : </span><br /><br />';
- var ipRuleShow = '<br /><br /><span class="description">Output of &#34;ip rule show&#34; : </span><br /><br />';
- var routeListTable = '<br /><br /><span class="description">Output of &#34;ip route list table 1-250&#34; : </span><br /><br />';
- var firewallOut = '<br /><br /><span class="description">Firewall default output policy (must be ACCEPT) : </span><br /><br />';
- var iptables = '<br /><br /><span class="description">Output of &#34;iptables -L -t mangle -v -n&#34; : </span><br /><br />';
- tshoot.innerHTML = String.format(
- '<pre>%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s</pre>',
- versions, mArray.versions[0], mwanConfig, mArray.mwanconfig[0], netConfig, mArray.netconfig[0],
- wifiConfig, mArray.wificonfig[0], ifconfig, mArray.ifconfig[0], ipRoute, mArray.routeshow[0],
- ipRuleShow, mArray.iprule[0], routeListTable, mArray.routelist[0], firewallOut, mArray.firewallout[0],
- iptables, mArray.iptables[0]
- );
- }
- else
- {
- tshoot.innerHTML = '<strong><%:Error collecting troubleshooting information%></strong>';
- }
+ var legend = document.getElementById('diag-rc-legend');
+ var output = document.getElementById('diag-rc-output');
+ legend.style.display = 'none';
+ output.innerHTML = String.format('<pre>%h</pre>', x.responseText);
}
);
//]]></script>
-<div id="troubleshoot">
+<div class="cbi-map">
+ <h2 name="content"><%:MWAN Status - Troubleshooting%></h2>
<fieldset class="cbi-section">
- <legend><%:Troubleshooting Data%></legend>
- <div id="troubleshoot_text"><img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /><%:Collecting data...%></div>
+ <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>
-<style type="text/css">
- #troubleshoot_text {
- padding: 20px;
- text-align: left;
- }
- .description {
- background-color: rgb(78, 186, 241);
- }
-</style>
-
<%+footer%>