From 38aa51a39141af9432a957579dffc0e6932c63c9 Mon Sep 17 00:00:00 2001 From: Patrick Grimm Date: Tue, 2 Jul 2013 22:31:04 +0000 Subject: luci-olsr: add interface and wifi stats to public olsr-neighb site --- .../luasrc/view/status-olsr/neighbors.htm | 52 +++++++++++++--------- 1 file changed, 30 insertions(+), 22 deletions(-) (limited to 'applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm') diff --git a/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm b/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm index 4d84241fb..ab61fb5b4 100644 --- a/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm +++ b/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm @@ -3,7 +3,7 @@ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth Copyright 2008 Jo-Philipp Wich Copyright 2011 Manuel Munz - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -31,11 +31,17 @@ 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), cost = string.format("%.3f", link.linkCost), + snr = string.format("%.3f", link.snr), + signal = string.format("%.3f", link.signal), + noise = string.format("%.3f", link.noise), color = color, dfgcolor = defaultgw_color, proto = link.proto @@ -66,36 +72,36 @@ end if (neigh.proto == '6') { s += String.format( '' + - '%s', - neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip + '%s/%s', + neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip, neigh.rmac ); } else { s += String.format( '' + - '%s', - neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip + '%s/%s', + neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip, neigh.rmac ); } if (neigh.hn) { - s += String.format( - '%s', + s += String.format( + '%s' + neigh.dfgcolor, neigh.hn, neigh.hn ); } else { s += String.format( - '?', + '?', neigh.dfgcolor ); } s += String.format( - '%s' + - '%s' + - '%s' + - '%s' + - '', - - neigh.dfgcolor, neigh.lip, neigh.dfgcolor, neigh.lq, neigh.dfgcolor, neigh.nlq, neigh.color, neigh.cost || '?' + '%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.color, neigh.signal, neigh.noise, neigh.snr || '?' ); } @@ -122,6 +128,7 @@ end LQ NLQ ETX + SNR @@ -143,15 +150,16 @@ end <% if link.proto == "6" then %> - <%=link.remoteIP%> + <%=link.remoteIP%>/<%=link.remoteMAC%> <% else %> - <%=link.remoteIP%> + <%=link.remoteIP%>/<%=link.remoteMAC%> <% end %> - <%=link.hostname%> - <%=link.localIP%> - <%=string.format("%.3f", link.linkQuality)%> - <%=string.format("%.3f", link.neighborLinkQuality)%> - <%=string.format("%.3f", link.linkCost)%> + <%=link.hostname%> + <%=link.interface%>/<%=link.localIP%>/<%=link.localMAC%> + <%=string.format("%.3f", link.linkQuality)%> + <%=string.format("%.3f", link.neighborLinkQuality)%> + <%=string.format("%.3f", link.linkCost)%> + Noise: <%=string.format("%.3f", link.noise)%>"><%=string.format("%.3f", link.snr)%> <% i = ((i % 2) + 1) -- cgit v1.2.3