bf21106f7947b0368b73512acbe555a380c72398
[feed/routing.git] / luci-app-bmx6 / files / usr / lib / lua / luci / view / bmx6 / status_j.htm
1 <%+header%>
2 <script type="text/javascript" src="<%=resource%>/cbi.js"></script>
3 <script type="text/javascript" src="<%=resource%>/bmx6/js/polling.js"></script>
4
5
6 <style>
7
8 div.hideme{
9 display: none;
10 }
11
12 div.info{
13 background: #FFF;
14 border: solid 1px;
15 height: 80px;
16 display: block;
17 overflow: auto;
18 }
19
20 div.inforow{
21 text-align:left;
22 display:inline-block;
23 width:20%;
24 margin:5px;
25 vertical-align:top;
26
27 }
28
29 #extra-info ul { list-style: none outside none; margin-left: 0em; }
30
31 </style>
32 <div class="cbi-map">
33 <center>
34 <img src="<%=resource%>/bmx6/bmx6logo.png" />
35 <br />
36 <br />
37 a mesh routing protocol for Linux devices.<br />
38 Visit <a href="http://bmx6.net">bmx6.net</a> for more info.
39 <br />
40 <br />
41 </center>
42
43 <h2>status</h2>
44 <div class="cbi-map-descr"></div>
45 <fieldset class="cbi-section">
46 <legend><%:status%></legend>
47 <table class="cbi-section-table" id="status_table">
48 <tr class="cbi-section-table-titles">
49 <th class="cbi-section-table-cell"><%:Version%></th>
50 <th class="cbi-section-table-cell"><%:Primary IP%></th>
51 <th class="cbi-section-table-cell"><%:Tun6Address%></th>
52 <th class="cbi-section-table-cell"><%:Tun4Address%></th>
53 <th class="cbi-section-table-cell"><%:Uptime%></th>
54 <th class="cbi-section-table-cell"><%:Cpu load%></th>
55 <th class="cbi-section-table-cell"><%:Nodes seen%></th>
56 </tr>
57 <tr class="cbi-section-table-row">
58 <td colspan="7"><em><br /><%:Collecting data...%></em></td>
59 </tr>
60 </table>
61 </fieldset>
62
63 </div>
64
65 <script type="text/javascript">//<![CDATA[
66 new TablePooler(5,"/cgi-bin/bmx6-info", {'$info':''}, "status_table", function(st){
67 var res = Array();
68 var sta = st.info[0].status;
69 var ifaces = st.info[1].interfaces;
70
71 res.push([sta.version+'/'+sta.compat,sta.primaryIp,sta.tun6Address,
72 sta.tun4Address,sta.uptime,sta.cpu,sta.nodes]);
73 res.push(['<br/>','','','','','','',''])
74 res.push(['','','','','','','',''])
75 res.push(['<b>Interface Name</b>','<b>State</b>','<b>Type</b>','<b>Rate</b>','<b>Local IP</b>','<b>Global IP</b>','<b>is Primary</b>'])
76
77 for ( var i = 0; i < ifaces.length; i++)
78 {
79 res.push([ifaces[i].devName,ifaces[i].state,ifaces[i].type,ifaces[i].rateMin+"/"+ifaces[i].rateMax,
80 ifaces[i].llocalIp,ifaces[i].globalIp,ifaces[i].primary],'');
81 }
82
83 return res;
84 });
85 //]]></script>
86
87 <%+footer%>
88