diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-02-06 08:40:23 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-02-06 08:40:23 +0000 |
commit | d619a9cafd514e7fcf9ccd522c85c516569f49d9 (patch) | |
tree | bdbd0af25313d809a3690ea1a4e088c6f2933dcc /openvpn-status-html.lsp | |
parent | d976e45d7381ee14f69831eb3f886f8237810259 (diff) | |
download | acf-openvpn-d619a9cafd514e7fcf9ccd522c85c516569f49d9.tar.bz2 acf-openvpn-d619a9cafd514e7fcf9ccd522c85c516569f49d9.tar.xz |
Renamed read to status.
git-svn-id: svn://svn.alpinelinux.org/acf/openvpn/trunk@697 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'openvpn-status-html.lsp')
-rw-r--r-- | openvpn-status-html.lsp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/openvpn-status-html.lsp b/openvpn-status-html.lsp new file mode 100644 index 0000000..98475d2 --- /dev/null +++ b/openvpn-status-html.lsp @@ -0,0 +1,44 @@ +<? local view = ... ?> +<h1>SYSTEM INFO</h1> + +<dl> +<dt>Program version</dt> +<DD><?= view.version ?></DD> +</dl> + +<H2>PROGRAM SPECIFIC OPTIONS/INFORMATION</H2> + +<H3>Available configs (Click on config-name to see details)</H3> +<TABLE> + <TR style="background:#eee;font-weight:bold;vertical-align:top;"> + <TD>Config</TD> + <TD>Type</TD> + <TD>Status</TD> + <TD>Connected<BR>Clients</TD> + <TD>Notes</TD> + </TR> + +<? for i = 1, table.maxn(view.conflistfiles) do ?> + <TR > + <TD><?= html.link{value = view.url .. "/" .. view.conflistfiles[i].type .. "_config?name=" .. view.conflistfiles[i].name , label=view.conflistfiles[i].name } ?></TD> + <TD><?= view.conflistfiles[i].type ?></TD> + <TD><?= view.conflistfiles[i].status ?></TD> + <TD><? if ( view.conflistfiles[i].type == "server" ) then ?><? if ( view.conflistfiles[i].clients > 0 ) then ?><?= html.link{value = view.url .. "/status_info?name=" .. view.conflistfiles[i].name , label=view.conflistfiles[i].clients } ?><? else ?><?= view.conflistfiles[i].clients ?><? end ?><? end ?></TD> + <TD style="color:red"><i><?= view.conflistfiles[i].err ?></i></TD> + </TR> +<? end ?> + +<? if (#view.conflistfiles == 0) then ?> + <TR> + <TD colspan=3>(No existing config-files)</TD> + </TR> +<? end ?> +</TABLE> + +<? +--[[ DEBUG INFORMATION +require("debugs") +io.write(debugs.variables(view)) +--]] +?> + |