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