From 2eb088f0845db8eeed285ec6a756361aae9dc8e3 Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Thu, 1 Aug 2013 21:53:58 +0000 Subject: applications/olsr: Remove macs from olsr neighbors page; show '?' for SNR when no info is available; use a seperate column for local interface --- .../luasrc/view/status-olsr/neighbors.htm | 27 +++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'applications/luci-olsr/luasrc/view/status-olsr') diff --git a/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm b/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm index 176457d71c..daa52831f6 100644 --- a/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm +++ b/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm @@ -32,10 +32,8 @@ if luci.http.formvalue("status") == "1" then rv[#rv+1] = { rip = link.remoteIP, - rmac = link.remoteMAC, hn = link.hostname, lip = link.localIP, - lmac = link.localMAC, ifn = link.interface, lq = string.format("%.3f", link.linkQuality), nlq = string.format("%.3f",link.neighborLinkQuality), @@ -74,14 +72,14 @@ end if (neigh.proto == '6') { s += String.format( '' + - '%s/%s', - neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip, neigh.rmac + '%s', + neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip ); } else { s += String.format( '' + - '%s/%s', - neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip, neigh.rmac + '%s', + neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip ); } if (neigh.hn) { @@ -96,13 +94,14 @@ end ); } s += String.format( - '%s/%s/%s' + + '%s' + + '%s' + '%s' + '%s' + '%s' + '%s' + '', - neigh.dfgcolor, neigh.ifn, neigh.lip, neigh.lmac, neigh.dfgcolor, neigh.lq, neigh.dfgcolor, neigh.nlq, neigh.color, neigh.cost, neigh.snr_color, neigh.signal, neigh.noise, neigh.snr || '?' + neigh.dfgcolor, neigh.ifn, neigh.dfgcolor, neigh.lip, neigh.dfgcolor, neigh.lq, neigh.dfgcolor, neigh.nlq, neigh.color, neigh.cost, neigh.snr_color, neigh.signal, neigh.noise, neigh.snr || '?' ); } @@ -125,6 +124,7 @@ end <%:Neighbour IP%> <%:Hostname%> + <%:Interface%> <%:Local interface IP%> LQ NLQ @@ -144,6 +144,10 @@ end color = olsrtools.etx_color(link.linkCost) snr_color = olsrtools.snr_color(link.snr) + if link.snr == 0 then + link.snr = '?' + end + defaultgw_color = "" if link.defaultgw == 1 then defaultgw_color = "#ffff99" @@ -152,12 +156,13 @@ end <% if link.proto == "6" then %> - <%=link.remoteIP%>/<%=link.remoteMAC%> + <%=link.remoteIP%> <% else %> - <%=link.remoteIP%>/<%=link.remoteMAC%> + <%=link.remoteIP%> <% end %> <%=link.hostname%> - <%=link.interface%>/<%=link.localIP%>/<%=link.localMAC%> + <%=link.interface%> + <%=link.localIP%> <%=string.format("%.3f", link.linkQuality)%> <%=string.format("%.3f", link.neighborLinkQuality)%> <%=string.format("%.3f", link.linkCost)%> -- cgit v1.2.3