Setup routing for group details
[arvados-workbench2.git] / src / routes / routes.ts
index 2c6dbea5e883ff8979c538ad353b073324429f59..6d44725ce1bc0406d4cc446905f5745d1650a890 100644 (file)
@@ -29,6 +29,7 @@ export const Routes = {
     USERS: '/users',
     API_CLIENT_AUTHORIZATIONS: `/api_client_authorizations`,
     GROUPS: '/groups',
+    GROUP_DETAILS: `/group/:id(${RESOURCE_UUID_PATTERN})`,
 };
 
 export const getResourceUrl = (uuid: string) => {
@@ -49,6 +50,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;
 }
@@ -112,3 +115,6 @@ export const matchApiClientAuthorizationsRoute = (route: string) =>
 
 export const matchGroupsRoute = (route: string) =>
     matchPath(route, { path: Routes.GROUPS });
+
+export const matchGroupDetailsRoute = (route: string) =>
+    matchPath<ResourceRouteParams>(route, { path: Routes.GROUP_DETAILS });