mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
add severity select for scripts config modal (#4919)
This commit is contained in:
parent
1a2445f4f6
commit
aa45a8d64e
6 changed files with 89 additions and 49 deletions
|
|
@ -26,6 +26,7 @@ sendHTTPContentTypeHeader('application/json')
|
|||
local subdir = _POST["script_subdir"]
|
||||
local confset_id = tonumber(_POST["confset_id"] or user_scripts.DEFAULT_CONFIGSET_ID)
|
||||
local script_key = _POST["script_key"]
|
||||
local alert_severity = _POST['alert_severity']
|
||||
|
||||
-- ################################################
|
||||
|
||||
|
|
@ -62,7 +63,12 @@ end
|
|||
|
||||
local result = {}
|
||||
|
||||
local success, err = user_scripts.updateScriptConfig(confset_id, script_key, subdir, data)
|
||||
local additional_params = {}
|
||||
if alert_severity ~= nil then
|
||||
additional_params.severity = alert_consts.alertSeverityById(alert_severity)
|
||||
end
|
||||
|
||||
local success, err = user_scripts.updateScriptConfig(confset_id, script_key, subdir, data, additional_params)
|
||||
|
||||
result.success = success
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue