diff --git a/src/plugins/saved_objects_management/public/plugin.ts b/src/plugins/saved_objects_management/public/plugin.ts index 0e1cbd3852b2..a7e1c0d1a1cb 100644 --- a/src/plugins/saved_objects_management/public/plugin.ts +++ b/src/plugins/saved_objects_management/public/plugin.ts @@ -29,17 +29,10 @@ */ import { i18n } from '@osd/i18n'; -import { - AppMountParameters, - CoreSetup, - CoreStart, - Plugin, - ChromeBreadcrumb, - ScopedHistory, -} from 'src/core/public'; +import { AppMountParameters, CoreSetup, CoreStart, Plugin } from 'src/core/public'; import { VisBuilderStart } from '../../vis_builder/public'; -import { ManagementSetup, ManagementAppMountParams } from '../../management/public'; +import { ManagementSetup } from '../../management/public'; import { UiActionsSetup, UiActionsStart } from '../../ui_actions/public'; import { DataPublicPluginStart } from '../../data/public'; import { DashboardStart } from '../../dashboard/public'; @@ -65,18 +58,15 @@ import { bootstrap } from './ui_actions_bootstrap'; import { DEFAULT_APP_CATEGORIES } from '../../../core/public'; import { MANAGE_LIBRARY_TITLE_WORDINGS, - SAVED_OBJECT_MANAGEMENT_TITLE_WORDINGS, SAVED_QUERIES_WORDINGS, SAVED_SEARCHES_WORDINGS, } from './constants'; -import { reactRouterNavigate } from '../../opensearch_dashboards_react/public'; export interface SavedObjectsManagementPluginSetup { actions: SavedObjectsManagementActionServiceSetup; columns: SavedObjectsManagementColumnServiceSetup; namespaces: SavedObjectsManagementNamespaceServiceSetup; serviceRegistry: ISavedObjectsManagementServiceRegistry; - registerLibrarySubApp: () => void; } export interface SavedObjectsManagementPluginStart { @@ -201,46 +191,6 @@ export class SavedObjectsManagementPlugin }); } - core.application.register({ - id: 'objects', - title: i18n.translate('savedObjectsManagement.managementSectionLabel', { - defaultMessage: 'Saved objects', - }), - category: DEFAULT_APP_CATEGORIES.opensearchDashboards, - mount: async (params: AppMountParameters) => { - const { mountManagementSection } = await import('./management_section'); - const [coreStart] = await core.getStartServices(); - - const setBreadcrumbsScope = ( - crumbs: ChromeBreadcrumb[] = [], - appHistory?: ScopedHistory - ) => { - const wrapBreadcrumb = (item: ChromeBreadcrumb, scopedHistory: ScopedHistory) => ({ - ...item, - ...(item.href ? reactRouterNavigate(scopedHistory, item.href) : {}), - }); - - coreStart.chrome.setBreadcrumbs([ - ...crumbs.map((item) => wrapBreadcrumb(item, appHistory || params.history)), - ]); - }; - - const managementParams: ManagementAppMountParams = { - element: params.element, - history: params.history, - setBreadcrumbs: setBreadcrumbsScope, - basePath: params.appBasePath, - }; - - return mountManagementSection({ - core, - serviceRegistry: this.serviceRegistry, - mountParams: managementParams, - title: SAVED_OBJECT_MANAGEMENT_TITLE_WORDINGS, - }); - }, - }); - // sets up the context mappings and registers any triggers/actions for the plugin bootstrap(uiActions); @@ -254,7 +204,6 @@ export class SavedObjectsManagementPlugin columns: columnSetup, namespaces: namespaceSetup, serviceRegistry: this.serviceRegistry, - registerLibrarySubApp: () => {}, }; } diff --git a/src/plugins/workspace/public/plugin.ts b/src/plugins/workspace/public/plugin.ts index d508cf195a65..bb82faed59ec 100644 --- a/src/plugins/workspace/public/plugin.ts +++ b/src/plugins/workspace/public/plugin.ts @@ -93,9 +93,6 @@ export class WorkspacePlugin implements Plugin<{}, {}, WorkspacePluginSetupDeps> */ savedObjectsManagement?.columns.register(getWorkspaceColumn(core)); - // register apps for library object management - savedObjectsManagement?.registerLibrarySubApp(); - type WorkspaceAppType = (params: AppMountParameters, services: Services) => () => void; const mountWorkspaceApp = async (params: AppMountParameters, renderApp: WorkspaceAppType) => { const [coreStart] = await core.getStartServices();