summaryrefslogtreecommitdiffstats
path: root/snort-details-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'snort-details-html.lsp')
-rw-r--r--snort-details-html.lsp37
1 files changed, 37 insertions, 0 deletions
diff --git a/snort-details-html.lsp b/snort-details-html.lsp
new file mode 100644
index 0000000..b95298d
--- /dev/null
+++ b/snort-details-html.lsp
@@ -0,0 +1,37 @@
+<% 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(form))
+io.write("</span>")
+--]]
+%>
+
+<% viewlibrary.dispatch_component("status") %>
+
+<H1><%= data.label %></H1>
+
+<% for i,priority in ipairs(data.value) do %>
+ <h2><%= priority.name %></h2>
+ <% for cls in pairs(priority.value) do %>
+ <h3><%= cls %></h3>
+ <% for id,alert in pairs(priority.value[cls]) do %>
+ <p><B><%= alert.value[1] %></B><BR>
+ <% for j=2, table.maxn(alert.value) do %>
+ <%= alert.value[j] %><BR>
+ <% end %>
+ <I>(This alarm is repeated <B><%= alert.count %></B> times)</I>
+ <% if (table.maxn(alert.url) ~= 0) then %>
+ ( URL's:
+ <% for k,url in ipairs(alert.url) do %>
+ <a href="<%= url %>" target="_new"><img src="/skins/static/tango/16x16/categories/applications-internet.png" alt="<%= url %>"></a>
+ <% end %>
+ )
+ <% end %>
+ </p>
+ <% end %>
+
+ <% end %>
+<% end %>