all: automatic <%:...%> -> <%_...%> fixup
[project/luci.git] / modules / admin-full / luasrc / view / admin_status / conntrack.htm
1 <%#
2 LuCI - Lua Configuration Interface
3 Copyright 2008-2009 Steven Barth <steven@midlink.org>
4 Copyright 2008-2009 Jo-Philipp Wich <xm@subsignal.org>
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
16 <%-
17 require "luci.sys"
18 local style = true
19 -%>
20
21 <%+header%>
22
23 <div class="cbi-map" id="cbi-conntrack">
24 <h2><a id="content" name="content"><%:Active Connections%></a></h2>
25 <div class="cbi-map-descr"><%:This page gives an overview over currently active network connections.%></div>
26
27 <fieldset class="cbi-section" id="cbi-table-table">
28 <legend>ARP</legend>
29 <div class="cbi-section-node">
30 <table class="cbi-section-table">
31 <tr class="cbi-section-table-titles">
32 <th class="cbi-section-table-cell"><%_<abbr title="Internet Protocol Version 4">IPv4</abbr>-Address%></th>
33 <th class="cbi-section-table-cell"><%_<abbr title="Media Access Control">MAC</abbr>-Address%></th>
34 <th class="cbi-section-table-cell"><%:Interface%></th>
35 </tr>
36
37 <% luci.sys.net.arptable(function(e) %>
38 <tr class="cbi-section-table-row cbi-rowstyle-<%=(style and 1 or 2)%>">
39 <td class="cbi-value-field"><%=e["IP address"]%></td>
40 <td class="cbi-value-field"><%=e["HW address"]%></td>
41 <td class="cbi-value-field"><%=e["Device"]%></td>
42 </tr>
43 <% style = not style; end) %>
44 </table>
45 </div>
46 </fieldset>
47 <br />
48
49 <fieldset class="cbi-section" id="cbi-table-table">
50 <legend><%:Active Connections%></legend>
51 <div class="cbi-section-node">
52 <table class="cbi-section-table">
53 <tr class="cbi-section-table-titles">
54 <th class="cbi-section-table-cell"><%:Network%></th>
55 <th class="cbi-section-table-cell"><%:Protocol%></th>
56 <th class="cbi-section-table-cell"><%:Source%></th>
57 <th class="cbi-section-table-cell"><%:Destination%></th>
58 </tr>
59
60 <% style = true; luci.sys.net.conntrack(function(c) %>
61 <tr class="cbi-section-table-row cbi-rowstyle-<%=(style and 1 or 2)%>">
62 <td class="cbi-value-field"><%=c.layer3:upper()%></td>
63 <td class="cbi-value-field"><%=c.layer4:upper()%></td>
64 <td class="cbi-value-field"><%=c.src%></td>
65 <td class="cbi-value-field"><%=c.dst%></td>
66 </tr>
67 <% style = not style; end) %>
68 </table>
69 </div>
70 </fieldset>
71 <br />
72 </div>
73
74 <%+footer%>
75