mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Changed filters table path and Fixes reset script values
This commit is contained in:
parent
2c94d4da45
commit
59818f5540
4 changed files with 109 additions and 47 deletions
|
|
@ -57,7 +57,8 @@ end
|
|||
local result = {
|
||||
hooks = {},
|
||||
gui = {},
|
||||
metadata = {}
|
||||
metadata = {},
|
||||
filters = {}
|
||||
}
|
||||
|
||||
if(script.gui) then
|
||||
|
|
@ -84,6 +85,27 @@ if (script.is_alert) then
|
|||
result.metadata.is_alert = script.is_alert
|
||||
end
|
||||
|
||||
-- Getting filter configurations
|
||||
local filter_conf = config_set["filters"]
|
||||
if not filter_conf then
|
||||
goto skip_filter_conf
|
||||
end
|
||||
|
||||
if not filter_conf[subdir] then
|
||||
goto skip_filter_conf
|
||||
end
|
||||
|
||||
if not filter_conf[subdir][script_key] then
|
||||
goto skip_filter_conf
|
||||
end
|
||||
|
||||
if not filter_conf[subdir][script_key]["filter"] then
|
||||
goto skip_filter_conf
|
||||
end
|
||||
result.filters = filter_conf[subdir][script_key]["filter"]
|
||||
|
||||
::skip_filter_conf::
|
||||
-------------------------------
|
||||
local hooks_config = user_scripts.getScriptConfig(config_set, script, subdir)
|
||||
|
||||
for hook, config in pairs(hooks_config) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue