Cleanup alerts content removing emoji and html in flow formatter for pagerduty. (#7823)

This commit is contained in:
Nicolo Maio 2023-09-15 10:37:40 +02:00
parent 7e4ea888b1
commit 644806e5c0
2 changed files with 9 additions and 6 deletions

View file

@ -697,7 +697,7 @@ local function formatFlowPort(flow, cli_or_srv, port, historical_bounds)
}, port, port, true --[[ check href existance --]] )
end
function getFlowLabel(flow, show_macs, add_hyperlinks, historical_bounds, hyperlink_suffix, add_flag, add_hostnames)
function getFlowLabel(flow, show_macs, add_hyperlinks, historical_bounds, hyperlink_suffix, add_flag, add_hostnames, nohtml)
if flow == nil then
return ""
end
@ -795,8 +795,11 @@ function getFlowLabel(flow, show_macs, add_hyperlinks, historical_bounds, hyperl
end
end
label = label .. "&nbsp; <i class=\"fas fa-exchange-alt fa-lg\" aria-hidden=\"true\"></i> &nbsp;"
if (not nohtml) then
label = label .. "&nbsp; <i class=\"fas fa-exchange-alt fa-lg\" aria-hidden=\"true\"></i> &nbsp;"
else
label = label .. " -> "
end
if not isEmptyString(srv_name) then
label = label .. srv_name
end