mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Reworks user scripts UI with new host pools
This commit is contained in:
parent
9339320f87
commit
2230673eb3
11 changed files with 89 additions and 267 deletions
|
|
@ -72,35 +72,6 @@ elseif(action == "clone") then
|
|||
else
|
||||
result.config_id = err
|
||||
end
|
||||
elseif(action == "set_targets") then
|
||||
local targets = _POST["confset_targets"]
|
||||
local subdir = _POST["script_subdir"]
|
||||
|
||||
if(targets == nil) then
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, "Missing 'confset_targets' parameter")
|
||||
return
|
||||
end
|
||||
|
||||
if(subdir == nil) then
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, "Missing 'script_subdir' parameter")
|
||||
return
|
||||
end
|
||||
|
||||
local targets, err = http_lint.parseConfsetTargets(subdir, targets)
|
||||
|
||||
if(targets ~= nil) then
|
||||
-- Validation ok
|
||||
local success, err = user_scripts.setConfigsetTargets(subdir, confid, targets)
|
||||
result.success = success
|
||||
|
||||
if not success then
|
||||
result.error = err
|
||||
end
|
||||
else
|
||||
-- Validation error
|
||||
result.success = false
|
||||
result.error = err
|
||||
end
|
||||
else
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, "Unknown action '".. action .. "'")
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue