X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/4a055bfc98a5fc05cc311e2de1ab2213eec5497e..1832d4a40997469ae0c2d3e6f2e5a552b834118b:/src/routes/route-change-handlers.ts diff --git a/src/routes/route-change-handlers.ts b/src/routes/route-change-handlers.ts index 5b281b83..4ea0925c 100644 --- a/src/routes/route-change-handlers.ts +++ b/src/routes/route-change-handlers.ts @@ -26,11 +26,14 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { const searchResultsMatch = Routes.matchSearchResultsRoute(pathname); const sharedWithMeMatch = Routes.matchSharedWithMeRoute(pathname); const runProcessMatch = Routes.matchRunProcessRoute(pathname); - const virtualMachineMatch = Routes.matchVirtualMachineRoute(pathname); + const virtualMachineUserMatch = Routes.matchUserVirtualMachineRoute(pathname); + const virtualMachineAdminMatch = Routes.matchAdminVirtualMachineRoute(pathname); const workflowMatch = Routes.matchWorkflowRoute(pathname); - const sshKeysMatch = Routes.matchSshKeysRoute(pathname); + const sshKeysUserMatch = Routes.matchSshKeysUserRoute(pathname); + const sshKeysAdminMatch = Routes.matchSshKeysAdminRoute(pathname); const keepServicesMatch = Routes.matchKeepServicesRoute(pathname); const computeNodesMatch = Routes.matchComputeNodesRoute(pathname); + const apiClientAuthorizationsMatch = Routes.matchApiClientAuthorizationsRoute(pathname); const myAccountMatch = Routes.matchMyAccountRoute(pathname); const userMatch = Routes.matchUsersRoute(pathname); @@ -56,19 +59,25 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { store.dispatch(WorkbenchActions.loadWorkflow); } else if (searchResultsMatch) { store.dispatch(WorkbenchActions.loadSearchResults); - } else if (virtualMachineMatch) { + } else if (virtualMachineUserMatch) { store.dispatch(WorkbenchActions.loadVirtualMachines); - } else if(repositoryMatch) { + } else if (virtualMachineAdminMatch) { + store.dispatch(WorkbenchActions.loadVirtualMachines); + } else if (repositoryMatch) { store.dispatch(WorkbenchActions.loadRepositories); - } else if (sshKeysMatch) { + } else if (sshKeysUserMatch) { + store.dispatch(WorkbenchActions.loadSshKeys); + } else if (sshKeysAdminMatch) { store.dispatch(WorkbenchActions.loadSshKeys); } else if (keepServicesMatch) { store.dispatch(WorkbenchActions.loadKeepServices); } else if (computeNodesMatch) { store.dispatch(WorkbenchActions.loadComputeNodes); + } else if (apiClientAuthorizationsMatch) { + store.dispatch(WorkbenchActions.loadApiClientAuthorizations); } else if (myAccountMatch) { store.dispatch(WorkbenchActions.loadMyAccount); - }else if (userMatch) { + } else if (userMatch) { store.dispatch(WorkbenchActions.loadUsers); } };