Skip to content

Commit da72cd4

Browse files
Add toast for newly created alerts (#89202)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
1 parent 1750fc2 commit da72cd4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

x-pack/plugins/monitoring/public/alerts/lib/alerts_toast.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,24 @@ const showUnableToDisableWatcherClusterAlertsError = () => {
8181
});
8282
};
8383

84+
const showDisabledWatcherClusterAlertsError = () => {
85+
Legacy.shims.toastNotifications.addWarning({
86+
title: toMountPoint(
87+
<FormattedMessage
88+
id="xpack.monitoring.healthCheck.disabledWatches.title"
89+
defaultMessage="New alerts created"
90+
/>
91+
),
92+
text: toMountPoint(
93+
<p>
94+
{i18n.translate('xpack.monitoring.healthCheck.disabledWatches.text', {
95+
defaultMessage: `Review the alert definition using Setup mode and configure additional action connectors to get notified via your favorite method.`,
96+
})}
97+
</p>
98+
),
99+
});
100+
};
101+
84102
export const showAlertsToast = (response: EnableAlertResponse) => {
85103
const {
86104
isSufficientlySecure,
@@ -92,5 +110,7 @@ export const showAlertsToast = (response: EnableAlertResponse) => {
92110
showTlsAndEncryptionError();
93111
} else if (disabledWatcherClusterAlerts === false) {
94112
showUnableToDisableWatcherClusterAlertsError();
113+
} else if (disabledWatcherClusterAlerts === true) {
114+
showDisabledWatcherClusterAlertsError();
95115
}
96116
};

0 commit comments

Comments
 (0)