mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Return the enabled hooks in get_user_scripts.lua
This commit is contained in:
parent
be01a6d0eb
commit
633608a119
2 changed files with 20 additions and 0 deletions
|
|
@ -878,6 +878,22 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function user_scripts.getEnabledHooks(user_script, entity_value, is_remote_host)
|
||||
local rv = {}
|
||||
|
||||
entity_value = entity_value or get_global_conf_key(is_remote_host)
|
||||
|
||||
for hook, conf in pairs(user_script.conf) do
|
||||
if conf[entity_value] and conf[entity_value].enabled then
|
||||
rv[#rv + 1] = hook
|
||||
end
|
||||
end
|
||||
|
||||
return(rv)
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function user_scripts.handlePOST(subdir, available_modules, hook, entity_value, remote_host)
|
||||
if(table.empty(_POST)) then
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue