mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Modified blacklisted flow alert description
This commit is contained in:
parent
a4eaf257d5
commit
bdae6129a0
1 changed files with 6 additions and 8 deletions
|
|
@ -43,15 +43,13 @@ end
|
|||
-- @param alert_type_params Table `alert_type_params` as built in the `:init` method
|
||||
-- @return A human-readable string
|
||||
function alert_flow_blacklisted.format(ifid, alert, alert_type_params)
|
||||
local blacklist = ""
|
||||
if not isEmptyString(alert_type_params["custom_cat_file"]) then
|
||||
blacklist = alert_type_params["custom_cat_file"]
|
||||
local is_cat_blacklisted = alert_type_params["cat_blacklisted"]
|
||||
|
||||
local res = ""
|
||||
if is_cat_blacklisted then
|
||||
local href = string.format("<a href='%s/lua/admin/edit_categories.lua?tab=protocols'><i class='fas fa-cog'></i></a>", ntop.getHttpPrefix())
|
||||
res = string.format("%s", i18n("blacklisted_category", { config_href = href }))
|
||||
end
|
||||
-- This alert has been split into 3 alerts, this triggers only for the category
|
||||
local res = i18n("flow_details.blacklisted_flow_detailed", {
|
||||
who = i18n("category"),
|
||||
blacklist = blacklist
|
||||
})
|
||||
|
||||
return res
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue