mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Moved notification formatting function (#7781)
This commit is contained in:
parent
ba330e8e0d
commit
144de3a7e6
9 changed files with 75 additions and 35 deletions
|
|
@ -6,6 +6,7 @@ require "lua_utils"
|
|||
local json = require "dkjson"
|
||||
local alert_consts = require("alert_consts")
|
||||
local alert_utils = require "alert_utils"
|
||||
local format_utils = require "format_utils"
|
||||
|
||||
local slack = {
|
||||
name = "Slack",
|
||||
|
|
@ -129,7 +130,7 @@ function slack.dequeueRecipientAlerts(recipient, budget)
|
|||
|
||||
-- Most recent notifications first
|
||||
for _, notif in pairsByValues(notifications, alert_utils.notification_timestamp_rev) do
|
||||
local msg = alert_utils.formatAlertNotification(notif, {nohtml=true, show_severity=false, show_entity=true})
|
||||
local msg = format_utils.formatMessage(notif, {nohtml=true, show_severity=false, show_entity=true})
|
||||
table.insert(messages, msg)
|
||||
|
||||
if #messages >= MAX_ALERTS_PER_MESSAGE then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue