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
853cdaf9
Commit
853cdaf9
authored
Oct 03, 2012
by
p4u
Browse files
Improved some mesh nodes view style
parent
0acf83d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
packages/bmx6-luci/files/usr/lib/lua/luci/view/bmx6/neighbours_j.htm
View file @
853cdaf9
...
...
@@ -23,7 +23,7 @@
td
.
innerHTML
+=
'
<em><%: Please perform a manually cache flush from a terminal: bmx6 -c --flushAll %></em>
'
return
1
;
}
if
(
originators
&&
descriptions
&&
tb
)
{
/* clear all rows */
...
...
@@ -35,9 +35,9 @@
var
tr
=
tb
.
insertRow
(
-
1
);
var
nodename
=
descriptions
[
i
].
DESC_ADV
.
globalId
.
replace
(
/
\.[^\.]
+$/
,
""
);
tr
.
className
=
'
cbi-section-table-row cbi-rowstyle-
'
+
((
i
%
2
)
+
1
);
tr
.
insertCell
(
-
1
).
innerHTML
=
'
<a onclick="displayExtraInfo(
\'
ip-
'
+
i
+
'
\'
)"><img src=
\
"
/luci-static/
resource
s
/cbi/help.gif
\
" /></a>
'
;
tr
.
insertCell
(
-
1
).
innerHTML
=
'
<a onclick="displayExtraInfo(
\'
ip-
'
+
i
+
'
\'
)"><img src=
\
"
<%=
resource
%>
/cbi/help.gif
\
" /></a>
'
;
tr
.
insertCell
(
-
1
).
innerHTML
=
nodename
;
var
extensions
=
descriptions
[
i
].
DESC_ADV
.
extensions
;
//Looking for the extensions
...
...
@@ -55,15 +55,17 @@
tun4in6
=
extensions
[
e
].
TUN4IN6_NET_EXTENSION
;
}
}
var
gateways
=
'
<ul>
'
;
for
(
var
t
=
0
;
t
<
tun4in6
.
length
;
t
++
)
{
gateways
+=
"
<li>
"
+
tun4in6
[
t
].
network
+
'
/
'
+
tun4in6
[
t
].
networklen
+
'
|
'
;
gateways
+=
tun4in6
[
t
].
bandwidth
+
'
</li>
'
;
if
(
tun4in6
[
t
].
networklen
==
"
32
"
)
gateways
+=
'
<li><a href="http://
'
+
tun4in6
[
t
].
network
+
'
">
'
+
tun4in6
[
t
].
network
+
'
</a></li>
'
;
else
gateways
+=
"
<li>
"
+
tun4in6
[
t
].
network
+
'
/
'
+
tun4in6
[
t
].
networklen
+
'
|
'
+
tun4in6
[
t
].
bandwidth
+
'
</li>
'
;
}
gateways
+=
'
</ul>
'
;
//Adding HNAs with prefix=128 as main address
var
ipstxt
=
''
;
var
address
;
...
...
@@ -77,42 +79,38 @@
prefix
=
hna6
[
e
].
prefixlen
;
if
(
prefix
==
'
128
'
)
{
if
(
first
)
if
(
first
)
{
ipstxt
+=
address
;
ipstxt_hidden
+=
'
<li><a href="http://[
'
+
address
+
'
]" >
'
+
address
+
"
</a></li>
"
;
first
=
0
;
}
}
else
{
ipstxt_hidden
+=
'
<li><a href="http://[
'
+
address
+
'
]" >
'
+
address
+
"
</a></li>
"
;
ipstxt_hidden
+=
'
<li><a href="http://[
'
+
address
+
'
]" >
'
+
address
+
"
</a></li>
"
;
}
}
else
{
hna6list
+=
'
<li>
'
+
address
+
'
/
'
+
prefix
+
'
</li>
'
;
hna6list
+=
'
<li>
'
+
address
+
'
/
'
+
prefix
+
'
</li>
'
;
}
}
hna6list
+=
'
</ul>
'
;
ipstxt_hidden
+=
'
</ul>
'
;
tr
.
insertCell
(
-
1
).
innerHTML
=
ipstxt
;
tr
.
insertCell
(
-
1
).
innerHTML
=
originators
[
i
].
viaDev
;
tr
.
insertCell
(
-
1
).
innerHTML
=
originators
[
i
].
metric
;
tr
.
insertCell
(
-
1
).
innerHTML
=
originators
[
i
].
lastDesc
;
tr
.
insertCell
(
-
1
).
innerHTML
=
originators
[
i
].
lastRef
;
tr
.
insertCell
(
-
1
).
innerHTML
=
originators
[
i
].
blocked
;
//tr.onclick = displayExtraInfo("ip-"+i);
extrainfo
=
'
<div id="ip-
'
+
i
+
'
" class="hideme">
'
;
extrainfo
+=
"
<div class='inforow'><br /><br /><h4>
"
+
nodename
+
'
</h4></div>
\n
'
;
extrainfo
+=
"
<div class='inforow'><h5>Available IPs</h5>
\n
<p>
"
+
ipstxt_hidden
+
"
</p></div>
\n
"
;
extrainfo
+=
"
<div class='inforow'><h5>Gateways announced</h5>
\n
<p>
"
+
gateways
+
"
</p></div>
\n
"
;
extrainfo
+=
"
<div class='inforow'><h5>Networks announced</h5>
\n
<p>
"
+
hna6list
+
"
</p></div>
\n
"
;
extrainfo
=
'
<div id="ip-
'
+
i
+
'
" class="hideme">
'
+
"
<div class='inforow'><br /><br /><h4>
"
+
nodename
+
'
</h4></div>
\n
'
+
"
<div class='inforow'><h5>Available IPs</h5>
\n
<p>
"
+
ipstxt_hidden
+
"
</p></div>
\n
"
+
"
<div class='inforow'><h5>Gateways announced</h5>
\n
<p>
"
+
gateways
+
"
</p></div>
\n
"
+
"
<div class='inforow'><h5>Networks announced</h5>
\n
<p>
"
+
hna6list
+
"
</p></div>
\n
"
;
extrainfo
+=
"
\n
</div>
"
;
tr
.
insertCell
(
-
1
).
innerHTML
=
extrainfo
;
}
if
(
tb
.
rows
.
length
==
1
)
...
...
@@ -134,22 +132,22 @@
div
.hideme
{
display
:
none
;
}
div
.info
{
background
:
#FFF
;
border
:
solid
1px
;
height
:
80px
;
display
:
block
;
overflow
:
auto
;
text-align
:
center
;
}
div
.inforow
{
text-align
:
left
;
text-align
:
center
;
display
:
inline-block
;
width
:
20%
;
margin
:
5px
;
vertical-align
:
top
;
}
#extra-info
ul
{
list-style
:
none
outside
none
;
margin-left
:
0em
;
}
...
...
@@ -161,7 +159,7 @@
<div
class=
"cbi-map-descr"
></div>
<div
id=
"extra-info"
class=
"info"
>
<br
/>
Click to the icon
<img
src=
"
/luci-static/
resource
s
/cbi/help.gif"
/>
to see individual node information
Click to the icon
<img
src=
"
<%=
resource
%>
/cbi/help.gif"
/>
to see individual node information
</div>
<fieldset
class=
"cbi-section"
>
<legend><
%
:Mesh
nodes
%
></legend>
...
...
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