2 Copyright (C)
2011 Pau Escrich
<pau@dabax.net
>
3 Contributors Lluis Esquerda
<eskerda@gmail.com
>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version
2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA
02110-
1301 USA.
19 The full GNU General Public License is included in this distribution in
20 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>
29 <h2>Gateway announcements
</h2>
30 <div class=
"cbi-map-descr">Networks announced by mesh nodes
</div>
32 <div class=
"cbi-section">
33 <legend><%:Announcements%
></legend>
34 <div class=
"cbi-section-node">
35 <div class=
"table" id=
"tunnels_div">
36 <div class=
"tr table-titles">
37 <div class=
"th"><%:Status%
></div>
38 <div class=
"th"><%:Name%
></div>
39 <div class=
"th"><%:Node%
></div>
40 <div class=
"th"><%:Network%
></div>
41 <div class=
"th"><%:Bandwith%
></div>
42 <div class=
"th"><%:Local net%
></div>
43 <div class=
"th"><%:Path Metric%
></div>
44 <div class=
"th"><%:Tun Metric%
></div>
45 <div class=
"th"><%:Rating%
></div>
53 <script type=
"text/javascript">//<![CDATA[
54 new TablePooler(
5,
"/cgi-bin/bmx7-info", {'$tunnels':''},
"tunnels_div", function(st){
55 var tunicon =
"<%=resource%>/icons/tunnel.png";
56 var tunicon_dis =
"<%=resource%>/icons/tunnel_disabled.png";
57 var applyicon =
"<%=resource%>/cbi/apply.gif";
59 for ( var k in st.tunnels ) {
60 var tunnel = st.tunnels[k];
61 var nodename = tunnel.remoteName;
62 var advnet = tunnel.advNet;
63 var status = '
<img src=
"'+tunicon_dis+'"/>';
64 if ( tunnel.tunName !=
"---" ) status = '
<img src=
"'+tunicon+'"/>';
65 if ( advnet ==
"0.0.0.0/0" ) advnet =
"<b>Internet IPv4</b>";
66 if ( advnet ==
"::/0" ) advnet =
"<b>Internet IPv6</b>";
67 if (nodename !=
"---") {
68 res.push([status, tunnel.tunName, nodename, advnet, tunnel.advBw, tunnel.net,
69 tunnel.pathMtc, tunnel.tunMtc, tunnel.rating]);