2 <script type=
"text/javascript" src=
"<%=resource%>/cbi.js"></script>
4 <script type=
"text/javascript">//<![CDATA[
6 var displayExtraInfo = function ( id ) {
8 document.getElementById('extra-info').innerHTML = document.getElementById(id).innerHTML;
10 XHR.poll(
5, '/cgi-bin/bmx6-info', { 'descriptions/all': '' },
13 var tb = document.getElementById('descriptions_table');
15 var tunicon =
"<%=resource%>/icons/tunnel.png";
17 while( tb.rows.length
> 1 ) tb.deleteRow(
1);
21 var description = st[k].DESC_ADV;
24 for ( var k in description.extensions )
26 var value = description.extensions[k];
28 if ( value.TUN4IN6_NET_EXTENSION )
30 tun4in6 = value.TUN4IN6_NET_EXTENSION;
37 var nodename = description.globalId.replace(/\..+$/,'');
39 for( var i =
0; i < tun4in6.length; i++ )
41 var tr = tb.insertRow(-
1);
42 var network = tun4in6[i].network;
43 var network_len = tun4in6[i].networklen;
44 var network_bw = tun4in6[i].bandwidth;
46 if ( network_len
>=
32 ) continue;
48 tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((rowcount++ %
2) +
1);
49 tr.insertCell(-
1).innerHTML = String.format('
<a href=
"/cgi-bin/bmx6control?function=gwselect&node=%s"><img src=
"%s" /></a>',nodename,tunicon);
50 tr.insertCell(-
1).innerHTML = nodename;
51 tr.insertCell(-
1).innerHTML = network + '/' + network_len;
52 tr.insertCell(-
1).innerHTML = network_bw;
57 if( tb.rows.length ==
1 )
59 var tr = tb.insertRow(-
1);
60 tr.className = 'cbi-section-table-row';
62 var td = tr.insertCell(-
1);
64 td.innerHTML = '
<em><br /><%:There are no gateways announced in the network.%
></em>';
95 #extra-info ul { list-style: none outside none; margin-left:
0em; }
101 <div class=
"cbi-map-descr"></div>
102 <fieldset class=
"cbi-section">
103 <legend><%:Mesh gateways%
></legend>
104 <table class=
"cbi-section-table" id=
"descriptions_table">
105 <tr class=
"cbi-section-table-titles">
106 <th class=
"cbi-section-table-cell"></th>
107 <th class=
"cbi-section-table-cell"><%:Node%
></th>
108 <th class=
"cbi-section-table-cell"><%:Network%
></th>
109 <th class=
"cbi-section-table-cell"><%:Bandwidth%
></th>
111 <tr class=
"cbi-section-table-row">
112 <td colspan=
"4"><em><br /><%:Collecting data...%
></em></td>