mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49: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
|
|
@ -30,10 +30,14 @@ local result = {}
|
|||
|
||||
for script_name, script in pairs(scripts.modules) do
|
||||
if script.gui.i18n_title and script.gui.i18n_description then
|
||||
local enabled_hooks = user_scripts.getEnabledHooks(script)
|
||||
|
||||
result[#result + 1] = {
|
||||
key = script_name,
|
||||
title = i18n(script.gui.i18n_title) or script.gui.i18n_title,
|
||||
description = i18n(script.gui.i18n_description) or script.gui.i18n_description,
|
||||
enabled_hooks = enabled_hooks,
|
||||
is_enabled = not table.empty(enabled_hooks),
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue