mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Add cloud broker host in case of disconnection and reconnection
This commit is contained in:
parent
5f00c126ea
commit
39494e3002
5 changed files with 28 additions and 12 deletions
|
|
@ -30,11 +30,13 @@ alert_cloud_reconnected.meta = {
|
|||
|
||||
-- @brief Prepare an alert table used to generate the alert
|
||||
-- @return A table with the alert built
|
||||
function alert_cloud_reconnected:init()
|
||||
function alert_cloud_reconnected:init(description)
|
||||
-- Call the parent constructor
|
||||
self.super:init()
|
||||
|
||||
self.alert_type_params = {}
|
||||
self.alert_type_params = {
|
||||
description = description
|
||||
}
|
||||
end
|
||||
|
||||
-- #######################################################
|
||||
|
|
@ -45,7 +47,10 @@ end
|
|||
-- @param alert_type_params Table `alert_type_params` as built in the `:init` method
|
||||
-- @return A human-readable string
|
||||
function alert_cloud_reconnected.format(ifid, alert, alert_type_params)
|
||||
return(i18n("cloud.reconnected"))
|
||||
local message = i18n("cloud.reconnected")
|
||||
if not isEmptyString(alert_type_params.description) then
|
||||
message = message .. " (" .. alert_type_params.description .. ")"
|
||||
end
|
||||
end
|
||||
|
||||
-- #######################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue