From f13dd6c0523aec82879fb85f4d2fc1851340b563 Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Sat, 1 Dec 2012 00:07:33 +0000 Subject: [PATCH] applications/luci-olsr: sync colors with map, add legend --- applications/luci-olsr/luasrc/tools/olsr.lua | 6 +++--- .../luci-olsr/luasrc/view/status-olsr/neighbors.htm | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/applications/luci-olsr/luasrc/tools/olsr.lua b/applications/luci-olsr/luasrc/tools/olsr.lua index 45501020a..425d09a31 100644 --- a/applications/luci-olsr/luasrc/tools/olsr.lua +++ b/applications/luci-olsr/luasrc/tools/olsr.lua @@ -16,11 +16,11 @@ function etx_color(etx) local color = "#bb3333" if etx == 0 then color = "#bb3333" - elseif etx < 4 then + elseif etx < 2 then color = "#00cc00" - elseif etx < 10 then + elseif etx < 4 then color = "#ffcb05" - elseif etx < 100 then + elseif etx < 10 then color = "#ff6600" end return color diff --git a/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm b/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm index 029f58547..669ddc20c 100644 --- a/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm +++ b/applications/luci-olsr/luasrc/view/status-olsr/neighbors.htm @@ -147,6 +147,10 @@ end
  • LQ: <%:Success rate of packages received from the neighbour%>
  • NLQ: <%:Success rate of packages sent to the neighbour%>
  • ETX: <%:Expected retransmission count%>
  • +
  • <%:Green%>:<%:Very good (ETX < 2)%>
  • +
  • <%:Yellow%>:<%:Good (2 < ETX < 4)%>
  • +
  • <%:Orange%>:<%:Still usable (4 < ETX < 10)%>
  • +
  • <%:Red%>:<%:Bad (ETX > 10)%>
  • <%+footer%> -- 2.25.1