Developing lightweight computation at the DSG edge
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Quick Mesh Project
qMp packages
Commits
0e9c8fe8
Commit
0e9c8fe8
authored
Oct 03, 2012
by
p4u
Browse files
Added new section to see network gateways
parent
853cdaf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
packages/bmx6-luci/files/usr/lib/lua/luci/view/bmx6/gateways_j.htm
0 → 100644
View file @
0e9c8fe8
<
%+
header
%
>
<script
type=
"text/javascript"
src=
"<%=resource%>/cbi.js"
></script>
<script
type=
"text/javascript"
>
//
<!
[
CDATA
[
var
displayExtraInfo
=
function
(
id
)
{
document
.
getElementById
(
'
extra-info
'
).
innerHTML
=
document
.
getElementById
(
id
).
innerHTML
;
}
XHR
.
poll
(
5
,
'
/cgi-bin/bmx6-info
'
,
{
'
descriptions/all
'
:
''
},
function
(
x
,
st
)
{
var
tb
=
document
.
getElementById
(
'
descriptions_table
'
);
var
rowcount
=
0
;
var
tunicon
=
"
<%=resource%>/icons/tunnel.png
"
;
/* clear all rows */
while
(
tb
.
rows
.
length
>
1
)
tb
.
deleteRow
(
1
);
for
(
var
k
in
st
)
{
var
description
=
st
[
k
].
DESC_ADV
;
var
tun4in6
;
for
(
var
k
in
description
.
extensions
)
{
var
value
=
description
.
extensions
[
k
];
if
(
value
.
TUN4IN6_NET_EXTENSION
)
{
tun4in6
=
value
.
TUN4IN6_NET_EXTENSION
;
break
;
}
}
if
(
tun4in6
)
{
var
nodename
=
description
.
globalId
.
replace
(
/
\.
.+$/
,
''
);
for
(
var
i
=
0
;
i
<
tun4in6
.
length
;
i
++
)
{
var
tr
=
tb
.
insertRow
(
-
1
);
var
network
=
tun4in6
[
i
].
network
;
var
network_len
=
tun4in6
[
i
].
networklen
;
var
network_bw
=
tun4in6
[
i
].
bandwidth
;
if
(
network_len
>=
32
)
continue
;
tr
.
className
=
'
cbi-section-table-row cbi-rowstyle-
'
+
((
rowcount
++
%
2
)
+
1
);
tr
.
insertCell
(
-
1
).
innerHTML
=
String
.
format
(
'
<a href="/cgi-bin/bmx6control?function=gwselect&node=%s"><img src="%s" /></a>
'
,
nodename
,
tunicon
);
tr
.
insertCell
(
-
1
).
innerHTML
=
nodename
;
tr
.
insertCell
(
-
1
).
innerHTML
=
network
+
'
/
'
+
network_len
;
tr
.
insertCell
(
-
1
).
innerHTML
=
network_bw
;
}
if
(
tb
.
rows
.
length
==
1
)
{
var
tr
=
tb
.
insertRow
(
-
1
);
tr
.
className
=
'
cbi-section-table-row
'
;
var
td
=
tr
.
insertCell
(
-
1
);
td
.
colSpan
=
4
;
td
.
innerHTML
=
'
<em><br /><%:There are no gateways announced in the network.%></em>
'
;
}
}
}
}
);
//]]>
</script>
<style>
div
.hideme
{
display
:
none
;
}
div
.info
{
background
:
#FFF
;
border
:
solid
1px
;
height
:
80px
;
display
:
block
;
overflow
:
auto
;
}
div
.inforow
{
text-align
:
left
;
display
:
inline-block
;
width
:
20%
;
margin
:
5px
;
vertical-align
:
top
;
}
#extra-info
ul
{
list-style
:
none
outside
none
;
margin-left
:
0em
;
}
</style>
<div
class=
"cbi-map"
>
<h2>
Originators
</h2>
<div
class=
"cbi-map-descr"
></div>
<fieldset
class=
"cbi-section"
>
<legend><
%
:Mesh
gateways
%
></legend>
<table
class=
"cbi-section-table"
id=
"descriptions_table"
>
<tr
class=
"cbi-section-table-titles"
>
<th
class=
"cbi-section-table-cell"
></th>
<th
class=
"cbi-section-table-cell"
><
%
:Node
%
></th>
<th
class=
"cbi-section-table-cell"
><
%
:Network
%
></th>
<th
class=
"cbi-section-table-cell"
><
%
:Bandwidth
%
></th>
</tr>
<tr
class=
"cbi-section-table-row"
>
<td
colspan=
"4"
><em><br
/><
%
:Collecting
data...
%
></em></td>
</tr>
</table>
</fieldset>
</div>
<
%+
footer
%
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment