Skip to content

Commit

Permalink
fixed typing in GeoContainmentAlertType
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Jan 5, 2021
1 parent 26e28ea commit 9e4ab20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { Query } from '../../../../../../src/plugins/data/common/query';

export const GEO_CONTAINMENT_ID = '.geo-containment';
export const ActionGroupId = 'Tracked entity contained';
export const RecoveryActionGroupId = 'notGeoContained';

const actionVariableContextEntityIdLabel = i18n.translate(
'xpack.stackAlerts.geoContainment.actionVariableContextEntityIdLabel',
Expand Down Expand Up @@ -142,7 +143,8 @@ export type GeoContainmentAlertType = AlertType<
GeoContainmentState,
GeoContainmentInstanceState,
GeoContainmentInstanceContext,
typeof ActionGroupId
typeof ActionGroupId,
typeof RecoveryActionGroupId
>;

export function getAlertType(logger: Logger): GeoContainmentAlertType {
Expand All @@ -162,7 +164,7 @@ export function getAlertType(logger: Logger): GeoContainmentAlertType {
name: alertTypeName,
actionGroups: [{ id: ActionGroupId, name: actionGroupName }],
recoveryActionGroup: {
id: 'notGeoContained',
id: RecoveryActionGroupId,
name: i18n.translate('xpack.stackAlerts.geoContainment.notGeoContained', {
defaultMessage: 'No longer contained',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
GeoContainmentInstanceContext,
getAlertType,
ActionGroupId,
RecoveryActionGroupId,
} from './alert_type';

interface RegisterParams {
Expand All @@ -27,6 +28,7 @@ export function register(params: RegisterParams) {
GeoContainmentState,
GeoContainmentInstanceState,
GeoContainmentInstanceContext,
typeof ActionGroupId
typeof ActionGroupId,
typeof RecoveryActionGroupId
>(getAlertType(logger));
}

0 comments on commit 9e4ab20

Please sign in to comment.