Merge branch 'master'
[arvados-workbench2.git] / src / routes / routes.ts
index 05f6663fe3c2bbb8021423249e5e045263ab3be7..661a065eb35848bbfaef168d58af2781960f92ad 100644 (file)
@@ -30,6 +30,8 @@ export const Routes = {
     COMPUTE_NODES: `/nodes`,
     USERS: '/users',
     API_CLIENT_AUTHORIZATIONS: `/api_client_authorizations`,
+    GROUPS: '/groups',
+    GROUP_DETAILS: `/group/:id(${RESOURCE_UUID_PATTERN})`,
     LINKS: '/links'
 };
 
@@ -51,6 +53,8 @@ export const getProcessUrl = (uuid: string) => `/processes/${uuid}`;
 
 export const getProcessLogUrl = (uuid: string) => `/process-logs/${uuid}`;
 
+export const getGroupUrl = (uuid: string) => `/group/${uuid}`;
+
 export interface ResourceRouteParams {
     id: string;
 }
@@ -118,5 +122,11 @@ export const matchComputeNodesRoute = (route: string) =>
 export const matchApiClientAuthorizationsRoute = (route: string) =>
     matchPath(route, { path: Routes.API_CLIENT_AUTHORIZATIONS });
 
+export const matchGroupsRoute = (route: string) =>
+    matchPath(route, { path: Routes.GROUPS });
+
+export const matchGroupDetailsRoute = (route: string) =>
+    matchPath<ResourceRouteParams>(route, { path: Routes.GROUP_DETAILS });
+    
 export const matchLinksRoute = (route: string) =>
-    matchPath(route, { path: Routes.LINKS });
\ No newline at end of file
+    matchPath(route, { path: Routes.LINKS });