mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Split user script template logic into separate script
This commit is contained in:
parent
25212db5ce
commit
1c8c93ff6e
4 changed files with 208 additions and 56 deletions
|
|
@ -18,6 +18,7 @@ if(subdir == nil) then
|
|||
end
|
||||
|
||||
local target_type = user_scripts.getSubdirTargetType(subdir)
|
||||
local script_type = user_scripts.script_types[subdir]
|
||||
local config_sets = user_scripts.getConfigsets()
|
||||
local rv = {}
|
||||
|
||||
|
|
@ -47,6 +48,11 @@ for _, configset in pairs(config_sets) do
|
|||
name = configset.name,
|
||||
targets = targets,
|
||||
}
|
||||
|
||||
if(script_type and script_type.default_config_only) then
|
||||
-- Only return the default
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
print(json.encode(rv))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue