X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/00bf04d74afad9970678b87c02942003e0712cd2..00a61a4484185dc98daa92af5f189779cc10ad3c:/src/routes/routes.ts diff --git a/src/routes/routes.ts b/src/routes/routes.ts index f108e0b8..432cf750 100644 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@ -15,7 +15,10 @@ export const Routes = { PROCESSES: `/processes/:id(${RESOURCE_UUID_PATTERN})`, FAVORITES: '/favorites', TRASH: '/trash', - PROCESS_LOGS: `/process-logs/:id(${RESOURCE_UUID_PATTERN})` + PROCESS_LOGS: `/process-logs/:id(${RESOURCE_UUID_PATTERN})`, + SHARED_WITH_ME: '/shared-with-me', + RUN_PROCESS: '/run-process', + WORKFLOWS: '/workflows' }; export const getResourceUrl = (uuid: string) => { @@ -25,6 +28,8 @@ export const getResourceUrl = (uuid: string) => { return getProjectUrl(uuid); case ResourceKind.COLLECTION: return getCollectionUrl(uuid); + case ResourceKind.PROCESS: + return getProcessUrl(uuid); default: return undefined; } @@ -58,3 +63,12 @@ export const matchProcessRoute = (route: string) => export const matchProcessLogRoute = (route: string) => matchPath(route, { path: Routes.PROCESS_LOGS }); + +export const matchSharedWithMeRoute = (route: string) => + matchPath(route, { path: Routes.SHARED_WITH_ME }); + +export const matchRunProcessRoute = (route: string) => + matchPath(route, { path: Routes.RUN_PROCESS }); + +export const matchWorkflowRoute = (route: string) => + matchPath(route, { path: Routes.WORKFLOWS });