From f8fe48c3294bd90eb87afe0cd368475720454a41 Mon Sep 17 00:00:00 2001 From: Janki Salvi <117571355+js-jankisalvi@users.noreply.github.com> Date: Mon, 4 Sep 2023 10:10:14 +0200 Subject: [PATCH] [Cases] Add contentManagement dependency to Observability and Security solution plugins (#165225) 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 | 4 ++-- 8 files changed, 14 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/observability/kibana.jsonc b/x-pack/plugins/observability/kibana.jsonc index 2ced468eb1f9..a88f6543871e 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 81c3aa70cbd3..e30d5254e7a0 100644 --- a/x-pack/plugins/observability/public/plugin.mock.tsx +++ b/x-pack/plugins/observability/public/plugin.mock.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; +import { contentManagementMock } from '@kbn/content-management-plugin/public/mocks'; const triggersActionsUiStartMock = { createStart() { @@ -94,6 +95,7 @@ export const observabilityPublicPluginsStartMock = { return { cases: mockCasesContract(), charts: chartPluginMock.createStartContract(), + contentManagement: contentManagementMock.createStartContract(), triggersActionsUi: triggersActionsUiStartMock.createStart(), data: dataPluginMock.createStartContract(), dataViews: dataViews.createStart(), diff --git a/x-pack/plugins/observability/public/plugin.ts b/x-pack/plugins/observability/public/plugin.ts index 0a5b238023b4..77407c9bd25e 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 3fecda34a9ee..73543b3a8945 100644 --- a/x-pack/plugins/observability/tsconfig.json +++ b/x-pack/plugins/observability/tsconfig.json @@ -84,7 +84,8 @@ "@kbn/core-capabilities-common", "@kbn/deeplinks-analytics", "@kbn/observability-ai-assistant-plugin", - "@kbn/osquery-plugin" + "@kbn/osquery-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 91f366b5dd94..a2e7af427da0 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", @@ -46,7 +47,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 c482c7cfa161..a384999c32b5 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -194,7 +194,7 @@ export class Plugin implements IPlugin SecuritySolutionTemplateWrapper, }, - savedObjectsManagement: startPluginsDeps.savedObjectsManagement, + contentManagement: startPluginsDeps.contentManagement, telemetry: this.telemetry.start(), customDataService, topValuesPopover: new TopValuesPopoverService(), diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts index b1fc18359f4f..1fe94b394993 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; } @@ -161,7 +161,7 @@ export type StartServices = CoreStart & securityLayout: { getPluginWrapper: () => typeof SecuritySolutionTemplateWrapper; }; - savedObjectsManagement: SavedObjectsManagementPluginStart; + contentManagement: ContentManagementPublicStart; telemetry: TelemetryClientStart; customDataService: DataPublicPluginStart; topValuesPopover: TopValuesPopoverService; diff --git a/x-pack/plugins/security_solution/tsconfig.json b/x-pack/plugins/security_solution/tsconfig.json index 8355537470d6..5452acb5e6f0 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", @@ -172,6 +171,7 @@ "@kbn/core-logging-server-mocks", "@kbn/core-lifecycle-browser", "@kbn/security-solution-features", - "@kbn/handlebars" + "@kbn/handlebars", + "@kbn/content-management-plugin" ] }