mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Handle recipient[recipient_minimum_severity] = nil (all categories)
This commit is contained in:
parent
f65f4bbb1f
commit
5d606a41fc
1 changed files with 4 additions and 2 deletions
|
|
@ -104,7 +104,8 @@ function pools_alert_utils.get_entity_recipients_by_pool_id(entity_id, pool_id,
|
|||
for _, recipient in pairs(entity_pool["recipients"]) do
|
||||
local recipient_ok = false
|
||||
|
||||
if current_script and current_script.category and current_script.category.id then
|
||||
if current_script and current_script.category and current_script.category.id and
|
||||
recipient["recipient_user_script_categories"] ~= nil then
|
||||
-- Make sure the user script category belongs to the recipient user script categories
|
||||
for _, user_script_category in pairs(recipient["recipient_user_script_categories"]) do
|
||||
if user_script_category == current_script.category.id then
|
||||
|
|
@ -117,7 +118,8 @@ function pools_alert_utils.get_entity_recipients_by_pool_id(entity_id, pool_id,
|
|||
end
|
||||
|
||||
if recipient_ok then
|
||||
if alert_severity < recipient["recipient_minimum_severity"] then
|
||||
if recipient["recipient_minimum_severity"] ~= nil and
|
||||
alert_severity < recipient["recipient_minimum_severity"] then
|
||||
-- If the current alert severity is less than the minimum requested severity
|
||||
-- exclude the recipient
|
||||
recipient_ok = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue