mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Remove alert severity from Alerts. Always use score (convert to severity when required for UI or similar)
This commit is contained in:
parent
b7060cade7
commit
ef65671794
99 changed files with 234 additions and 247 deletions
|
|
@ -46,6 +46,21 @@ 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