mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Cleanup alerts content removing emoji and html in flow formatter for pagerduty. (#7823)
This commit is contained in:
parent
7e4ea888b1
commit
644806e5c0
2 changed files with 9 additions and 6 deletions
|
|
@ -192,7 +192,7 @@ end
|
|||
-- #################################
|
||||
|
||||
-- This function formats flows in alerts
|
||||
function alert_utils.formatRawFlow(alert)
|
||||
function alert_utils.formatRawFlow(alert, nohtml)
|
||||
require "flow_utils"
|
||||
local time_bounds
|
||||
local add_links = false
|
||||
|
|
@ -212,7 +212,7 @@ function alert_utils.formatRawFlow(alert)
|
|||
|
||||
flow = "<i class=\"fas fa-stream\"></i> " .. (getFlowLabel(flow, false, add_links, time_bounds, {
|
||||
page = "alerts"
|
||||
}) or "")
|
||||
},nil,nil,nohtml) or "")
|
||||
|
||||
return flow
|
||||
end
|
||||
|
|
@ -548,7 +548,7 @@ function alert_utils.formatAlertNotification(notif, options)
|
|||
msg = msg .. "[" .. alert_consts.alertEntityLabel(notif.entity_id) .. "]"
|
||||
local ev
|
||||
if notif.entity_id == alert_entities.flow.entity_id then
|
||||
ev = noHtml(alert_utils.formatRawFlow(notif))
|
||||
ev = noHtml(alert_utils.formatRawFlow(notif, options.nohtml))
|
||||
else
|
||||
ev = notif.entity_val
|
||||
if notif.entity_id == alert_entities.host.entity_id then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue