Rework LuCI build system
[project/luci.git] / applications / luci-app-olsr / luasrc / view / status-olsr / interfaces.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 Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11         http://www.apache.org/licenses/LICENSE-2.0
12
13 -%>
14
15 <%
16 local i = 1
17 %>
18
19 <%+header%>
20
21 <h2><a id="content" name="content"><%:Interfaces%></a></h2>
22
23 <div id="togglebuttons"></div>
24
25 <fieldset class="cbi-section">
26         <legend><%:Overview of interfaces where OLSR is running%></legend>
27
28         <table class="cbi-section-table">
29                 <tr>
30                         <th class="cbi-section-table-cell"><%:Interface%></th>
31                         <th class="cbi-section-table-cell"><%:State%></th>
32                         <th class="cbi-section-table-cell"><%:MTU%></th>
33                         <th class="cbi-section-table-cell"><%:WLAN%></th>
34                         <th class="cbi-section-table-cell"><%:Source address%></th>
35                         <th class="cbi-section-table-cell"><%:Netmask%></th>
36                         <th class="cbi-section-table-cell"><%:Broadcast address%></th>
37                 </tr>
38
39                 <% for k, iface in ipairs(iface) do %>
40
41                 <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=iface.proto%>">
42                         <td class="cbi-section-table-cell"><%=iface.name%></td>
43                         <td class="cbi-section-table-cell"><%=iface.state%></td>
44                         <td class="cbi-section-table-cell"><%=iface.olsrMTU%></td>
45                         <td class="cbi-section-table-cell"><%=iface.wireless and luci.i18n.translate('yes') or luci.i18n.translate('no')%></td>
46                         <td class="cbi-section-table-cell"><%=iface.ipv4Address or iface.ipv6Address%></td>
47                         <td class="cbi-section-table-cell"><%=iface.netmask%></td>
48                         <td class="cbi-section-table-cell"><%=iface.broadcast or iface.multicast%></td>
49                 </tr>
50                 <% i = ((i % 2) + 1)
51                 end %>
52         </table>
53 </fieldset>
54 <%+status-olsr/common_js%>
55 <%+footer%>
56
57