Skip to content

Commit

Permalink
Update config to enable geo alerts: enableGeoTrackingThresholdAlert -…
Browse files Browse the repository at this point in the history
…> enableGeoAlerts
  • Loading branch information
Aaron Caldwell committed Dec 2, 2020
1 parent af967c6 commit dd727b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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>;
2 changes: 1 addition & 1 deletion x-pack/plugins/stack_alerts/public/alert_types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function registerAlertTypes({
alertTypeRegistry: TriggersAndActionsUIPublicPluginSetup['alertTypeRegistry'];
config: Config;
}) {
if (config.enableGeoTrackingThresholdAlert) {
if (config.enableGeoAlerts) {
alertTypeRegistry.register(getGeoThresholdAlertType());
alertTypeRegistry.register(getGeoContainmentAlertType());
}
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/stack_alerts/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export { ID as INDEX_THRESHOLD_ID } from './alert_types/index_threshold/alert_ty

export const config: PluginConfigDescriptor<Config> = {
exposeToBrowser: {
enableGeoTrackingThresholdAlert: true,
enableGeoAlerts: true,
},
schema: configSchema,
deprecations: ({ renameFromRoot }) => [
renameFromRoot(
'xpack.triggers_actions_ui.enableGeoTrackingThresholdAlert',
'xpack.stack_alerts.enableGeoTrackingThresholdAlert'
'xpack.stack_alerts.enableGeoAlerts'
),
],
};
Expand Down

0 comments on commit dd727b5

Please sign in to comment.