Merge remote-tracking branch 'remotes/bmx6-owrt/master' into openwrt-bmx6
[feed/routing.git] / bmx6-luci / 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"><%:Compat%></th>
51 <th class="cbi-section-table-cell"><%:Code Version%></th>
52 <th class="cbi-section-table-cell"><%:Global ID%></th>
53 <th class="cbi-section-table-cell"><%:Primary IP%></th>
54 <th class="cbi-section-table-cell"><%:Tun6Address%></th>
55 <th class="cbi-section-table-cell"><%:Tun4Address%></th>
56 <th class="cbi-section-table-cell"><%:Local ID%></th>
57 <th class="cbi-section-table-cell"><%:Uptime%></th>
58 <th class="cbi-section-table-cell"><%:Cpu load%></th>
59 <th class="cbi-section-table-cell"><%:Nodes seen%></th>
60 </tr>
61 <tr class="cbi-section-table-row">
62 <td colspan="11"><em><br /><%:Collecting data...%></em></td>
63 </tr>
64 </table>
65 </fieldset>
66
67 <fieldset class="cbi-section">
68
69 <legend><%:Network devices%></legend>
70 <table class="cbi-section-table" id="ifaces_table">
71 <tr class="cbi-section-table-titles">
72 <th class="cbi-section-table-cell"><%:Name%></th>
73 <th class="cbi-section-table-cell"><%:State%></th>
74 <th class="cbi-section-table-cell"><%:Type%></th>
75 <th class="cbi-section-table-cell"><%:Rate%></th>
76 <th class="cbi-section-table-cell"><%:Local IP%></th>
77 <th class="cbi-section-table-cell"><%:Global IP%></th>
78 <th class="cbi-section-table-cell"><%:Multicast IP%></th>
79 <th class="cbi-section-table-cell"><%:is Primary%></th>
80 </tr>
81 <tr class="cbi-section-table-row">
82 <td colspan="8"><em><br /><%:Collecting data...%></em></td>
83 </tr>
84 </table>
85 </fieldset>
86
87 </div>
88
89 <script type="text/javascript">//<![CDATA[
90 new TablePooler(5,"/cgi-bin/bmx6-info", {'status':''}, "status_table", function(st){
91 var res = Array();
92 var sta = st.status;
93
94 res.push([sta.version,sta.compat,sta.revision,sta.globalId,sta.primaryIp,sta.tun6Address,
95 sta.tun4Address,sta.myLocalId,sta.uptime,sta.cpu,sta.nodes]);
96 return res;
97 });
98
99 new TablePooler(5,"/cgi-bin/bmx6-info", {'interfaces':''}, "ifaces_table", function(st){
100 var res = Array();
101 var ifaces = st.interfaces;
102
103 for ( var i = 0; i < ifaces.length; i++)
104 {
105 res.push([ifaces[i].devName,ifaces[i].state,ifaces[i].type,ifaces[i].rateMin+"/"+ifaces[i].rateMax,
106 ifaces[i].llocalIp,ifaces[i].globalIp,ifaces[i].multicastIp,ifaces[i].primary]);
107 }
108 return res;
109 });
110 //]]></script>
111
112
113 <%+footer%>
114