2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
16 <h2><a id="content" name="content"><%:Known OLSR routes%></a></h2>
17 <p><%:Overview of currently known routes to other OLSR nodes%></p>
19 <table class="smalltext" cellspacing="0" cellpadding="6">
21 <th><%:Announced network%></th>
22 <th><%:OLSR gateway%></th>
23 <th><%:Interface%></th>
27 <% for k, route in ipairs(routes) do
28 local color = "#bb3333"
30 route.ETX = tonumber(route.ETX)
31 if route.ETX == 0 then
33 elseif route.ETX < 4 then
35 elseif route.ETX < 10 then
37 elseif route.ETX < 100 then
42 <td><%=route.Destination%></td>
43 <td><%=route["Gateway IP"]%></td>
44 <td><%=route.Interface%></td>
45 <td><%=route.Metric%></td>
46 <td style="background-color:<%=color%>"><%=string.format("%.3f", tonumber(route.ETX) or 0)%></td>