Skip to content

Commit

Permalink
register dev tools into opensearch features category
Browse files Browse the repository at this point in the history
Signed-off-by: yuye-aws <[email protected]>
  • Loading branch information
yuye-aws committed Sep 13, 2023
1 parent 1290dc5 commit 37f3142
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
10 changes: 9 additions & 1 deletion src/core/utils/default_app_categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,20 @@ export const DEFAULT_APP_CATEGORIES: Record<string, AppCategory> = Object.freeze
order: 4000,
euiIconType: 'logoSecurity',
},
openSearchFeatures: {
id: 'openSearchFeatures',
label: i18n.translate('core.ui.openSearchFeaturesNavList.label', {
defaultMessage: 'OpenSearch Features',
}),
order: 5000,
euiIconType: 'folderClosed',
},
management: {
id: 'management',
label: i18n.translate('core.ui.managementNavList.label', {
defaultMessage: 'Management',
}),
order: 5000,
order: 6000,
euiIconType: 'managementApp',
},
});
2 changes: 1 addition & 1 deletion src/plugins/dev_tools/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class DevToolsPlugin implements Plugin<DevToolsSetup> {
icon: '/plugins/home/public/assets/logos/opensearch_mark_default.svg',
/* the order of dev tools, it shows as last item of management section */
order: 9070,
category: DEFAULT_APP_CATEGORIES.management,
category: DEFAULT_APP_CATEGORIES.openSearchFeatures,
mount: async (params: AppMountParameters) => {
const { element, history } = params;
element.classList.add('devAppWrapper');
Expand Down
5 changes: 3 additions & 2 deletions src/plugins/workspace/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
import { i18n } from '@osd/i18n';
import { Observable } from 'rxjs';

import {
PluginInitializerContext,
CoreSetup,
Expand All @@ -26,7 +25,7 @@ import { IWorkspaceDBImpl } from './types';
import { WorkspaceClientWithSavedObject } from './workspace_client';
import { WorkspaceSavedObjectsClientWrapper } from './saved_objects';
import { registerRoutes } from './routes';
import { WORKSPACE_OVERVIEW_APP_ID, WORKSPACE_UPDATE_APP_ID } from '../common/constants';
import { WORKSPACE_OVERVIEW_APP_ID } from '../common/constants';
import { ConfigSchema } from '../config';

export class WorkspacePlugin implements Plugin<{}, {}> {
Expand Down Expand Up @@ -133,6 +132,7 @@ export class WorkspacePlugin implements Plugin<{}, {}> {
users: ['*'],
});
const DSM_APP_ID = 'dataSources';
const DEV_TOOLS_APP_ID = 'dev_tools';

await Promise.all([
this.checkAndCreateWorkspace(
Expand All @@ -157,6 +157,7 @@ export class WorkspacePlugin implements Plugin<{}, {}> {
`@${DEFAULT_APP_CATEGORIES.management.id}`,
WORKSPACE_OVERVIEW_APP_ID,
DSM_APP_ID,
DEV_TOOLS_APP_ID,
],
},
managementWorkspaceACL.getPermissions()
Expand Down

0 comments on commit 37f3142

Please sign in to comment.