summaryrefslogtreecommitdiffstats
path: root/openvpn-statusinfo-html.lsp
blob: e68ca0ca279cf1ff767bce722c4b7be13179ba94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<% local view = ... %>

<h1>Status</h1>
<h2>Connected clients</h2>

<TABLE>
	<TR style="background:#eee;font-weight:bold;vertical-align:top;">
		<TD WIDTH=140>Common Name<BR>Connected at</TD>
		<TD WIDTH=130>Virtual Address</TD>
		<TD WIDTH=130>Real Address</TD>
		<TD>Bytes<BR>Received</TD>
		<TD>Bytes<BR>Sent</TD>
	</TR>		
<% for i in ipairs(view.value) do %>
	<TR>
		<TD><%= html.html_escape(view.value[i].CN) %></TD>
		<TD><%= html.html_escape(view.value[i].VIRTADDR) %></TD>
		<TD><%= html.html_escape(view.value[i].REALADDR) %></TD>
		<TD><%= html.html_escape(view.value[i].BYTESRCV) %></TD>
		<TD><%= html.html_escape(view.value[i].BYTESSND) %></TD>
	</TR>		
	<TR>
		<TD COLSPAN=5 style="border-bottom: 1px solid #ccc;"><%= html.html_escape(view.value[i].CONN) %></TD>
	</TR>		
<% end %>

</TABLE>