<%# LuCI - Lua Configuration Interface Copyright 2008 Steven Barth Copyright 2008 Jo-Philipp Wich 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$ -%> <%+header%>

<%:Known OLSR routes%>

<%:Overview of currently known routes to other OLSR nodes%>


<% for k, route in ipairs(routes) do local color = "#bb3333" route.ETX = tonumber(route.ETX) if route.ETX == 0 then color = "#bb3333" elseif route.ETX < 4 then color = "#00cc00" elseif route.ETX < 10 then color = "#ffcb05" elseif route.ETX < 100 then color = "#ff6600" end %> <% end %>
<%:Announced network%> <%:OLSR gateway%> <%:Interface%> <%:Metric%> ETX
<%=route.Destination%> /cgi-bin-status.html"><%=route["Gateway IP"]%> <% if route.Hostname then %> / <%=route.Hostname%> <% end %> <%=route.Interface%> <%=route.Metric%> <%=string.format("%.3f", tonumber(route.ETX) or 0)%>

<%+footer%>