Adds info-level alerts upon successful lists download

Addresses #4554
This commit is contained in:
Simone Mainardi 2020-10-14 15:07:58 +02:00
parent d2ffc3c64a
commit 5d80b67327
4 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,32 @@
--
-- (C) 2019-20 - ntop.org
--
local alert_keys = require "alert_keys"
-- #################################################################
-- @brief Prepare an alert table used to generate the alert
-- @param alert_severity A severity as defined in `alert_consts.alert_severities`
-- @param list_name The name of the succeeded list as string
-- @return A table with the alert built
local function createListDownloadSucceededType(alert_severity, list_name)
local built = {
alert_severity = alert_severity,
alert_type_params = {
name = list_name
}
}
return built
end
-- #################################################################
return {
alert_key = alert_keys.ntopng.alert_list_download_succeeded,
i18n_title = "alerts_dashboard.list_download_succeeded",
i18n_description = "category_lists.download_succeeded",
icon = "fas fa-sticky-note",
creator = createListDownloadSucceededType,
}