Skip to content

Commit

Permalink
Update config usage from geoAlerts -> geoAlerting
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Caldwell committed Dec 8, 2020
1 parent d19b558 commit 765aa29
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 }),
enableGeoAlerts: schema.boolean({ defaultValue: false }),
enableGeoAlerting: 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.enableGeoAlerts) {
if (config.enableGeoAlerting) {
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: {
enableGeoAlerts: true,
enableGeoAlerting: true,
},
schema: configSchema,
deprecations: ({ renameFromRoot }) => [
renameFromRoot(
'xpack.triggers_actions_ui.enableGeoTrackingThresholdAlert',
'xpack.stack_alerts.enableGeoAlerts'
'xpack.stack_alerts.enableGeoAlerting'
),
],
};
Expand Down

0 comments on commit 765aa29

Please sign in to comment.