From 2a596b0a471b7fffa6921a8989f39f048628e303 Mon Sep 17 00:00:00 2001 From: tygao Date: Fri, 8 Sep 2023 10:23:44 +0800 Subject: [PATCH] feat: retire management section Signed-off-by: tygao --- .../public/core_app/errors/url_overflow.tsx | 2 +- .../core_app/errors/url_overflow_ui.tsx | 2 +- .../ui_settings/saved_objects/ui_settings.ts | 2 +- .../opensearch_dashboards.json | 2 +- .../advanced_settings/public/plugin.ts | 16 -------- .../components/top_nav/open_search_panel.js | 2 +- .../overview_page_footer.tsx | 2 +- .../overview_page_header.tsx | 2 +- .../opensearch_dashboards.json | 2 +- .../saved_objects_management/public/plugin.ts | 39 +------------------ 10 files changed, 9 insertions(+), 62 deletions(-) diff --git a/src/core/public/core_app/errors/url_overflow.tsx b/src/core/public/core_app/errors/url_overflow.tsx index 6dbfa96fff46..1de6fe785cf9 100644 --- a/src/core/public/core_app/errors/url_overflow.tsx +++ b/src/core/public/core_app/errors/url_overflow.tsx @@ -92,7 +92,7 @@ export const setupUrlOverflowDetection = ({ basePath, history, toasts, uiSetting values={{ storeInSessionStorageParam: state:storeInSessionStorage, advancedSettingsLink: ( - + = ({ basePath }) = values={{ storeInSessionStorageConfig: state:storeInSessionStorage, opensearchDashboardsSettingsLink: ( - + = ({ addBasePath, path }) => { diff --git a/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx b/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx index 00273fcf993b..6e3fc5b6d6ce 100644 --- a/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx +++ b/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx @@ -184,7 +184,7 @@ export const OverviewPageHeader: FC = ({ className="osdOverviewPageHeader__actionButton" flush="both" iconType="gear" - href={addBasePath('/app/management')} + href={addBasePath('/app/settings')} > {i18n.translate( 'opensearch-dashboards-react.osdOverviewPageHeader.stackManagementButtonLabel', diff --git a/src/plugins/saved_objects_management/opensearch_dashboards.json b/src/plugins/saved_objects_management/opensearch_dashboards.json index f76b69999ecb..c11db98fcc23 100644 --- a/src/plugins/saved_objects_management/opensearch_dashboards.json +++ b/src/plugins/saved_objects_management/opensearch_dashboards.json @@ -13,5 +13,5 @@ "visAugmenter" ], "extraPublicDirs": ["public/lib"], - "requiredBundles": ["opensearchDashboardsReact", "home"] + "requiredBundles": ["opensearchDashboardsReact"] } diff --git a/src/plugins/saved_objects_management/public/plugin.ts b/src/plugins/saved_objects_management/public/plugin.ts index c24002b1e10d..c2fdca87a683 100644 --- a/src/plugins/saved_objects_management/public/plugin.ts +++ b/src/plugins/saved_objects_management/public/plugin.ts @@ -28,7 +28,6 @@ * under the License. */ -import { i18n } from '@osd/i18n'; import { AppMountParameters, CoreSetup, CoreStart, Plugin } from 'src/core/public'; import { VisBuilderStart } from '../../vis_builder/public'; @@ -37,7 +36,7 @@ import { UiActionsSetup, UiActionsStart } from '../../ui_actions/public'; import { DataPublicPluginStart } from '../../data/public'; import { DashboardStart } from '../../dashboard/public'; import { DiscoverStart } from '../../discover/public'; -import { HomePublicPluginSetup, FeatureCatalogueCategory } from '../../home/public'; +import { HomePublicPluginSetup } from '../../home/public'; import { VisualizationsStart } from '../../visualizations/public'; import { VisAugmenterStart } from '../../vis_augmenter/public'; import { @@ -59,7 +58,6 @@ import { DEFAULT_APP_CATEGORIES } from '../../../core/public'; import { ALL_LIBRARY_OBJECTS_TITLE_WORDINGS, ALL_LIBRARY_OBJECTS_WORDINGS, - SAVED_OBJECT_MANAGEMENT_TITLE_WORDINGS, SAVED_QUERIES_WORDINGS, SAVED_SEARCHES_WORDINGS, } from './constants'; @@ -177,41 +175,6 @@ export class SavedObjectsManagementPlugin const columnSetup = this.columnService.setup(); const namespaceSetup = this.namespaceService.setup(); - if (home) { - home.featureCatalogue.register({ - id: 'saved_objects', - title: i18n.translate('savedObjectsManagement.objects.savedObjectsTitle', { - defaultMessage: 'Saved Objects', - }), - description: i18n.translate('savedObjectsManagement.objects.savedObjectsDescription', { - defaultMessage: - 'Import, export, and manage your saved searches, visualizations, and dashboards.', - }), - icon: 'savedObjectsApp', - path: '/app/management/opensearch-dashboards/objects', - showOnHomePage: false, - category: FeatureCatalogueCategory.ADMIN, - }); - } - - const opensearchDashboardsSection = management.sections.section.opensearchDashboards; - opensearchDashboardsSection.registerApp({ - id: 'objects', - title: i18n.translate('savedObjectsManagement.managementSectionLabel', { - defaultMessage: 'Saved objects', - }), - order: 1, - mount: async (mountParams) => { - const { mountManagementSection } = await import('./management_section'); - return mountManagementSection({ - core, - serviceRegistry: this.serviceRegistry, - mountParams, - title: SAVED_OBJECT_MANAGEMENT_TITLE_WORDINGS, - }); - }, - }); - // sets up the context mappings and registers any triggers/actions for the plugin bootstrap(uiActions);