blob: ab6024d71b05d8bb0bdbf3ad58bfc8ecb47a319c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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(form))
io.write("</span>")
--]]
%>
<% viewlibrary.dispatch_component("status") %>
<H2><%= html.html_escape(data.label) %></H2>
<%
if #data.value == 0 then
io.write("No alerts found")
else
for i,priority in ipairs(data.value) do %>
<h2><%= html.html_escape(priority.name) %></h2>
<% for cls in pairs(priority.value) do %>
<h3><%= html.html_escape(cls) %></h3>
<% for id,alert in pairs(priority.value[cls]) do %>
<p><B><%= html.html_escape(alert.value[1]) %></B><BR>
<% for j=2, table.maxn(alert.value) do %>
<%= html.html_escape(alert.value[j]) %><BR>
<% end %>
<I>(This alarm is repeated <B><%= html.html_escape(alert.count) %></B> times)</I>
<% if (table.maxn(alert.url) ~= 0) then %>
( URL's:
<% for k,url in ipairs(alert.url) do %>
<a href="<%= html.html_escape(url) %>" target="_new"><img src="/skins/static/tango/16x16/categories/applications-internet.png" alt="<%= html.html_escape(url) %>"></a>
<% end %>
)
<% end %>
</p>
<% end %>
<% end %>
<% end %>
<% end %>
|