Skip to content

Commit

Permalink
feat: add workspace overview item by custom nav in start phase
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <wonglam@amazon.com>
  • Loading branch information
wanglam committed Jun 16, 2023
1 parent 66fb6bd commit 580db7c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plugins/workspace/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
AppMountParameters,
AppNavLinkStatus,
} from '../../../core/public';
import { WORKSPACE_APP_ID, WORKSPACE_ID_IN_SESSION_STORAGE } from '../common/constants';
import { WORKSPACE_APP_ID, WORKSPACE_ID_IN_SESSION_STORAGE, PATHS } from '../common/constants';
import { WORKSPACE_ID_QUERYSTRING_NAME } from '../../../core/public';
import { mountDropdownList } from './mount';

Expand Down Expand Up @@ -102,6 +102,12 @@ export class WorkspacesPlugin implements Plugin<{}, {}> {

public start(core: CoreStart) {
mountDropdownList(core);

core.chrome.setCustomNavLink({
title: i18n.translate('workspace.nav.title', { defaultMessage: 'Workspace Overview' }),
baseUrl: core.http.basePath.get(),
href: core.application.getUrlForApp(WORKSPACE_APP_ID, { path: PATHS.overview }),
});
return {};
}
}

0 comments on commit 580db7c

Please sign in to comment.