From 284f4226427ccba5a64d070136d6deb13b06e629 Mon Sep 17 00:00:00 2001 From: Aaron Caldwell Date: Mon, 4 Jan 2021 14:21:20 -0700 Subject: [PATCH] Set containment alert recovery action group to 'No longer contained' (#87182) --- .../server/alert_types/geo_containment/alert_type.ts | 6 ++++++ .../alert_types/geo_containment/tests/alert_type.test.ts | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/alert_type.ts b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/alert_type.ts index 85dcf1125becd..0d8628d00df85 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/alert_type.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/alert_type.ts @@ -160,6 +160,12 @@ export function getAlertType(logger: Logger): GeoContainmentAlertType { id: GEO_CONTAINMENT_ID, name: alertTypeName, actionGroups: [{ id: ActionGroupId, name: actionGroupName }], + recoveryActionGroup: { + id: 'notGeoContained', + name: i18n.translate('xpack.stackAlerts.geoContainment.notGeoContained', { + defaultMessage: 'No longer contained', + }), + }, defaultActionGroupId: ActionGroupId, executor: getGeoContainmentExecutor(logger), producer: STACK_ALERTS_FEATURE_ID, diff --git a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/tests/alert_type.test.ts b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/tests/alert_type.test.ts index 0592c944de570..98842c8cc2cba 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/tests/alert_type.test.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/tests/alert_type.test.ts @@ -18,6 +18,10 @@ describe('alertType', () => { expect(alertType.actionGroups).toEqual([ { id: 'Tracked entity contained', name: 'Tracking containment met' }, ]); + expect(alertType.recoveryActionGroup).toEqual({ + id: 'notGeoContained', + name: 'No longer contained', + }); expect(alertType.actionVariables).toMatchSnapshot(); });