mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Fix always_enabled required for non-alert scripts
This commit is contained in:
parent
c9a95543dd
commit
b8f1a039fb
5 changed files with 45 additions and 13 deletions
|
|
@ -254,6 +254,7 @@ end
|
|||
function user_scripts.load(script_type, ifid, subdir, hook_filter, ignore_disabled, do_benchmark)
|
||||
local rv = {modules = {}, hooks = {}}
|
||||
local is_nedge = ntop.isnEdge()
|
||||
local alerts_disabled = (not areAlertsEnabled())
|
||||
|
||||
local check_dirs = {
|
||||
user_scripts.getSubdirectoryPath(script_type, subdir),
|
||||
|
|
@ -310,6 +311,10 @@ function user_scripts.load(script_type, ifid, subdir, hook_filter, ignore_disabl
|
|||
check_module.enabled = user_scripts.isEnabled(ifid, subdir, check_module.key)
|
||||
check_module.is_alert = is_alert_path
|
||||
|
||||
if(alerts_disabled and check_module.is_alert) then
|
||||
goto next_module
|
||||
end
|
||||
|
||||
if((not check_module.enabled) and (not ignore_disabled)) then
|
||||
traceError(TRACE_DEBUG, TRACE_CONSOLE, string.format("Skipping disabled module '%s'", check_module.key))
|
||||
goto next_module
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue