Skip to content

Commit

Permalink
use cleanWorkspaceId
Browse files Browse the repository at this point in the history
Signed-off-by: tygao <tygao@amazon.com>
  • Loading branch information
raintygao committed Oct 27, 2023
1 parent d3a7982 commit d2348ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/core/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,4 +357,5 @@ export {
PUBLIC_WORKSPACE_ID,
MANAGEMENT_WORKSPACE_ID,
WORKSPACE_TYPE,
cleanWorkspaceId,
} from '../utils';
11 changes: 8 additions & 3 deletions src/plugins/workspace/public/components/workspace_list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { debounce } from '../utils/common';

import { WORKSPACE_CREATE_APP_ID } from '../../../common/constants';

import { cleanWorkspaceId } from '../../../../../core/public';

const WORKSPACE_LIST_PAGE_DESCRIPTIOIN = i18n.translate('workspace.list.description', {
defaultMessage:
'Workspace allow you to save and organize library items, such as index patterns, visualizations, dashboards, saved searches, and share them with other OpenSearch Dashboards users. You can control which features are visible in each workspace, and which users and groups have read and write access to the library items in the workspace.',
Expand Down Expand Up @@ -127,9 +129,12 @@ export const WorkspaceList = () => {
if (!application || !http) {
return '';
}
return application.getUrlForApp(WORKSPACE_CREATE_APP_ID, {
absolute: false,
});

return cleanWorkspaceId(
application.getUrlForApp(WORKSPACE_CREATE_APP_ID, {
absolute: false,
})
);
}, [application, http]);

const debouncedSetQueryInput = useMemo(() => {
Expand Down

0 comments on commit d2348ff

Please sign in to comment.