<%# 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 http://www.apache.org/licenses/LICENSE-2.0 $Id$ -%> <% 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.Cost) or 0) local color = olsrtools.etx_color(tonumber(cost)) %> <% if i == 1 then i = 0 elseif i == 0 then i = 1 end end %>
<%:OLSR node%> <%:Last hop%> <%:LQ%> <%:NLQ%> <%:ETX%>
/cgi-bin-status.html"><%=route["Dest. IP"]%> /cgi-bin-status.html"><%=route["Last hop IP"]%> <%=route.LQ%> <%=route.NLQ%> <%=cost%>
<%+footer%>