Merge branch 'master' of git.curoverse.com:arvados-workbench2 into 14500_admin_api_tokens
[arvados-workbench2.git] / src / routes / routes.ts
index fb28bd05bee5ff360c17cedd01bf2487d7cf4f22..7f15a8de74bb52c47e67a5f1e608a1e3ab0df9cf 100644 (file)
@@ -16,7 +16,17 @@ export const Routes = {
     FAVORITES: '/favorites',
     TRASH: '/trash',
     PROCESS_LOGS: `/process-logs/:id(${RESOURCE_UUID_PATTERN})`,
+    REPOSITORIES: '/repositories',
     SHARED_WITH_ME: '/shared-with-me',
+    RUN_PROCESS: '/run-process',
+    VIRTUAL_MACHINES: '/virtual-machines',
+    WORKFLOWS: '/workflows',
+    SEARCH_RESULTS: '/search-results',
+    SSH_KEYS: `/ssh-keys`,
+    MY_ACCOUNT: '/my-account',
+    KEEP_SERVICES: `/keep-services`,
+    COMPUTE_NODES: `/nodes`,
+    API_CLIENT_AUTHORIZATIONS: `/api_client_authorizations`
 };
 
 export const getResourceUrl = (uuid: string) => {
@@ -64,3 +74,33 @@ 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 });
+
+export const matchSearchResultsRoute = (route: string) =>
+    matchPath<ResourceRouteParams>(route, { path: Routes.SEARCH_RESULTS });
+
+export const matchVirtualMachineRoute = (route: string) =>
+    matchPath<ResourceRouteParams>(route, { path: Routes.VIRTUAL_MACHINES });
+    
+export const matchRepositoriesRoute = (route: string) =>
+    matchPath<ResourceRouteParams>(route, { path: Routes.REPOSITORIES });
+    
+export const matchSshKeysRoute = (route: string) =>
+    matchPath(route, { path: Routes.SSH_KEYS });
+
+export const matchMyAccountRoute = (route: string) =>
+    matchPath(route, { path: Routes.MY_ACCOUNT });
+
+export const matchKeepServicesRoute = (route: string) =>
+    matchPath(route, { path: Routes.KEEP_SERVICES });
+
+export const matchComputeNodesRoute = (route: string) =>
+    matchPath(route, { path: Routes.COMPUTE_NODES });
+
+export const matchApiClientAuthorizationsRoute = (route: string) =>
+    matchPath(route, { path: Routes.API_CLIENT_AUTHORIZATIONS });
\ No newline at end of file