Developing lightweight computation at the DSG edge

Commit 41a215b2 authored by Simó Albert i Beltran's avatar Simó Albert i Beltran
Browse files

sed -i -e 's/\s\+$//g' packages/bmx6-luci/files/usr/lib/lua/luci/view/bmx6/neighbours_j.htm

parent 064a718f
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
td.innerHTML += '<em><%: Please perform a manually cache flush from a terminal: bmx6 -c --flushAll %></em>' td.innerHTML += '<em><%: Please perform a manually cache flush from a terminal: bmx6 -c --flushAll %></em>'
return 1; return 1;
} }
if ( originators && descriptions && tb) if ( originators && descriptions && tb)
{ {
/* clear all rows */ /* clear all rows */
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
tr.insertCell(-1).innerHTML = '<a onclick="displayExtraInfo(\'ip-'+i+'\')"><img src=\"<%=resource%>/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; tr.insertCell(-1).innerHTML = nodename;
var extensions = descriptions[i].DESC_ADV.extensions; var extensions = descriptions[i].DESC_ADV.extensions;
//Looking for the extensions //Looking for the extensions
...@@ -55,17 +55,17 @@ ...@@ -55,17 +55,17 @@
tun4in6 = extensions[e].TUN4IN6_NET_EXTENSION; tun4in6 = extensions[e].TUN4IN6_NET_EXTENSION;
} }
} }
var gateways = '<ul>'; var gateways = '<ul>';
for ( var t = 0; t < tun4in6.length; t++) for ( var t = 0; t < tun4in6.length; t++)
{ {
if ( tun4in6[t].networklen == "32" ) if ( tun4in6[t].networklen == "32" )
gateways += '<li><a href="http://' + tun4in6[t].network + '">' + tun4in6[t].network + '</a></li>'; gateways += '<li><a href="http://' + tun4in6[t].network + '">' + tun4in6[t].network + '</a></li>';
else else
gateways += "<li>"+tun4in6[t].network+'/'+tun4in6[t].networklen + ' | ' + tun4in6[t].bandwidth+'</li>'; gateways += "<li>"+tun4in6[t].network+'/'+tun4in6[t].networklen + ' | ' + tun4in6[t].bandwidth+'</li>';
} }
gateways += '</ul>'; gateways += '</ul>';
//Adding HNAs with prefix=128 as main address //Adding HNAs with prefix=128 as main address
var ipstxt = ''; var ipstxt = '';
var address; var address;
...@@ -79,38 +79,38 @@ ...@@ -79,38 +79,38 @@
prefix = hna6[e].prefixlen; prefix = hna6[e].prefixlen;
if ( prefix == '128' ) if ( prefix == '128' )
{ {
if (first) if (first)
{ {
ipstxt += address; ipstxt += address;
ipstxt_hidden += '<li><a href="http://['+address+']" >'+address+"</a></li>"; ipstxt_hidden += '<li><a href="http://['+address+']" >'+address+"</a></li>";
first = 0; first = 0;
} }
else { else {
ipstxt_hidden += '<li><a href="http://['+address+']" >'+address+"</a></li>"; ipstxt_hidden += '<li><a href="http://['+address+']" >'+address+"</a></li>";
} }
} }
else { else {
hna6list += '<li>'+address+'/'+prefix+'</li>'; hna6list += '<li>'+address+'/'+prefix+'</li>';
} }
} }
hna6list += '</ul>'; hna6list += '</ul>';
ipstxt_hidden += '</ul>'; ipstxt_hidden += '</ul>';
tr.insertCell(-1).innerHTML = ipstxt; tr.insertCell(-1).innerHTML = ipstxt;
tr.insertCell(-1).innerHTML = originators[i].viaDev; tr.insertCell(-1).innerHTML = originators[i].viaDev;
tr.insertCell(-1).innerHTML = originators[i].metric; tr.insertCell(-1).innerHTML = originators[i].metric;
tr.insertCell(-1).innerHTML = originators[i].lastDesc; tr.insertCell(-1).innerHTML = originators[i].lastDesc;
tr.insertCell(-1).innerHTML = originators[i].lastRef; tr.insertCell(-1).innerHTML = originators[i].lastRef;
tr.insertCell(-1).innerHTML = originators[i].blocked; tr.insertCell(-1).innerHTML = originators[i].blocked;
//tr.onclick = displayExtraInfo("ip-"+i); //tr.onclick = displayExtraInfo("ip-"+i);
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 = '<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>"; extrainfo += "\n</div>";
tr.insertCell(-1).innerHTML = extrainfo; tr.insertCell(-1).innerHTML = extrainfo;
} }
if( tb.rows.length == 1 ) if( tb.rows.length == 1 )
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
div.hideme{ div.hideme{
display: none; display: none;
} }
div.info{ div.info{
background: #FFF; background: #FFF;
border: solid 1px; border: solid 1px;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment