<%# Copyright 2008 Steven Barth Copyright 2008 Jo-Philipp Wich Copyright 2011 Manuel Munz Licensed to the public under the Apache License 2.0. -%> <% local i = 1 local olsrtools = require "luci.tools.olsr" %> <%+header%>

<%:Active OLSR nodes%>

<%:Overview of currently known OLSR nodes%> <% for k, route in ipairs(routes) do local cost = string.format("%.3f", tonumber(route.tcEdgeCost/1024) or 0) local color = olsrtools.etx_color(tonumber(cost)) local lq = string.format("%.3f", tonumber(route.linkQuality) or 0) local nlq = string.format("%.3f", tonumber(route.neighborLinkQuality) or 0) %> <% if route.proto == "6" then %> <% else %> <%end%> <% i = ((i % 2) + 1) end %>
<%:OLSR node%> <%:Last hop%> <%:LQ%> <%:NLQ%> <%:ETX%>
<%=route.destinationIP%> <%=route.lastHopIP%><%=route.destinationIP%> <%=route.lastHopIP%><%=lq%> <%=nlq%> <%=cost%>
<%+status-olsr/legend%>
<%+status-olsr/common_js%> <%+footer%>