514d91f9129f70c8c206adc64a0171e130c6c3b3
[librecmc/librecmc-fossil.git] /
1 <%+header%>
2
3 <ul class="cbi-tabmenu">
4         <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/hotplugscript")%>"><%:Hotplug Script%></a></li>
5         <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/mwanconfig")%>"><%:MWAN Config%></a></li>
6         <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/networkconfig")%>"><%:Network Config%></a></li>
7         <li class="cbi-tab-disabled"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/diagnostics")%>"><%:Diagnostics%></a></li>
8         <li class="cbi-tab"><a href="<%=luci.dispatcher.build_url("admin/network/mwan/advanced/troubleshooting")%>"><%:Troubleshooting%></a></li>
9 </ul>
10
11 <script type="text/javascript" src="<%=resource%>/cbi.js"></script>
12 <script type="text/javascript">//<![CDATA[
13         XHR.poll(15, '<%=luci.dispatcher.build_url("admin", "network", "mwan", "advanced", "troubleshooting_display")%>', null,
14                 function(x, mArray)
15                 {
16                         var tshoot = document.getElementById('troubleshoot_text');
17                         if (mArray.versions)
18                         {
19                                 var versions = '<span class="description">Software versions : </span><br /><br />';
20                                 var mwanConfig = '<br /><br /><span class="description">Output of &#34;cat /etc/config/mwan3&#34; : </span><br /><br />';
21                                 var netConfig = '<br /><br /><span class="description">Output of &#34;cat /etc/config/network&#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</pre>',
30                                         versions, mArray.versions[0], mwanConfig, mArray.mwanconfig[0], netConfig, mArray.netconfig[0],
31                                         ifconfig, mArray.ifconfig[0], ipRoute, mArray.routeshow[0], ipRuleShow, mArray.iprule[0],
32                                         routeListTable, mArray.routelist[0], firewallOut, mArray.firewallout[0], iptables, mArray.iptables[0]
33                                 );
34                         }
35                         else
36                         {
37                                 tshoot.innerHTML = '<strong>Error collecting troubleshooting information</strong>';
38                         }
39                 }
40         );
41 //]]></script>
42
43 <div id="troubleshoot">
44         <fieldset class="cbi-section">
45                 <legend><%:Troubleshooting Data%></legend>
46                 <div id="troubleshoot_text"><img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /> Collecting data...</div>
47         </fieldset>
48 </div>
49
50 <style type="text/css">
51   .container {  /* container for entire page. fixes bootstrap theme's ridiculously small page width */
52         max-width: none;
53         margin-left: 30px;
54         padding-right: 30px;
55         width: auto;
56   }
57   #troubleshoot {
58         background-color: #FFFFFF;
59         border: 1px dotted #555555;
60         padding: 20px;
61   }
62   #troubleshoot_text {
63         padding: 20px;
64         text-align: left;
65   }
66   .description {
67         background-color: rgb(78, 186, 241);
68   }
69 </style>
70
71 <%+footer%>