mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Add mapScoreToSeverity call
This commit is contained in:
parent
4cb19a1be8
commit
24321cba24
15 changed files with 26 additions and 30 deletions
|
|
@ -46,21 +46,6 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
-- Keep in sync with Utils::mapScoreToSeverity (C) */
|
||||
function alert_utils.mapScoreToSeverity(score)
|
||||
if (not score or score < prefs.score_level_notice) then
|
||||
return alert_severities.info
|
||||
elseif score < prefs.score_level_warning then
|
||||
return alert_severities.notice
|
||||
elseif score < prefs.score_level_error then
|
||||
return alert_severities.warning
|
||||
else
|
||||
return alert_severities.error
|
||||
end
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
local function alertTypeDescription(alert_key, entity_id)
|
||||
|
||||
local alert_id = alert_consts.getAlertType(alert_key, entity_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue