1 <script type=
"text/javascript">//<![CDATA[
3 XHR.poll(
5, '/cgi-bin/bmx6-info', { 'neighbours': '' },
6 var originators = st.neighbours[
0].originators;
7 var descriptions = st.neighbours[
1].descriptions;
9 var tb = document.getElementById('descriptions_table');
11 if ( originators.length != descriptions.length )
13 var tr = tb.insertRow(-
1);
14 tr.className = 'cbi-section-table-row';
15 var td = tr.insertCell(-
1);
17 td.innerHTML = '
<em><br /><%:Some problem with JSON: lenght of originators and descriptions different. %
></em>';
21 if ( originators && descriptions && tb)
24 while( tb.rows.length
> 1 )
27 for( var i =
0; i < descriptions.length; i++ )
29 var tr = tb.insertRow(-
1);
30 tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i %
2) +
1);
31 tr.insertCell(-
1).innerHTML = descriptions[i].DESC_ADV.globalId.replace(/\.[^\.]+$/,
"");
33 var extensions = descriptions[i].DESC_ADV.extensions;
35 //Looking for the extensions
37 for( var e =
0; e < extensions.length; e++)
39 if( extensions[e].HNA6_EXTENSION )
41 hna6 = extensions[e].HNA6_EXTENSION;
46 //Adding first HNA with prefix=
128 as main address
51 for( var e =
0; e < hna6.length; e++ )
53 address = hna6[e].address;
54 prefix = hna6[e].prefixlen;
55 if ( prefix == '
128' )
62 tr.insertCell(-
1).innerHTML = ipstxt;
64 tr.insertCell(-
1).innerHTML = originators[i].viaDev;
65 tr.insertCell(-
1).innerHTML = originators[i].metric;
66 tr.insertCell(-
1).innerHTML = originators[i].lastDesc;
67 tr.insertCell(-
1).innerHTML = originators[i].lastRef;
68 tr.insertCell(-
1).innerHTML = originators[i].blocked;
72 if( tb.rows.length ==
1 )
74 var tr = tb.insertRow(-
1);
75 tr.className = 'cbi-section-table-row';
77 var td = tr.insertCell(-
1);
79 td.innerHTML = '
<em><br /><%:There are no nodes available.%
></em>';
88 <fieldset class=
"cbi-section">
89 <legend><%:Mesh nodes%
></legend>
90 <table class=
"cbi-section-table" id=
"descriptions_table">
91 <tr class=
"cbi-section-table-titles">
92 <th class=
"cbi-section-table-cell"><%:Hostname%
></th>
93 <th class=
"cbi-section-table-cell"><%:Primary IP%
></th>
94 <th class=
"cbi-section-table-cell"><%:Via Device%
></th>
95 <th class=
"cbi-section-table-cell"><%:Metric%
></th>
96 <th class=
"cbi-section-table-cell"><%:Last Desc%
></th>
97 <th class=
"cbi-section-table-cell"><%:Last Ref%
></th>
98 <th class=
"cbi-section-table-cell"><%:Blocked%
></th>
100 <tr class=
"cbi-section-table-row">
101 <td colspan=
"7"><em><br /><%:Collecting data...%
></em></td>