Fixes possible attempts to call nil values in alert defs.

Fixes #5951
This commit is contained in:
Simone Mainardi 2021-10-04 12:23:32 +02:00
parent 5aef101ff4
commit 08b011acd8
3 changed files with 4 additions and 6 deletions

View file

@ -14,13 +14,11 @@ local behavior_utils = require("behavior_utils")
local alert_behavior_anomaly = classes.class(alert)
local i18n_title = i18n("alerts_dashboard.alert_unexpected_behavior_title", {type = ""})
-- ##############################################
alert_behavior_anomaly.meta = {
alert_key = other_alert_keys.alert_behavior_anomaly,
i18n_title = i18n_title,
i18n_title = "alerts_dashboard.alert_unexpected_behavior_title",
icon = "fas fa-fw fa-exclamation",
}
@ -118,4 +116,4 @@ end
-- #######################################################
return alert_behavior_anomaly
return alert_behavior_anomaly

View file

@ -18,7 +18,7 @@ local alert_dropped_alerts = classes.class(alert)
alert_dropped_alerts.meta = {
alert_key = other_alert_keys.alert_dropped_alerts,
i18n_title = i18n("show_alerts.dropped_alerts"),
i18n_title = "show_alerts.dropped_alerts",
icon = "fas fa-fw fa-exclamation-triangle",
entities = {
alert_entities.system,

View file

@ -20,7 +20,7 @@ local alert_snmp_topology_changed = classes.class(alert)
alert_snmp_topology_changed.meta = {
alert_key = other_alert_keys.alert_snmp_topology_changed,
i18n_title = i18n("snmp.lldp_topology_changed"),
i18n_title = "snmp.lldp_topology_changed",
icon = "fas fa-fw fa-topology-alt",
entities = {
alert_entities.snmp_device