diff options
Diffstat (limited to 'ipsectools-details-html.lsp')
-rw-r--r-- | ipsectools-details-html.lsp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/ipsectools-details-html.lsp b/ipsectools-details-html.lsp index 1e8bfe6..0c3d2ff 100644 --- a/ipsectools-details-html.lsp +++ b/ipsectools-details-html.lsp @@ -1,24 +1,19 @@ -<% local data, viewlibrary, page_info = ... ---htmlviewfunctions = require("htmlviewfunctions") +<% local data, viewlibrary, page_info, session = ... +htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% viewlibrary.dispatch_component("status") %> -<h2><%= html.html_escape(data.label) %></h2> <% +local header_level = htmlviewfunctions.displaysectionstart(data, page_info) +local header_level2 = htmlviewfunctions.incrementheader(header_level) if not data.value.show_isakmp or #data.value.show_isakmp.value == 0 then io.write("<p>No status details available</p>") 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='"..html.html_escape(page_info.wwwprefix..page_info.staticdir).."/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'> ".. html.html_escape(entry.Destination.value) .. "</h3>") + htmlviewfunctions.displaysectionstart(cfe({label=entry.Destination.value}), page_info, header_level2) io.write("<table>\n") local tags = {"Created","Source","Destination", "St", "Phase2details"} for j,tag in pairs(tags) do @@ -28,8 +23,10 @@ else io.write("</td></tr>") end io.write("</table>") + htmlviewfunctions.displaysectionend(header_level2) end end end --htmlviewfunctions.displayitem(data.value.ip_xfrm_policy) +htmlviewfunctions.displaysectionend(header_level) %> |