mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Updated alarm widget
This commit is contained in:
parent
7dea0f7f35
commit
1a59a9cc80
5 changed files with 49 additions and 35 deletions
|
|
@ -39,14 +39,17 @@ local res = {
|
|||
}
|
||||
}
|
||||
|
||||
local count_data = all_alert_store:count_by_severity_and_time()
|
||||
local count_data = all_alert_store:count_by_severity_and_time(true)
|
||||
|
||||
for _, severity in pairsByField(alert_severities, "severity_id", rev) do
|
||||
res.series[#res.series + 1] = {
|
||||
name = i18n(severity.i18n_title),
|
||||
data = count_data[severity.severity_id],
|
||||
}
|
||||
res.fill.colors[#res.fill.colors + 1] = severity.color
|
||||
if(count_data[severity.severity_id] ~= nil) then
|
||||
res.series[#res.series + 1] = {
|
||||
name = i18n(severity.i18n_title),
|
||||
data = count_data[severity.severity_id],
|
||||
}
|
||||
|
||||
res.fill.colors[#res.fill.colors + 1] = severity.color
|
||||
end
|
||||
end
|
||||
|
||||
rest_utils.answer(rc, res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue