<% local data, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% viewlibrary.dispatch_component("status") %> <% 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 %> <% htmlviewfunctions.displaysectionstart(cfe({label=priority.name}), page_info, header_level2) %> <% for cls in pairs(priority.value) do %> <% 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 %> <%= html.html_escape(alert.value[j]) %>
<% end %> (This alarm is repeated <%= html.html_escape(alert.count) %> times) <% if (table.maxn(alert.url) ~= 0) then %> ( URL's: <% for k,url in ipairs(alert.url) do %> <%= html.html_escape(url) %> <% end %> ) <% end %>

<% end %> <% htmlviewfunctions.displaysectionend(header_level3) %> <% end %> <% htmlviewfunctions.displaysectionend(header_level2) %> <% end %> <% end %> <% htmlviewfunctions.displaysectionend(header_level) %>