Implements example of simplified flow alerts

This commit is contained in:
Simone Mainardi 2020-11-10 15:10:54 +01:00
parent 683a4a727b
commit 93920ccdce
9 changed files with 132 additions and 7 deletions

View file

@ -0,0 +1,25 @@
--
-- (C) 2019-20 - ntop.org
--
local status_keys = require "flow_keys"
local alert_consts = require "alert_consts"
-- #################################################################
local function formatDemo(flowstatus_info)
if flowstatus_info and flowstatus_info.one_param and flowstatus_info.another_param then
return string.format("New API demo: [%s][%s]", flowstatus_info.one_param, flowstatus_info.another_param)
end
return "New API Demo"
end
-- #################################################################
return {
status_key = status_keys.user.status_user_03,
alert_type = alert_consts.alert_types.alert_new_api_demo,
i18n_title = "New API Demo",
i18n_description = formatDemo
}