applications/luci-olsr: Fix rowstyle, make html valid
[project/luci.git] / applications / luci-olsr / luasrc / view / status-olsr / hna.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 $Id$
14
15 -%>
16 <%
17 local i = 1
18 %>
19
20 <%+header%>
21
22 <h2><a id="content" name="content"><%:Active host net announcements%></a></h2>
23
24 <fieldset class="cbi-section">
25         <legend><%:Overview of currently active OLSR host net announcements%></legend>
26         <table class="cbi-section-table">
27                 <tr class="cbi-section-table-titles">
28                         <th class="cbi-section-table-cell"><%:Announced network%></th>
29                         <th class="cbi-section-table-cell"><%:OLSR gateway%></th>
30                 </tr>
31
32                 <% for k, route in ipairs(routes) do %>
33
34                 <tr class="cbi-section-table-row cbi-rowstyle-<%=i%>">
35                         <td class="cbi-section-table-cell"><%=route.Destination%></td>
36                         <td class="cbi-section-table-cell">
37                                 <a href="http://<%=route.Gateway%>/cgi-bin-status.html"><%=route.Gateway%></a>
38                                 <% if route.Hostname then %>
39                                         / <a href="http://<%=route.Hostname%>/cgi-bin-status.html"><%=route.Hostname%></a>
40                                 <% end %>
41                         </td>
42                 </tr>
43
44                 <% i = ((i % 2) + 1)
45                 end %>
46         </table>
47 </fieldset>
48 <%+footer%>