From 310c8015ecb8e6c4f301b63803e48d63e6a25026 Mon Sep 17 00:00:00 2001 From: chrisronline Date: Wed, 15 Jul 2020 22:06:04 -0400 Subject: [PATCH] Fixes --- .../plugins/monitoring/public/alerts/callout.tsx | 2 +- .../server/alerts/nodes_changed_alert.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/monitoring/public/alerts/callout.tsx b/x-pack/plugins/monitoring/public/alerts/callout.tsx index 748ec257ea7650..d000f470da3342 100644 --- a/x-pack/plugins/monitoring/public/alerts/callout.tsx +++ b/x-pack/plugins/monitoring/public/alerts/callout.tsx @@ -24,7 +24,7 @@ const TYPES = [ severity: AlertSeverity.Danger, color: 'danger', label: i18n.translate('xpack.monitoring.alerts.callout.dangerLabel', { - defaultMessage: 'DAnger alert(s)', + defaultMessage: 'Danger alert(s)', }), }, ]; diff --git a/x-pack/plugins/monitoring/server/alerts/nodes_changed_alert.ts b/x-pack/plugins/monitoring/server/alerts/nodes_changed_alert.ts index 5b38503c7ece45..73f3ee055c9285 100644 --- a/x-pack/plugins/monitoring/server/alerts/nodes_changed_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/nodes_changed_alert.ts @@ -155,6 +155,21 @@ export class NodesChangedAlert extends BaseAlert { }; } + if ( + Object.values(states.added).length === 0 && + Object.values(states.removed).length === 0 && + Object.values(states.restarted).length === 0 + ) { + return { + text: i18n.translate( + 'xpack.monitoring.alerts.nodesChanged.ui.nothingDetectedFiringMessage', + { + defaultMessage: `Elasticsearch nodes have changed`, + } + ), + }; + } + const addedText = Object.values(states.added).length > 0 ? i18n.translate('xpack.monitoring.alerts.nodesChanged.ui.addedFiringMessage', {