all: change most translate statements to new format, some need manual cleanup
[project/luci.git] / applications / luci-olsr / luasrc / view / status-olsr / routes.htm
1 <%#
2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
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
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 -%>
15 <%+header%>
16 <h2><a id="content" name="content"><%:Known OLSR routes%></a></h2>
17 <p><%:Overview of currently known routes to other OLSR nodes%></p>
18 <br />
19 <table class="smalltext" cellspacing="0" cellpadding="6">
20 <tr>
21 <th><%:Announced network%></th>
22 <th><%:OLSR gateway%></th>
23 <th><%:Interface%></th>
24 <th><%:Metric%></th>
25 <th>ETX</th>
26 </tr>
27 <% for k, route in ipairs(routes) do
28         local color = "#bb3333"
29
30         route.ETX = tonumber(route.ETX)
31         if route.ETX == 0 then
32                 color = "#bb3333"
33         elseif route.ETX < 4 then
34                 color = "#00cc00"
35         elseif route.ETX < 10 then
36                 color = "#ffcb05"
37         elseif route.ETX < 100 then
38                 color = "#ff6600"
39         end
40 %>
41 <tr>
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>
47 </tr>
48 <% end %>
49 </table>
50 <br />
51 <%+footer%>