From 25c4b954a6037811ecafcf8189ab79b0f74d0aed Mon Sep 17 00:00:00 2001 From: Patrick Grimm Date: Wed, 10 Jul 2013 17:52:38 +0000 Subject: luci-olsr: add snr for olsr neighbours and update Legend --- applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm | 7 +++++-- 1 file changed, 5 insertions(+), 2 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 0fb9bc0a3c..f3b374536e 100644 --- a/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm +++ b/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm @@ -24,6 +24,7 @@ if luci.http.formvalue("status") == "1" then link.linkCost = 0 end local color = olsrtools.etx_color(link.linkCost) + local snr_color = olsrtools.snr_color(link.snr) defaultgw_color = "" if link.defaultgw == 1 then defaultgw_color = "#ffff99" @@ -43,6 +44,7 @@ if luci.http.formvalue("status") == "1" then signal = string.format("%.3f", link.signal), noise = string.format("%.3f", link.noise), color = color, + snr_color = snr_color, dfgcolor = defaultgw_color, proto = link.proto } @@ -100,7 +102,7 @@ end '%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 || '?' + 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 || '?' ); } @@ -140,6 +142,7 @@ end end color = olsrtools.etx_color(link.linkCost) + snr_color = olsrtools.snr_color(link.snr) defaultgw_color = "" if link.defaultgw == 1 then @@ -158,7 +161,7 @@ end <%=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)%> + Noise: <%=string.format("%.3f", link.noise)%>"><%=string.format("%.3f", link.snr)%> <% i = ((i % 2) + 1) -- cgit v1.2.3