summaryrefslogtreecommitdiffstats
path: root/ipsectools-details-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'ipsectools-details-html.lsp')
-rw-r--r--ipsectools-details-html.lsp41
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>