Shows acknowledged messages when present

Addresses #5600
This commit is contained in:
Simone Mainardi 2021-07-06 17:32:37 +02:00
parent ae0d1e9543
commit 38b3c9ebdc

View file

@ -495,6 +495,10 @@ function alert_utils.formatAlertMessage(ifid, alert, alert_json, skip_live_data)
msg = alert_consts.alertTypeLabel(tonumber(alert.alert_id), true --[[ no_html --]], alert.entity_id)
end
if not isEmptyString(alert["user_label"]) then
msg = string.format('%s <small><span class="text-muted">%s</span></small>', msg, alert["user_label"])
end
return(msg or "")
end
@ -521,6 +525,10 @@ function alert_utils.formatFlowAlertMessage(ifid, alert, alert_json, skip_live_d
msg = alert_consts.alertTypeLabel(tonumber(alert.alert_id), true --[[ no_html --]], alert_entities.flow.entity_id)
end
if not isEmptyString(alert["user_label"]) then
msg = string.format('%s <small><span class="text-muted">%s</span></small>', msg, alert["user_label"])
end
return msg or ""
end