summaryrefslogtreecommitdiffstats
path: root/openvpn-statusinfo-html.lsp
blob: bc7ab1a265d5517f6dfba349a609e0e04ca48f5f (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
28
29
30
31
<% local view, viewlibrary = ... %>

<% viewlibrary.dispatch_component("status") %>

<% viewlibrary.dispatch_component("viewconfig") %>

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

<DL><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></DL>