156a0336fce77f9a3aec905cfb390780a270a8fa
[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 local be = (routes[1] and routes[1].Mask:sub(-2) == "00")
18
19 for i, r in pairs(routes) do
20 %>
21 <tr>
22 <td><%=ffluci.sys.net.hexip4(r.Destination, be)%></td>
23 <td><%=ffluci.sys.net.hexip4(r.Mask, be)%></td>
24 <td><%=ffluci.sys.net.hexip4(r.Gateway, be)%></td>
25 <td><%=r.Metric%></td>
26 <td><%=r.Iface%></td>
27 </tr>
28 <% end %>
29 </table>
30 <br />
31 <%+footer%>