Add button to reset the user scripts configuration

Closes #3307
This commit is contained in:
emanuele-f 2020-01-24 11:09:48 +01:00
parent ae4a8bdca0
commit f8d09f7387
6 changed files with 45 additions and 10 deletions

View file

@ -1080,6 +1080,16 @@ end
-- ##############################################
function user_scripts.resetConfigsets()
cached_config_sets = nil
ntop.delCache(CONFIGSETS_KEY)
user_scripts.loadDefaultConfig()
return(true)
end
-- ##############################################
-- Returns true if a system script is enabled for some hook
function user_scripts.isSystemScriptEnabled(script_key)
local configsets = user_scripts.getConfigsets()