mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
add raw exclusion list for user script page (#5002)
This commit is contained in:
parent
981f7a0572
commit
08f2e68f0b
5 changed files with 93 additions and 45 deletions
|
|
@ -41,6 +41,12 @@ function user_script_template:render(hooks_conf)
|
|||
local res = {}
|
||||
local plugins_utils = require "plugins_utils"
|
||||
|
||||
-- check if the input_builder is defined
|
||||
-- TODO: define empty template for the user scripts without input_builder/template
|
||||
if (isEmptyString(self._user_script.gui.input_builder)) then
|
||||
return { templates = {{hook = "all", template = ""}}, user_script = self._user_script }
|
||||
end
|
||||
|
||||
-- Use ipairs on script type hooks to make sure hooks are always returned sorted and in the same order
|
||||
for _, hook in ipairs(table.merge({"all"} --[[ Hook "all" always go first --]], self._user_script.script_type.hooks)) do
|
||||
local hook_conf = hooks_conf[hook]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue