Skip to content

Commit

Permalink
Add explore category left menu
Browse files Browse the repository at this point in the history
  • Loading branch information
yenienserrano committed Feb 5, 2024
1 parent 2d2dbc6 commit cdbc9bb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
8 changes: 8 additions & 0 deletions src/core/utils/default_app_categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ import { AppCategory } from '../types';

/** @internal */
export const DEFAULT_APP_CATEGORIES: Record<string, AppCategory> = 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', {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/dashboard/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/discover/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/visualize/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit cdbc9bb

Please sign in to comment.