mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 19:15:03 +00:00
Prevents acknowledged alerts from being returned by default
This commit is contained in:
parent
f1083262e3
commit
a767ad1e26
1 changed files with 5 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ local CSV_SEPARATOR = "|"
|
|||
function alert_store:init(args)
|
||||
self._group_by = nil
|
||||
self._top_limit = TOP_LIMIT
|
||||
self._acknowledged = false -- By default, don't include acknowledged alerts
|
||||
|
||||
-- Note: _where contains conditions for the where clause.
|
||||
-- Example:
|
||||
|
|
@ -207,6 +208,10 @@ function alert_store:build_where_clause()
|
|||
local and_clauses = {}
|
||||
local or_clauses = {}
|
||||
|
||||
if not self._acknowledged then
|
||||
where_clause = string.format("alert_status <> %u", alert_consts.alert_status.acknowledged.alert_status_id)
|
||||
end
|
||||
|
||||
for name, groups in pairs(self._where) do
|
||||
-- Build AND clauses for all fields
|
||||
for _, cond in ipairs(groups.all) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue