summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm
diff options
context:
space:
mode:
authorPatrick Grimm <patrick@lunatiki.de>2013-07-10 17:52:38 +0000
committerPatrick Grimm <patrick@lunatiki.de>2013-07-10 17:52:38 +0000
commit25c4b954a6037811ecafcf8189ab79b0f74d0aed (patch)
tree07a0561ba11d7f7876ca59699a8e545c800ff4de /applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm
parent46c61acd06b3c54f3d98fa809e4b9450bae04975 (diff)
luci-olsr: add snr for olsr neighbours and update Legend
Diffstat (limited to 'applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm')
-rw-r--r--applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm7
1 files changed, 5 insertions, 2 deletions
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
'<td class="cbi-section-table-titles" style="background-color:%s">%s</td>' +
'<td class="cbi-section-table-titles" style="background-color:%s" title="Signal: %s Noise: %s">%s</td>' +
'</tr>',
- 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
<td class="cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=string.format("%.3f", link.linkQuality)%></td>
<td class="cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=string.format("%.3f", link.neighborLinkQuality)%></td>
<td class="cbi-section-table-titles" style="background-color:<%=color%>"><%=string.format("%.3f", link.linkCost)%></td>
- <td class="cbi-section-table-titles" style="background-color:<%=color%>" title="Signal: <%=string.format("%.3f", link.signal)%> Noise: <%=string.format("%.3f", link.noise)%>"><%=string.format("%.3f", link.snr)%></td>
+ <td class="cbi-section-table-titles" style="background-color:<%=snr_color%>" title="Signal: <%=string.format("%.3f", link.signal)%> Noise: <%=string.format("%.3f", link.noise)%>"><%=string.format("%.3f", link.snr)%></td>
</tr>
<%
i = ((i % 2) + 1)