diff --git a/x-pack/plugins/uptime/public/apps/plugin.ts b/x-pack/plugins/uptime/public/apps/plugin.ts index 78f3dd1623a81..313c5c3f41ce6 100644 --- a/x-pack/plugins/uptime/public/apps/plugin.ts +++ b/x-pack/plugins/uptime/public/apps/plugin.ts @@ -51,19 +51,6 @@ export class UptimePlugin implements Plugin { - const alertInitializer = init({ - autocomplete: plugins.data.autocomplete, - store: this._store, - }); - if ( - plugins.triggers_actions_ui && - !plugins.triggers_actions_ui.alertTypeRegistry.has(alertInitializer.id) - ) { - plugins.triggers_actions_ui.alertTypeRegistry.register(alertInitializer); - } - }); - const self = this; core.application.register({ appRoute: '/app/uptime#/', @@ -89,8 +76,22 @@ export class UptimePlugin implements Plugin { + const alertInitializer = init({ + autocomplete: plugins.data.autocomplete, + store: this._store, + core: start, + plugins, + }); + if ( + plugins.triggers_actions_ui && + !plugins.triggers_actions_ui.alertTypeRegistry.has(alertInitializer.id) + ) { + plugins.triggers_actions_ui.alertTypeRegistry.register(alertInitializer); + } + }); } public stop(): void {}