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>
52 text-decoration: underline;
54 #extra-info ul { list-style: none outside none; margin-left:
0em; }
60 <div class=
"cbi-map-descr"></div>
61 <div id=
"extra-info" class=
"info">
64 Tip: click the
<img src=
"<%=resource%>/bmx7/world.png" /> icon to see individual node information.
69 <div class=
"cbi-section">
70 <legend><%:Originators%
></legend>
71 <div class=
"cbi-section-node">
72 <div class=
"table" id=
"nodes_div">
73 <div class=
"tr table-titles">
74 <div class=
"th"></div>
75 <div class=
"th"><%:Name%
></div>
76 <div class=
"th"><%:Short ID%
></div>
77 <div class=
"th"><%:S/s/T/t%
></div>
78 <div class=
"th"><%:Primary IPv6%
></div>
79 <div class=
"th"><%:Via Neighbour%
></div>
80 <div class=
"th"><%:Metric%
></div>
81 <div class=
"th"><%:Last Desc%
></div>
82 <div class=
"th"><%:Last Ref%
></div>
83 <div class=
"th"><%: %
></div>
91 <script type=
"text/javascript">//<![CDATA[
92 var displayExtraInfo = function ( id ) {
93 document.getElementById('extra-info').innerHTML = document.getElementById(id).innerHTML;
95 new TablePooler(
5,
"/cgi-bin/bmx7-info", {'$originators':''},
"nodes_div", function(st){
96 var infoicon =
"<%=resource%>/bmx7/world_small.png";
97 var originators = st.originators;
99 originators.forEach(function(originator,i){
100 var name = originator.name;
101 var shortId = originator.shortId;
102 var nodeId = originator.nodeId;
103 var extensions = originator.name;
104 var SsTt = originator.S+'/'+originator.s+'/'+originator.T+'/'+originator.t;
105 var nodeKey = originator.nodeKey;
106 var descSize = originator.descSize;
107 var primaryIp = originator.primaryIp;
108 var nbName = originator.nbName;
109 var dev = originator.dev;
110 var nbLocalIp = originator.nbLocalIp;
111 var metric = originator.metric;
112 var lastDesc = originator.lastDesc;
113 var lastRef = originator.lastRef;
115 var extrainfo = '
<a onclick=
"displayExtraInfo(\'ip-' + i + '\')"><img src=
"' + infoicon + '" /
></a>';
116 var extrainfo_link = '
<a onclick=
"displayExtraInfo(\'ip-' + i + '\')">' + '
<img src=
"' + infoicon + '" />' + '
</a>';
118 extrainfo = '
<div id=
"ip-'+ i +'" class=
"hideme">'
119 +
"<div class='inforow'>"
120 +
"<h4><u>" + name + '
</u></h4>\n'
121 + 'Node ID: ' + shortId +
"</div>"
122 +
"<div class='inforow'>"
123 +
"<h5>Primary IPv6 address</h5>\n"
124 + primaryIp +
"</div>\n"
125 +
"<div class='inforow'>"
126 +
"<h5>Support & Trust</h5>\n"
128 +
"<div class='inforow'>"
129 +
"<h5>Node key</h5>\n"
130 + nodeKey +
"</div>\n"
131 +
"<div class='inforow newline'>"
132 +
"<h5>Via neighbour</h5>\n"
133 + nbName +
"</div>\n"
134 +
"<div class='inforow'>"
135 +
"<h5>Via device</h5>\n"
137 +
"<div class='inforow'>"
138 +
"<h5>Via link-local IPv6</h5>\n"
139 + nbLocalIp +
"</div>\n"
140 +
"<div class='inforow'>"
141 +
"<h5>Route metric</h5>\n"
142 + metric +
"</div>\n"
143 +
"<div class='inforow'>"
144 +
"<h5>Desc. size</h5>\n"
145 + descSize +
"</div>\n"
148 res.push([extrainfo_link, name, shortId, SsTt, primaryIp,
149 nbName, metric, lastDesc, lastRef, extrainfo]);