diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-09-23 15:36:59 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-09-23 15:36:59 +0000 |
commit | 6cb727c05b7562dd7eb428da8494f09210e3dac0 (patch) | |
tree | d67ff29ab2e9c7867a98db41472950646de094e9 /ipsectools-details-html.lsp | |
parent | 7fc71cd1135d13ce1cb5192f7909c52f427725df (diff) | |
download | acf-ipsec-tools-6cb727c05b7562dd7eb428da8494f09210e3dac0.tar.bz2 acf-ipsec-tools-6cb727c05b7562dd7eb428da8494f09210e3dac0.tar.xz |
Modified ipsectools to use new libraries and lsp files.
git-svn-id: svn://svn.alpinelinux.org/acf/ipsec-tools/trunk@1483 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'ipsectools-details-html.lsp')
-rw-r--r-- | ipsectools-details-html.lsp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ipsectools-details-html.lsp b/ipsectools-details-html.lsp new file mode 100644 index 0000000..b16da64 --- /dev/null +++ b/ipsectools-details-html.lsp @@ -0,0 +1,41 @@ +<% local data, viewlibrary = ... +require("viewfunctions") +--[[ DEBUG INFORMATION +io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") +io.write(html.cfe_unpack(data)) +io.write("</span>") +--]] +%> + +<% viewlibrary.dispatch_component("status") %> + +<H2><%= data.label %></H2> +<DL> +<% +if not data.value.show_isakmp or #data.value.show_isakmp.value == 0 then + io.write("No status details available") +else + for i,entry in pairs(data.value.show_isakmp.value) do + if (type(entry) == "table") and (entry.Destination) and (entry.Destination.value) and (#entry.Destination.value > 0) then + io.write("<H3><IMG SRC='/skins/static/tango/16x16/status/network-") + if (tonumber(entry.St.value) < 9) then + io.write("error") + else + io.write("idle") + end + io.write(".png' width='16' height='16'> ".. entry.Destination.value .. "</H3>") + io.write("<TABLE>\n") + local tags = {"Created","Source","Destination", "St", "Phase2details"} + for j,tag in pairs(tags) do + io.write("<TR><TD STYLE='font-weight:bold;width:120px;border:none;'>" .. + (entry[tag].label or "") .. "</TD><TD STYLE='border:none;'>"..(entry[tag].value or "")) + if (entry[tag].descr) and (#entry[tag].descr > 0) then io.write(" (".. entry[tag].descr .. ")") end + io.write("</TD></TR>") + end + io.write("</TABLE>") + end + end +end +--displayitem(data.value.ip_xfrm_policy) +%> +</DL> |