From cdbc9bbe187cae68628867f1d1d168549c1e5f5b Mon Sep 17 00:00:00 2001 From: Ian Yenien Serrano Date: Mon, 5 Feb 2024 18:29:44 +0100 Subject: [PATCH] Add explore category left menu --- src/core/utils/default_app_categories.ts | 8 ++++++++ src/plugins/dashboard/public/plugin.tsx | 4 ++-- src/plugins/discover/public/plugin.ts | 4 ++-- src/plugins/visualize/public/plugin.ts | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/core/utils/default_app_categories.ts b/src/core/utils/default_app_categories.ts index 3c0920624e1b..5e358fc739f9 100644 --- a/src/core/utils/default_app_categories.ts +++ b/src/core/utils/default_app_categories.ts @@ -33,6 +33,14 @@ import { AppCategory } from '../types'; /** @internal */ export const DEFAULT_APP_CATEGORIES: Record = Object.freeze({ + explore: { + id: 'explore', + label: i18n.translate('core.ui.exploreNavList.label', { + defaultMessage: 'Explore', + }), + order: 100, + euiIconType: 'search', + }, opensearchDashboards: { id: 'opensearchDashboards', label: i18n.translate('core.ui.opensearchDashboardsNavList.label', { diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index dd874d3419f2..472d10eb8faa 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -366,11 +366,11 @@ export class DashboardPlugin const app: App = { id: DashboardConstants.DASHBOARDS_ID, title: 'Dashboards', - order: 2500, + order: 101, euiIconType: 'inputOutput', defaultPath: `#${DashboardConstants.LANDING_PAGE_PATH}`, updater$: this.appStateUpdater, - category: DEFAULT_APP_CATEGORIES.opensearchDashboards, + category: DEFAULT_APP_CATEGORIES.explore, mount: async (params: AppMountParameters) => { const [coreStart, pluginsStart, dashboardStart] = await core.getStartServices(); this.currentHistory = params.history; diff --git a/src/plugins/discover/public/plugin.ts b/src/plugins/discover/public/plugin.ts index f8e0f254f925..4b0d361a4f6e 100644 --- a/src/plugins/discover/public/plugin.ts +++ b/src/plugins/discover/public/plugin.ts @@ -247,10 +247,10 @@ export class DiscoverPlugin id: PLUGIN_ID, title: 'Discover', updater$: this.appStateUpdater.asObservable(), - order: 1000, + order: 100, euiIconType: 'inputOutput', defaultPath: '#/', - category: DEFAULT_APP_CATEGORIES.opensearchDashboards, + category: DEFAULT_APP_CATEGORIES.explore, mount: async (params: AppMountParameters) => { if (!this.initializeServices) { throw Error('Discover plugin method initializeServices is undefined'); diff --git a/src/plugins/visualize/public/plugin.ts b/src/plugins/visualize/public/plugin.ts index c146efef1fab..12c020d3d9a7 100644 --- a/src/plugins/visualize/public/plugin.ts +++ b/src/plugins/visualize/public/plugin.ts @@ -153,10 +153,10 @@ export class VisualizePlugin core.application.register({ id: 'visualize', title: 'Visualize', - order: 8000, + order: 102, euiIconType: 'inputOutput', defaultPath: '#/', - category: DEFAULT_APP_CATEGORIES.opensearchDashboards, + category: DEFAULT_APP_CATEGORIES.explore, updater$: this.appStateUpdater.asObservable(), // remove all references to visualize mount: async (params: AppMountParameters) => {