From f2bbef300163ea1aa199856155b290890247505b Mon Sep 17 00:00:00 2001 From: Zacqary Xeper Date: Tue, 2 Mar 2021 11:15:53 -0600 Subject: [PATCH] [Alerts] Add spaces as optional dep to triggers_actions_ui --- x-pack/plugins/triggers_actions_ui/kibana.json | 2 +- x-pack/plugins/triggers_actions_ui/public/application/app.tsx | 3 +++ x-pack/plugins/triggers_actions_ui/public/plugin.ts | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/triggers_actions_ui/kibana.json b/x-pack/plugins/triggers_actions_ui/kibana.json index 0487c58e66269..2938d94bf426a 100644 --- a/x-pack/plugins/triggers_actions_ui/kibana.json +++ b/x-pack/plugins/triggers_actions_ui/kibana.json @@ -3,7 +3,7 @@ "version": "kibana", "server": true, "ui": true, - "optionalPlugins": ["alerts", "features", "home"], + "optionalPlugins": ["alerts", "features", "home", "spaces"], "requiredPlugins": ["management", "charts", "data", "kibanaReact", "kibanaUtils", "savedObjects"], "configPath": ["xpack", "trigger_actions_ui"], "extraPublicDirs": ["public/common", "public/common/constants"], diff --git a/x-pack/plugins/triggers_actions_ui/public/application/app.tsx b/x-pack/plugins/triggers_actions_ui/public/application/app.tsx index 0a59cff98ce26..0afb81031e3bc 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/app.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/app.tsx @@ -17,6 +17,8 @@ import { ActionTypeRegistryContract, AlertTypeRegistryContract } from '../types' import { ChartsPluginStart } from '../../../../../src/plugins/charts/public'; import { DataPublicPluginStart } from '../../../../../src/plugins/data/public'; import { PluginStartContract as AlertingStart } from '../../../alerts/public'; +import type { SpacesPluginStart } from '../../../spaces/public'; + import { suspendedComponentWithProps } from './lib/suspended_component_with_props'; import { Storage } from '../../../../../src/plugins/kibana_utils/public'; import { EuiThemeProvider } from '../../../../../src/plugins/kibana_react/common'; @@ -33,6 +35,7 @@ export interface TriggersAndActionsUiServices extends CoreStart { data: DataPublicPluginStart; charts: ChartsPluginStart; alerts?: AlertingStart; + spaces?: SpacesPluginStart; storage?: Storage; setBreadcrumbs: (crumbs: ChromeBreadcrumb[]) => void; actionTypeRegistry: ActionTypeRegistryContract; diff --git a/x-pack/plugins/triggers_actions_ui/public/plugin.ts b/x-pack/plugins/triggers_actions_ui/public/plugin.ts index e4477c6a8e60e..7c3c273c1f384 100644 --- a/x-pack/plugins/triggers_actions_ui/public/plugin.ts +++ b/x-pack/plugins/triggers_actions_ui/public/plugin.ts @@ -25,6 +25,7 @@ import { ChartsPluginStart } from '../../../../src/plugins/charts/public'; import { PluginStartContract as AlertingStart } from '../../alerts/public'; import { DataPublicPluginStart } from '../../../../src/plugins/data/public'; import { Storage } from '../../../../src/plugins/kibana_utils/public'; +import type { SpacesPluginStart } from '../../spaces/public'; import { getAddConnectorFlyoutLazy } from './common/get_add_connector_flyout'; import { getEditConnectorFlyoutLazy } from './common/get_edit_connector_flyout'; @@ -68,6 +69,7 @@ interface PluginsStart { data: DataPublicPluginStart; charts: ChartsPluginStart; alerts?: AlertingStart; + spaces?: SpacesPluginStart; navigateToApp: CoreStart['application']['navigateToApp']; features: FeaturesPluginStart; } @@ -142,6 +144,7 @@ export class Plugin data: pluginsStart.data, charts: pluginsStart.charts, alerts: pluginsStart.alerts, + spaces: pluginsStart.spaces, element: params.element, storage: new Storage(window.localStorage), setBreadcrumbs: params.setBreadcrumbs,