mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Refactors user_scripts into checks (lua)
This commit is contained in:
parent
3c3aa5a25f
commit
76fd315d1b
222 changed files with 980 additions and 981 deletions
|
|
@ -5,7 +5,7 @@ local dirs = ntop.getDirs()
|
|||
|
||||
require "lua_utils"
|
||||
local alert_severities = require "alert_severities"
|
||||
local user_scripts = require "user_scripts"
|
||||
local checks = require "checks"
|
||||
|
||||
-- ##############################################
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ local recipients_rest_utils = {}
|
|||
|
||||
-- @brief Parses and validates a comma-separated list of user script category ids into a lua array
|
||||
-- @return A lua array of valid user script category ids
|
||||
function recipients_rest_utils.parse_user_script_categories(categories_string)
|
||||
function recipients_rest_utils.parse_check_categories(categories_string)
|
||||
local categories = {}
|
||||
|
||||
if isEmptyString(categories_string) then return categories end
|
||||
|
|
@ -27,7 +27,7 @@ function recipients_rest_utils.parse_user_script_categories(categories_string)
|
|||
for _, category_id in pairs(categories) do
|
||||
local category_id = tonumber(category_id)
|
||||
|
||||
for _, category in pairs(user_scripts.script_categories) do
|
||||
for _, category in pairs(checks.script_categories) do
|
||||
if category_id == category.id then
|
||||
res[#res + 1] = category_id
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue