From cacf10462b3269fa9327849608310b050e7648db Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 17 Apr 2014 00:38:33 +0000 Subject: Changes to use new htmlviewfunctions functions --- snort-details-html.lsp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/snort-details-html.lsp b/snort-details-html.lsp index 43291b9..35eebbe 100644 --- a/snort-details-html.lsp +++ b/snort-details-html.lsp @@ -1,18 +1,21 @@ -<% local data, viewlibrary = ... +<% local data, viewlibrary, page_info, session = ... +htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% viewlibrary.dispatch_component("status") %> -

<%= html.html_escape(data.label) %>

+<% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %> +<% local header_level2 = htmlviewfunctions.incrementheader(header_level) %> +<% local header_level3 = htmlviewfunctions.incrementheader(header_level2) %> <% if #data.value == 0 then io.write("

No alerts found

") else for i,priority in ipairs(data.value) do %> -

<%= html.html_escape(priority.name) %>

+ <% htmlviewfunctions.displaysectionstart(cfe({label=priority.name}), page_info, header_level2) %> <% for cls in pairs(priority.value) do %> -

<%= html.html_escape(cls) %>

+ <% htmlviewfunctions.displaysectionstart(cfe({label=cls}), page_info, header_level3) %> <% for id,alert in pairs(priority.value[cls]) do %>

<%= html.html_escape(alert.value[1]) %>
<% for j=2, table.maxn(alert.value) do %> @@ -28,6 +31,9 @@ else <% end %>

<% end %> + <% htmlviewfunctions.displaysectionend(header_level3) %> <% end %> + <% htmlviewfunctions.displaysectionend(header_level2) %> <% end %> <% end %> +<% htmlviewfunctions.displaysectionend(header_level) %> -- cgit v1.2.3