Split up admin-core into admin-core and admin-full, preparing admin-mini
[project/luci.git] / modules / admin-full / luasrc / view / admin_status / 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 <h1><%:routes%></h1>
17
18 <br />
19 <table cellspacing="0" cellpadding="6" class="smalltext">
20 <tr>
21 <th><%:target%></th>
22 <th><%:routes_netmask%></th>
23 <th><%:routes_gateway%></th>
24 <th><%:routes_metric%></th>
25 <th><%:interface%></th>
26 </tr>
27 <%
28 local routes = luci.sys.net.routes()
29
30 for i, r in pairs(routes) do
31 %>
32 <tr>
33 <td><%=luci.sys.net.hexip4(r.Destination)%></td>
34 <td><%=luci.sys.net.hexip4(r.Mask)%></td>
35 <td><%=luci.sys.net.hexip4(r.Gateway)%></td>
36 <td><%=r.Metric%></td>
37 <td><%=r.Iface%></td>
38 </tr>
39 <% end %>
40 </table>
41 <br />
42 <%+footer%>