2 Copyright ©
2011 Pau Escrich
<pau@dabax.net
>
3 Contributors Lluis Esquerda
<eskerda@gmail.com
>
4 Roger Pueyo Centelles
<roger.pueyo@guifi.net
>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version
2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License along
17 with this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA
02110-
1301 USA.
20 The full GNU General Public License is included in this distribution in
21 the file called
"COPYING".
25 <script type=
"text/javascript" src=
"<%=resource%>/cbi.js"></script>
26 <script type=
"text/javascript" src=
"<%=resource%>/bmx7/js/polling.js"></script>
57 text-decoration: underline;
60 #extra-info ul { list-style: none outside none; margin-left:
0em; }
66 <div class=
"cbi-map-descr"></div>
67 <div id=
"extra-info" class=
"info">
70 Tip: click the
<img src=
"<%=resource%>/bmx7/world.png" /> icon to see individual node information.
73 <fieldset class=
"cbi-section">
74 <legend><%:Originators%
></legend>
75 <table class=
"cbi-section-table" id=
"descriptions_table">
76 <tr class=
"cbi-section-table-titles">
77 <th class=
"cbi-section-table-cell"></th>
78 <th class=
"cbi-section-table-cell"><%:Name%
></th>
79 <th class=
"cbi-section-table-cell"><%:Short ID%
></th>
80 <th class=
"cbi-section-table-cell"><%:S/s/T/t%
></th>
81 <th class=
"cbi-section-table-cell"><%:Primary IPv6 address%
></th>
82 <th class=
"cbi-section-table-cell"><%:Via neighbour%
></th>
83 <th class=
"cbi-section-table-cell"><%:Metric%
></th>
84 <th class=
"cbi-section-table-cell"><%:Last desc.%
></th>
85 <th class=
"cbi-section-table-cell"><%:Last ref.%
></th>
86 <th class=
"cbi-section-table-cell"><%: %
></th>
88 <tr class=
"cbi-section-table-row">
89 <td colspan=
"11"><br /><center><em><%:Collecting data...%
></em></center></td>
96 <script type=
"text/javascript">//<![CDATA[
97 var displayExtraInfo = function ( id ) {
99 document.getElementById('extra-info').innerHTML = document.getElementById(id).innerHTML;
102 new TablePooler(
5,
"/cgi-bin/bmx7-info", {'$originators':''},
"descriptions_table", function(st){
103 var infoicon =
"<%=resource%>/bmx7/world_small.png";
104 var originators = st.originators;
107 originators.forEach(function(originator,i){
108 var name = originator.name;
109 var shortId = originator.shortId;
110 var nodeId = originator.nodeId;
111 var extensions = originator.name;
112 var SsTt = originator.S+'/'+originator.s+'/'+originator.T+'/'+originator.t;
113 var nodeKey = originator.nodeKey;
114 var descSize = originator.descSize;
115 var primaryIp = originator.primaryIp;
116 var nbName = originator.nbName;
117 var dev = originator.dev;
118 var nbLocalIp = originator.nbLocalIp;
119 var metric = originator.metric;
120 var lastDesc = originator.lastDesc;
121 var lastRef = originator.lastRef;
123 var extrainfo = '
<a onclick=
"displayExtraInfo(\'ip-' + i + '\')"><img src=
"' + infoicon + '" /
></a>';
124 var extrainfo_link = '
<a onclick=
"displayExtraInfo(\'ip-' + i + '\')">' + '
<img src=
"' + infoicon + '" />' + '
</a>';
126 extrainfo = '
<div id=
"ip-'+ i +'" class=
"hideme">'
128 +
"<div class='inforow'>"
129 +
"<h4><u>" + name + '
</u></h4>\n'
130 + 'Node ID: ' + nodeId +
"</div>"
132 +
"<div class='inforow'>"
133 +
"<h5>Primary IPv6 address</h5>\n"
134 + primaryIp +
"</div>\n"
136 +
"<div class='inforow'>"
137 +
"<h5>Support & Trust</h5>\n"
140 +
"<div class='inforow'>"
141 +
"<h5>Node key</h5>\n"
142 + nodeKey +
"</div>\n"
144 +
"<div class='inforow newline'>"
145 +
"<h5>Via neighbour</h5>\n"
146 + nbName +
"</div>\n"
148 +
"<div class='inforow'>"
149 +
"<h5>Via device</h5>\n"
152 +
"<div class='inforow'>"
153 +
"<h5>Via remote link-local IPv6 address</h5>\n"
154 + nbLocalIp +
"</div>\n"
156 +
"<div class='inforow'>"
157 +
"<h5>Route metric</h5>\n"
158 + metric +
"</div>\n"
160 +
"<div class='inforow'>"
161 +
"<h5>Desc. size</h5>\n"
162 + descSize +
"</div>\n"
166 res.push([extrainfo_link, name, shortId, SsTt, primaryIp,
167 nbName, metric, lastDesc, lastRef, extrainfo]);