Merge branch '13540-add-possibility-to-open-files-in-third-party-apps'
[arvados-workbench2.git] / src / routes / routes.ts
index f447975b12da7d97e2e84d77a1813e8f5ec80056..661a065eb35848bbfaef168d58af2781960f92ad 100644 (file)
@@ -29,7 +29,10 @@ export const Routes = {
     KEEP_SERVICES: `/keep-services`,
     COMPUTE_NODES: `/nodes`,
     USERS: '/users',
-    API_CLIENT_AUTHORIZATIONS: `/api_client_authorizations`
+    API_CLIENT_AUTHORIZATIONS: `/api_client_authorizations`,
+    GROUPS: '/groups',
+    GROUP_DETAILS: `/group/:id(${RESOURCE_UUID_PATTERN})`,
+    LINKS: '/links'
 };
 
 export const getResourceUrl = (uuid: string) => {
@@ -50,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;
 }
@@ -116,3 +121,12 @@ 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 });