luci-app-mwan3: update entry naming
[project/luci.git] / applications / luci-app-mwan3 / luasrc / view / mwan / advanced_troubleshooting.htm
1 <%+header%>
2
3 <ul class="cbi-tabmenu">
4         <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/overview")%>"><%:Interface Status%></a></li>
5         <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/detail")%>"><%:Detailed Status%></a></li>
6         <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/diagnostics")%>"><%:Diagnostics%></a></li>
7         <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/status/mwan/troubleshooting")%>"><%:Troubleshooting%></a></li>
8 </ul>
9
10 <script type="text/javascript" src="<%=resource%>/cbi.js"></script>
11 <script type="text/javascript">//<![CDATA[
12         XHR.poll(15, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "troubleshooting_display")%>', null,
13                 function(x, mArray)
14                 {
15                         var tshoot = document.getElementById('troubleshoot_text');
16                         if (mArray.versions)
17                         {
18                                 var versions = '<span class="description">Software versions : </span><br /><br />';
19                                 var mwanConfig = '<br /><br /><span class="description">Output of &#34;cat /etc/config/mwan3&#34; : </span><br /><br />';
20                                 var netConfig = '<br /><br /><span class="description">Output of &#34;cat /etc/config/network&#34; : </span><br /><br />';
21                                 var wifiConfig = '<br /><br /><span class="description">Output of &#34;cat /etc/config/wireless&#34; : </span><br /><br />';
22                                 var ifconfig = '<br /><br /><span class="description">Output of &#34;ifconfig&#34; : </span><br /><br />';
23                                 var ipRoute = '<br /><br /><span class="description">Output of &#34;route -n&#34; : </span><br /><br />';
24                                 var ipRuleShow = '<br /><br /><span class="description">Output of &#34;ip rule show&#34; : </span><br /><br />';
25                                 var routeListTable = '<br /><br /><span class="description">Output of &#34;ip route list table 1-250&#34; : </span><br /><br />';
26                                 var firewallOut = '<br /><br /><span class="description">Firewall default output policy (must be ACCEPT) : </span><br /><br />';
27                                 var iptables = '<br /><br /><span class="description">Output of &#34;iptables -L -t mangle -v -n&#34; : </span><br /><br />';
28                                 tshoot.innerHTML = String.format(
29                                         '<pre>%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s</pre>',
30                                         versions, mArray.versions[0], mwanConfig, mArray.mwanconfig[0], netConfig, mArray.netconfig[0],
31                                         wifiConfig, mArray.wificonfig[0], ifconfig, mArray.ifconfig[0], ipRoute, mArray.routeshow[0],
32                                         ipRuleShow, mArray.iprule[0], routeListTable, mArray.routelist[0], firewallOut, mArray.firewallout[0],
33                                         iptables, mArray.iptables[0]
34                                 );
35                         }
36                         else
37                         {
38                                 tshoot.innerHTML = '<strong><%:Error collecting troubleshooting information%></strong>';
39                         }
40                 }
41         );
42 //]]></script>
43
44 <div id="troubleshoot">
45         <fieldset class="cbi-section">
46                 <legend><%:Troubleshooting Data%></legend>
47                 <div id="troubleshoot_text"><img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /><%:Collecting data...%></div>
48         </fieldset>
49 </div>
50
51 <style type="text/css">
52   #troubleshoot_text {
53         padding: 20px;
54         text-align: left;
55   }
56   .description {
57         background-color: rgb(78, 186, 241);
58   }
59 </style>
60
61 <%+footer%>