mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Use new user scripts config and gui
The user scripts configuration can now be configured from the "User Scripts" entry under the cog icon. It allows the creation of multiple configuration presets to be applied to hosts, networks and interfaces.
This commit is contained in:
parent
538ebc741a
commit
d037f9a9a4
18 changed files with 533 additions and 542 deletions
|
|
@ -67,11 +67,10 @@ function runScripts(granularity)
|
|||
local cur_alerts = network.getAlerts(granularity_id)
|
||||
local entity_info = alerts_api.networkAlertEntity(network_key)
|
||||
local subnet_conf = user_scripts.getTargetConfig(configsets, "network", network_key)
|
||||
-- TODO use subnet_conf
|
||||
|
||||
for mod_key, hook_fn in pairs(available_modules.hooks[granularity]) do
|
||||
local user_script = available_modules.modules[mod_key]
|
||||
local conf = user_scripts.getConfiguration(user_script, granularity, network_key)
|
||||
local conf = user_scripts.getTargetHookConfig(subnet_conf, user_script, granularity)
|
||||
|
||||
if(conf.enabled) then
|
||||
if((not user_script.is_alert) or (not suppressed_alerts)) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue