_("Load Balancing"), 600)
entry({"admin", "status", "mwan", "overview"},
- template("mwan/overview_interface"))
+ template("mwan/status_interface"))
entry({"admin", "status", "mwan", "detail"},
- template("mwan/overview_detailed"))
+ template("mwan/status_detail"))
entry({"admin", "status", "mwan", "diagnostics"},
- template("mwan/advanced_diagnostics"))
+ template("mwan/status_diagnostics"))
entry({"admin", "status", "mwan", "troubleshooting"},
- template("mwan/advanced_troubleshooting"))
+ template("mwan/status_troubleshooting"))
entry({"admin", "status", "mwan", "interface_status"},
call("interfaceStatus"))
entry({"admin", "status", "mwan", "detailed_status"},
+++ /dev/null
-<%+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"><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>
-
-<%
- local uci = require "luci.model.uci"
-
- interfaceNames = ""
- uci.cursor():foreach("mwan3", "interface",
- function (section)
- interfaceNames = interfaceNames .. section[".name"] .. " "
- end
- )
-%>
-
-<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
-<script type="text/javascript">//<![CDATA[
- var stxhr = new XHR();
-
- function update_status(tool, task, task_name)
- {
- var iface = document.getElementById('mwaniface').value;
- var output = document.getElementById('diag_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.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)
- {
- 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>';
- }
- }
- );
- }
-//]]></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>
- <fieldset class="cbi-section" style="display:none">
- <legend><%:Diagnostic Results%></legend>
- <div id="diag_output"></div>
- </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>
-
-<%+footer%>
+++ /dev/null
-<%+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/diagnostics")%>"><%:Diagnostics%></a></li>
- <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li>
-</ul>
-
-<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)
- {
- 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 "cat /etc/config/mwan3" : </span><br /><br />';
- var netConfig = '<br /><br /><span class="description">Output of "cat /etc/config/network" : </span><br /><br />';
- var wifiConfig = '<br /><br /><span class="description">Output of "cat /etc/config/wireless" : </span><br /><br />';
- var ifconfig = '<br /><br /><span class="description">Output of "ifconfig" : </span><br /><br />';
- var ipRoute = '<br /><br /><span class="description">Output of "route -n" : </span><br /><br />';
- var ipRuleShow = '<br /><br /><span class="description">Output of "ip rule show" : </span><br /><br />';
- var routeListTable = '<br /><br /><span class="description">Output of "ip route list table 1-250" : </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 "iptables -L -t mangle -v -n" : </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>';
- }
- }
- );
-//]]></script>
-
-<div id="troubleshoot">
- <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>
- </fieldset>
-</div>
-
-<style type="text/css">
- #troubleshoot_text {
- padding: 20px;
- text-align: left;
- }
- .description {
- background-color: rgb(78, 186, 241);
- }
-</style>
-
-<%+footer%>
+++ /dev/null
-<%+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/diagnostics")%>"><%:Diagnostics%></a></li>
- <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li>
-</ul>
-
-<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)
- {
- 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>';
- }
- }
- );
-//]]></script>
-
-<div id="mwan_detail_status">
- <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>
- </fieldset>
-</div>
-
-<style type="text/css">
- #mwan_detail_text {
- padding: 20px;
- text-align: left;
- }
-</style>
-
-<%+footer%>
+++ /dev/null
-<%+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-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>
-
-<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)
- {
- var statusDiv = document.getElementById('mwan_status_text');
- if (mArray.wans)
- {
- var interfaceStatus = '';
- for ( var i = 0; i < mArray.wans.length; i++ )
- {
- var status = '';
- var css = '';
- switch (mArray.wans[i].status)
- {
- case 'online':
- status = '<%:Online (tracking active)%>';
- css = 'wanon';
- break;
- case 'notMonitored':
- status = '<%:Online (tracking off)%>';
- css = 'wanon';
- break;
- case 'offline':
- status = '<%:Offline%>';
- css = 'wanoff';
- break;
- case 'notEnabled':
- status = '<%: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
- );
- }
- statusDiv.innerHTML = interfaceStatus;
- }
- 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>
- <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">
- #mwan_status_text {
- display: table;
- font-size: 14px;
- margin: auto;
- max-width: 1044px;
- min-width: 246px;
- width: 100%;
- }
- .wanon {
- background-color: rgb(144, 240, 144);
- }
- .wanoff {
- background-color: rgb(240, 144, 144);
- }
- .wanon, .wanoff {
- border-radius: 60px;
- box-shadow: 0px 2px 5px -3px;
- float: left;
- margin: 8px 3px 0px 3px;
- min-height: 30px;
- min-width: 235px;
- padding: 5px 10px 8px 10px;
- text-align: center;
- }
- #mwan_statuslog_text {
- padding: 20px;
- text-align: left;
- }
-</style>
-
-<%+footer%>
--- /dev/null
+<%+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/diagnostics")%>"><%:Diagnostics%></a></li>
+ <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li>
+</ul>
+
+<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)
+ {
+ 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>';
+ }
+ }
+ );
+//]]></script>
+
+<div id="mwan_detail_status">
+ <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>
+ </fieldset>
+</div>
+
+<style type="text/css">
+ #mwan_detail_text {
+ padding: 20px;
+ text-align: left;
+ }
+</style>
+
+<%+footer%>
--- /dev/null
+<%+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"><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>
+
+<%
+ local uci = require "luci.model.uci"
+
+ interfaceNames = ""
+ uci.cursor():foreach("mwan3", "interface",
+ function (section)
+ interfaceNames = interfaceNames .. section[".name"] .. " "
+ end
+ )
+%>
+
+<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
+<script type="text/javascript">//<![CDATA[
+ var stxhr = new XHR();
+
+ function update_status(tool, task, task_name)
+ {
+ var iface = document.getElementById('mwaniface').value;
+ var output = document.getElementById('diag_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.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)
+ {
+ 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>';
+ }
+ }
+ );
+ }
+//]]></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>
+ <fieldset class="cbi-section" style="display:none">
+ <legend><%:Diagnostic Results%></legend>
+ <div id="diag_output"></div>
+ </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>
+
+<%+footer%>
--- /dev/null
+<%+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-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>
+
+<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)
+ {
+ var statusDiv = document.getElementById('mwan_status_text');
+ if (mArray.wans)
+ {
+ var interfaceStatus = '';
+ for ( var i = 0; i < mArray.wans.length; i++ )
+ {
+ var status = '';
+ var css = '';
+ switch (mArray.wans[i].status)
+ {
+ case 'online':
+ status = '<%:Online (tracking active)%>';
+ css = 'wanon';
+ break;
+ case 'notMonitored':
+ status = '<%:Online (tracking off)%>';
+ css = 'wanon';
+ break;
+ case 'offline':
+ status = '<%:Offline%>';
+ css = 'wanoff';
+ break;
+ case 'notEnabled':
+ status = '<%: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
+ );
+ }
+ statusDiv.innerHTML = interfaceStatus;
+ }
+ 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>
+ <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">
+ #mwan_status_text {
+ display: table;
+ font-size: 14px;
+ margin: auto;
+ max-width: 1044px;
+ min-width: 246px;
+ width: 100%;
+ }
+ .wanon {
+ background-color: rgb(144, 240, 144);
+ }
+ .wanoff {
+ background-color: rgb(240, 144, 144);
+ }
+ .wanon, .wanoff {
+ border-radius: 60px;
+ box-shadow: 0px 2px 5px -3px;
+ float: left;
+ margin: 8px 3px 0px 3px;
+ min-height: 30px;
+ min-width: 235px;
+ padding: 5px 10px 8px 10px;
+ text-align: center;
+ }
+ #mwan_statuslog_text {
+ padding: 20px;
+ text-align: left;
+ }
+</style>
+
+<%+footer%>
--- /dev/null
+<%+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/diagnostics")%>"><%:Diagnostics%></a></li>
+ <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li>
+</ul>
+
+<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)
+ {
+ 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 "cat /etc/config/mwan3" : </span><br /><br />';
+ var netConfig = '<br /><br /><span class="description">Output of "cat /etc/config/network" : </span><br /><br />';
+ var wifiConfig = '<br /><br /><span class="description">Output of "cat /etc/config/wireless" : </span><br /><br />';
+ var ifconfig = '<br /><br /><span class="description">Output of "ifconfig" : </span><br /><br />';
+ var ipRoute = '<br /><br /><span class="description">Output of "route -n" : </span><br /><br />';
+ var ipRuleShow = '<br /><br /><span class="description">Output of "ip rule show" : </span><br /><br />';
+ var routeListTable = '<br /><br /><span class="description">Output of "ip route list table 1-250" : </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 "iptables -L -t mangle -v -n" : </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>';
+ }
+ }
+ );
+//]]></script>
+
+<div id="troubleshoot">
+ <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>
+ </fieldset>
+</div>
+
+<style type="text/css">
+ #troubleshoot_text {
+ padding: 20px;
+ text-align: left;
+ }
+ .description {
+ background-color: rgb(78, 186, 241);
+ }
+</style>
+
+<%+footer%>