X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/090f4825bdd30925a10c6df1b9493df0c2e8f541..8c9cf2d12a513379d13db279b076314b292c037e:/src/routes/route-change-handlers.ts diff --git a/src/routes/route-change-handlers.ts b/src/routes/route-change-handlers.ts index 34b488de..c4b0fc7d 100644 --- a/src/routes/route-change-handlers.ts +++ b/src/routes/route-change-handlers.ts @@ -26,9 +26,11 @@ 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); @@ -58,11 +60,15 @@ 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);