Skip to content

Commit

Permalink
Add geo containment tracking alert type (#84151)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Caldwell authored Dec 3, 2020
1 parent 08bb038 commit 8ab43da
Show file tree
Hide file tree
Showing 28 changed files with 2,763 additions and 5 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/stack_alerts/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { schema, TypeOf } from '@kbn/config-schema';

export const configSchema = schema.object({
enabled: schema.boolean({ defaultValue: true }),
enableGeoTrackingThresholdAlert: schema.boolean({ defaultValue: false }),
enableGeoAlerts: schema.boolean({ defaultValue: false }),
});

export type Config = TypeOf<typeof configSchema>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { lazy } from 'react';
import { i18n } from '@kbn/i18n';
import { validateExpression } from './validation';
import { GeoContainmentAlertParams } from './types';
import { AlertTypeModel, AlertsContextValue } from '../../../../triggers_actions_ui/public';

export function getAlertType(): AlertTypeModel<GeoContainmentAlertParams, AlertsContextValue> {
return {
id: '.geo-containment',
name: i18n.translate('xpack.stackAlerts.geoContainment.name.trackingContainment', {
defaultMessage: 'Tracking containment',
}),
description: i18n.translate('xpack.stackAlerts.geoContainment.descriptionText', {
defaultMessage: 'Alert when an entity is contained within a geo boundary.',
}),
iconClass: 'globe',
documentationUrl: null,
alertParamsExpression: lazy(() => import('./query_builder')),
validate: validateExpression,
requiresAppContext: false,
};
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8ab43da

Please sign in to comment.