diff --git a/src/core/public/index.ts b/src/core/public/index.ts index 1f26a26de8ef..609bf53f0ba2 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -357,4 +357,5 @@ export { PUBLIC_WORKSPACE_ID, MANAGEMENT_WORKSPACE_ID, WORKSPACE_TYPE, + cleanWorkspaceId, } from '../utils'; diff --git a/src/plugins/workspace/public/components/workspace_list/index.tsx b/src/plugins/workspace/public/components/workspace_list/index.tsx index 58b5f467373e..201f1928b8fc 100644 --- a/src/plugins/workspace/public/components/workspace_list/index.tsx +++ b/src/plugins/workspace/public/components/workspace_list/index.tsx @@ -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.', @@ -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(() => {