* Minor bugfixes
[project/luci.git] / module / public-core / src / view / public_status / routes.htm
1 <%+header%>
2 <h1><%:routes Routen%></h1>
3
4 <br />
5 <table cellspacing="0" cellpadding="6" class="smalltext">
6 <tr>
7 <th><%:target Ziel%></th>
8 <th><%:netmask Netzmaske%></th>
9 <th><%:gateway Gateway%></th>
10 <th><%:metric Metrik%></th>
11 <th><%:iface Schnittstelle%></th>
12 </tr>
13 <%
14 local routes = ffluci.sys.net.routes()
15
16 -- UGLY hack is UGLY
17 if routes[1] and routes[1].Gateway:sub(-2) == "00" then
18         local be = true
19 else
20         local be = false
21 end
22
23 for i, r in pairs(routes) do
24 %>
25 <tr>
26 <td><%=ffluci.sys.net.hexip4(r.Destination, be)%></td>
27 <td><%=ffluci.sys.net.hexip4(r.Mask, be)%></td>
28 <td><%=ffluci.sys.net.hexip4(r.Gateway, be)%></td>
29 <td><%=r.Metric%></td>
30 <td><%=r.Iface%></td>
31 </tr>
32 <% end %>
33 </table>
34 <br />
35 <%+footer%>