Update config usage from geoAlerts -> geoAlerting (#85220)

This commit is contained in:
Aaron Caldwell 2020-12-09 09:25:58 -07:00 committed by GitHub
parent 039c8e1894
commit 402641ed9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -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>;

View file

@ -17,7 +17,7 @@ export function registerAlertTypes({
alertTypeRegistry: TriggersAndActionsUIPublicPluginSetup['alertTypeRegistry'];
config: Config;
}) {
if (config.enableGeoAlerts) {
if (config.enableGeoAlerting) {
alertTypeRegistry.register(getGeoThresholdAlertType());
alertTypeRegistry.register(getGeoContainmentAlertType());
}

View file

@ -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'
),
],
};