Update config usage from geoAlerts -> geoAlerting (#85220)
This commit is contained in:
parent
039c8e1894
commit
402641ed9d
|
@ -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>;
|
||||
|
|
|
@ -17,7 +17,7 @@ export function registerAlertTypes({
|
|||
alertTypeRegistry: TriggersAndActionsUIPublicPluginSetup['alertTypeRegistry'];
|
||||
config: Config;
|
||||
}) {
|
||||
if (config.enableGeoAlerts) {
|
||||
if (config.enableGeoAlerting) {
|
||||
alertTypeRegistry.register(getGeoThresholdAlertType());
|
||||
alertTypeRegistry.register(getGeoContainmentAlertType());
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
),
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue