mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 02:16:39 +00:00
Add flow/alerts definitions directories
This commit is contained in:
parent
9386fdd2b1
commit
6533175336
5 changed files with 23 additions and 4 deletions
|
|
@ -124,13 +124,19 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function alert_consts.getDefinititionsDir()
|
||||
return(os_utils.fixPath(dirs.installdir .. "/scripts/callbacks/alert_defs"))
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
-- NOTE: flow alerts are formatted based on their status. See flow_consts.status_types.
|
||||
alert_consts.alert_types = {}
|
||||
local alerts_by_id = {}
|
||||
|
||||
local function loadAlertsDefs()
|
||||
local dirs = ntop.getDirs()
|
||||
local defs_dir = os_utils.fixPath(dirs.installdir .. "/scripts/callbacks/alert_defs")
|
||||
local defs_dir = alert_consts.getDefinititionsDir()
|
||||
package.path = defs_dir .. "/?.lua;" .. package.path
|
||||
local required_fields = {"alert_id", "i18n_title", "icon"}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue