Merge branch 'master' into 14225-prepare-structure-and-init-stepper
[arvados-workbench2.git] / src / routes / routes.ts
index 107b9e6fb37bb88869b2b09d35dcceb19017a87c..432cf750cb2f28f24e75d1986fe8064503f3b21e 100644 (file)
@@ -17,6 +17,8 @@ export const Routes = {
     TRASH: '/trash',
     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) => {
@@ -26,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;
     }
@@ -62,3 +66,9 @@ export const matchProcessLogRoute = (route: string) =>
 
 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<ResourceRouteParams>(route, { path: Routes.WORKFLOWS });