From 403d948ad38662aabbe4332e04bd54f51dc443a0 Mon Sep 17 00:00:00 2001 From: Janki Salvi <117571355+js-jankisalvi@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:59:42 +0200 Subject: [PATCH] [8.10] [Cases] Add contentManagement dependency to Observability and Security solution plugins (#165225) (#165574) # Backport This will backport the following commits from `main` to `8.10`: - [[Cases] Add contentManagement dependency to Observability and Security solution plugins (#165225)](https://github.com/elastic/kibana/pull/165225) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- x-pack/plugins/observability/kibana.jsonc | 1 + x-pack/plugins/observability/public/plugin.mock.tsx | 2 ++ x-pack/plugins/observability/public/plugin.ts | 2 ++ x-pack/plugins/observability/tsconfig.json | 3 ++- x-pack/plugins/security_solution/kibana.jsonc | 2 +- x-pack/plugins/security_solution/public/plugin.tsx | 2 +- x-pack/plugins/security_solution/public/types.ts | 6 +++--- x-pack/plugins/security_solution/tsconfig.json | 2 +- 8 files changed, 13 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/observability/kibana.jsonc b/x-pack/plugins/observability/kibana.jsonc index 2ced468eb1f98..a88f6543871e4 100644 --- a/x-pack/plugins/observability/kibana.jsonc +++ b/x-pack/plugins/observability/kibana.jsonc @@ -11,6 +11,7 @@ "alerting", "cases", "charts", + "contentManagement", "data", "dataViews", "dataViewEditor", diff --git a/x-pack/plugins/observability/public/plugin.mock.tsx b/x-pack/plugins/observability/public/plugin.mock.tsx index 37c183cba815c..3cb0294ffd6a9 100644 --- a/x-pack/plugins/observability/public/plugin.mock.tsx +++ b/x-pack/plugins/observability/public/plugin.mock.tsx @@ -6,6 +6,7 @@ */ import React from 'react'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; +import { contentManagementMock } from '@kbn/content-management-plugin/public/mocks'; import { timefilterServiceMock } from '@kbn/data-plugin/public/query/timefilter/timefilter_service.mock'; const triggersActionsUiStartMock = { @@ -110,6 +111,7 @@ export const observabilityPublicPluginsStartMock = { createStart() { return { cases: mockCasesContract(), + contentManagement: contentManagementMock.createStartContract(), triggersActionsUi: triggersActionsUiStartMock.createStart(), data: data.createStart(), dataViews: dataViews.createStart(), diff --git a/x-pack/plugins/observability/public/plugin.ts b/x-pack/plugins/observability/public/plugin.ts index 0a5b238023b4e..77407c9bd25e8 100644 --- a/x-pack/plugins/observability/public/plugin.ts +++ b/x-pack/plugins/observability/public/plugin.ts @@ -39,6 +39,7 @@ import { TriggersAndActionsUIPublicPluginSetup, TriggersAndActionsUIPublicPluginStart, } from '@kbn/triggers-actions-ui-plugin/public'; +import type { ContentManagementPublicStart } from '@kbn/content-management-plugin/public'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; import { @@ -115,6 +116,7 @@ export interface ObservabilityPublicPluginsStart { actionTypeRegistry: ActionTypeRegistryContract; cases: CasesUiStart; charts: ChartsPluginStart; + contentManagement: ContentManagementPublicStart; data: DataPublicPluginStart; dataViews: DataViewsPublicPluginStart; dataViewEditor: DataViewEditorStart; diff --git a/x-pack/plugins/observability/tsconfig.json b/x-pack/plugins/observability/tsconfig.json index 5004d592c588b..b6ba13c6aa147 100644 --- a/x-pack/plugins/observability/tsconfig.json +++ b/x-pack/plugins/observability/tsconfig.json @@ -83,7 +83,8 @@ "@kbn/actions-plugin", "@kbn/core-capabilities-common", "@kbn/deeplinks-analytics", - "@kbn/observability-ai-assistant-plugin" + "@kbn/observability-ai-assistant-plugin", + "@kbn/content-management-plugin" ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/security_solution/kibana.jsonc b/x-pack/plugins/security_solution/kibana.jsonc index f4716adfca310..e3bda3f4c9c25 100644 --- a/x-pack/plugins/security_solution/kibana.jsonc +++ b/x-pack/plugins/security_solution/kibana.jsonc @@ -17,6 +17,7 @@ "cloud", "cloudDefend", "cloudSecurityPosture", + "contentManagement", "dashboard", "data", "dataViews", @@ -45,7 +46,6 @@ "files", "controls", "dataViewEditor", - "savedObjectsManagement", "stackConnectors", "discover", "notifications" diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index cd647ef499260..85bea6d65686d 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -193,7 +193,7 @@ export class Plugin implements IPlugin SecuritySolutionTemplateWrapper, }, - savedObjectsManagement: startPluginsDeps.savedObjectsManagement, + contentManagement: startPluginsDeps.contentManagement, telemetry: this.telemetry.start(), discoverFilterManager: filterManager, customDataService, diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts index ce754bdc29307..03f67db937e38 100644 --- a/x-pack/plugins/security_solution/public/types.ts +++ b/x-pack/plugins/security_solution/public/types.ts @@ -48,7 +48,7 @@ import type { ThreatIntelligencePluginStart } from '@kbn/threat-intelligence-plu import type { CloudExperimentsPluginStart } from '@kbn/cloud-experiments-plugin/common'; import type { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public'; import type { DataViewsServicePublic } from '@kbn/data-views-plugin/public'; -import type { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; +import type { ContentManagementPublicStart } from '@kbn/content-management-plugin/public'; import type { RouteProps } from 'react-router-dom'; import type { DiscoverStart } from '@kbn/discover-plugin/public'; @@ -133,7 +133,7 @@ export interface StartPlugins { } export interface StartPluginsDependencies extends StartPlugins { - savedObjectsManagement: SavedObjectsManagementPluginStart; + contentManagement: ContentManagementPublicStart; savedObjectsTaggingOss: SavedObjectTaggingOssPluginStart; } @@ -160,7 +160,7 @@ export type StartServices = CoreStart & securityLayout: { getPluginWrapper: () => typeof SecuritySolutionTemplateWrapper; }; - savedObjectsManagement: SavedObjectsManagementPluginStart; + contentManagement: ContentManagementPublicStart; telemetry: TelemetryClientStart; discoverFilterManager: FilterManager; customDataService: DataPublicPluginStart; diff --git a/x-pack/plugins/security_solution/tsconfig.json b/x-pack/plugins/security_solution/tsconfig.json index 97e757c663a4d..c77a5143f0c1a 100644 --- a/x-pack/plugins/security_solution/tsconfig.json +++ b/x-pack/plugins/security_solution/tsconfig.json @@ -149,7 +149,6 @@ "@kbn/expandable-flyout", "@kbn/securitysolution-grouping", "@kbn/securitysolution-data-table", - "@kbn/saved-objects-management-plugin", "@kbn/core-analytics-server", "@kbn/analytics-client", "@kbn/security-solution-side-nav", @@ -169,5 +168,6 @@ "@kbn/core-logging-server-mocks", "@kbn/core-lifecycle-browser", "@kbn/handlebars", + "@kbn/content-management-plugin" ] }