<%# 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%>

<%:olsrd_routes%>

<%:olsrd_routes_desc%>


<% 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 %>
<%:olsrd_network%> <%:olsrd_gateway%> <%:interface%> <%:metric%> ETX
<%=route.Destination%> <%=route["Gateway IP"]%> <%=route.Interface%> <%=route.Metric%> <%=string.format("%.3f", tonumber(route.ETX) or 0)%>

<%+footer%>