mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Added device connection/disconnection alert (#6801)
This commit is contained in:
parent
ad7a312249
commit
d6471d8dac
15 changed files with 105 additions and 116 deletions
|
|
@ -1004,6 +1004,16 @@ local function validateMac(p)
|
|||
end
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
-- @brief Returns true if inputstr is a Mac or all string
|
||||
local function validateDeviceOrAll(inputstr)
|
||||
return (validateMac(inputstr) or inputstr == 'all')
|
||||
end
|
||||
http_lint.validateDeviceOrAll = validateDeviceOrAll
|
||||
|
||||
-- ##############################################
|
||||
|
||||
local function validateZoom(zoom)
|
||||
if string.match(zoom, "%d+%a") == zoom then
|
||||
return true
|
||||
|
|
@ -1558,6 +1568,9 @@ local known_parameters = {
|
|||
["delete_alerts"] = validateBool,
|
||||
["alert_generation"] = { jsonCleanup, validateJSON },
|
||||
|
||||
-- EXCLUDE DEVICES
|
||||
["device"] = validateDeviceOrAll,
|
||||
|
||||
-- UI TOASTS
|
||||
["toast_id"] = validateSingleWord,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue