3b705f088456d66d8836e545ecc899a5bcf29622
[project/luci.git] / applications / luci-olsr / luasrc / view / status-olsr / topology.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 <h1><%:olsr_topology%></h1>
17 <br />
18 <table class="smalltext" cellspacing="0" cellpadding="6">
19 <tr>
20 <th><%:destination%></th>
21 <th><%:olsr_lasthop%></th>
22 <th>LQ</th>
23 <th>ILQ</th>
24 <th>ETX</th>
25 </tr>
26 <% for k, route in ipairs(routes) do 
27         if route.Linkcost then
28                 route.LQ, route.ILQ, route.ETX = route.Linkcost:match("(.*)/(.*)\t(.*)")
29         end
30 %>
31 <tr>
32 <td><a href="http://<%=route["Destination IP"]%>"><%=route["Destination IP"]%></a></td>
33 <td><a href="http://<%=route["Last hop IP"]%>"><%=route["Last hop IP"]%></a></td>
34 <td><%=route.LQ%></td>
35 <td><%=route.ILQ%></td>
36 <td><%=string.format("%.3f", tonumber(route.ETX) or 0)%></td>
37 </tr>
38 <% end %>
39 </table>
40 <br />
41 <%+footer%>