mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Implements method to retrieve endpoints with associated recipients
Implements #4389
This commit is contained in:
parent
98fca69c06
commit
06bf75c048
4 changed files with 43 additions and 4 deletions
|
|
@ -396,6 +396,24 @@ function recipients:delete_recipients_by_conf(endpoint_conf_name)
|
|||
end
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
-- @brief Get all recipients having the given `endpoint_conf_name`
|
||||
-- @param endpoint_conf_name An endpoint configuration key
|
||||
-- @return A lua array with recipients
|
||||
function recipients:get_recipients_by_conf(endpoint_conf_name)
|
||||
local res = {}
|
||||
|
||||
local all_recipients = self:get_all_recipients()
|
||||
for _, recipient in pairs(all_recipients) do
|
||||
if recipient.endpoint_conf_name == endpoint_conf_name then
|
||||
res[#res + 1] = recipient
|
||||
end
|
||||
end
|
||||
|
||||
return res
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
function recipients:test_recipient(endpoint_conf_name, recipient_params)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue