mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Rework user script working sets (a single configset is supported now)
This commit is contained in:
parent
03512b963f
commit
fa311e3ade
45 changed files with 259 additions and 1077 deletions
|
|
@ -13,7 +13,6 @@ local alert_consts = require("alert_consts")
|
|||
sendHTTPContentTypeHeader('application/json')
|
||||
|
||||
local subdir = _POST["script_subdir"] -- optional (all subdirs if not specified)
|
||||
local confset_id = tonumber(_POST["confset_id"] or user_scripts.DEFAULT_CONFIGSET_ID) -- optional (default config if not specified)
|
||||
local action = _POST["action"] -- enable/disable
|
||||
|
||||
if(not isAdministrator()) then
|
||||
|
|
@ -52,7 +51,7 @@ for _, subdir in ipairs(subdirs) do
|
|||
return
|
||||
end
|
||||
|
||||
local succ, err = user_scripts.toggleAllScripts(confset_id, subdir, (action == "enable"))
|
||||
local succ, err = user_scripts.toggleAllScripts(subdir, (action == "enable"))
|
||||
|
||||
if not succ then
|
||||
result.error = err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue