Skip to content

Commit 9e4ab20

Browse files
committed
fixed typing in GeoContainmentAlertType
1 parent 26e28ea commit 9e4ab20

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

x-pack/plugins/stack_alerts/server/alert_types/geo_containment/alert_type.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { Query } from '../../../../../../src/plugins/data/common/query';
2020

2121
export const GEO_CONTAINMENT_ID = '.geo-containment';
2222
export const ActionGroupId = 'Tracked entity contained';
23+
export const RecoveryActionGroupId = 'notGeoContained';
2324

2425
const actionVariableContextEntityIdLabel = i18n.translate(
2526
'xpack.stackAlerts.geoContainment.actionVariableContextEntityIdLabel',
@@ -142,7 +143,8 @@ export type GeoContainmentAlertType = AlertType<
142143
GeoContainmentState,
143144
GeoContainmentInstanceState,
144145
GeoContainmentInstanceContext,
145-
typeof ActionGroupId
146+
typeof ActionGroupId,
147+
typeof RecoveryActionGroupId
146148
>;
147149

148150
export function getAlertType(logger: Logger): GeoContainmentAlertType {
@@ -162,7 +164,7 @@ export function getAlertType(logger: Logger): GeoContainmentAlertType {
162164
name: alertTypeName,
163165
actionGroups: [{ id: ActionGroupId, name: actionGroupName }],
164166
recoveryActionGroup: {
165-
id: 'notGeoContained',
167+
id: RecoveryActionGroupId,
166168
name: i18n.translate('xpack.stackAlerts.geoContainment.notGeoContained', {
167169
defaultMessage: 'No longer contained',
168170
}),

x-pack/plugins/stack_alerts/server/alert_types/geo_containment/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
GeoContainmentInstanceContext,
1414
getAlertType,
1515
ActionGroupId,
16+
RecoveryActionGroupId,
1617
} from './alert_type';
1718

1819
interface RegisterParams {
@@ -27,6 +28,7 @@ export function register(params: RegisterParams) {
2728
GeoContainmentState,
2829
GeoContainmentInstanceState,
2930
GeoContainmentInstanceContext,
30-
typeof ActionGroupId
31+
typeof ActionGroupId,
32+
typeof RecoveryActionGroupId
3133
>(getAlertType(logger));
3234
}

0 commit comments

Comments
 (0)