Merge branch '18559-user-profile' into main. Closes #18559
[arvados-workbench2.git] / src / routes / route-change-handlers.ts
index 70f65cb46a8e72dd4d2962236a915b06392f63c9..5b3ce6687ff0e4cb8b3e17a97d286898dda90946 100644 (file)
@@ -27,7 +27,6 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
     const publicFavoritesMatch = Routes.matchPublicFavoritesRoute(pathname);
     const trashMatch = Routes.matchTrashRoute(pathname);
     const processMatch = Routes.matchProcessRoute(pathname);
-    const processLogMatch = Routes.matchProcessLogRoute(pathname);
     const repositoryMatch = Routes.matchRepositoriesRoute(pathname);
     const searchResultsMatch = Routes.matchSearchResultsRoute(pathname);
     const sharedWithMeMatch = Routes.matchSharedWithMeRoute(pathname);
@@ -42,7 +41,8 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
     const apiClientAuthorizationsMatch = Routes.matchApiClientAuthorizationsRoute(pathname);
     const myAccountMatch = Routes.matchMyAccountRoute(pathname);
     const linkAccountMatch = Routes.matchLinkAccountRoute(pathname);
-    const userMatch = Routes.matchUsersRoute(pathname);
+    const usersMatch = Routes.matchUsersRoute(pathname);
+    const userProfileMatch = Routes.matchUserProfileRoute(pathname);
     const groupsMatch = Routes.matchGroupsRoute(pathname);
     const groupDetailsMatch = Routes.matchGroupDetailsRoute(pathname);
     const linksMatch = Routes.matchLinksRoute(pathname);
@@ -71,8 +71,6 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
         store.dispatch(WorkbenchActions.loadTrash());
     } else if (processMatch) {
         store.dispatch(WorkbenchActions.loadProcess(processMatch.params.id));
-    } else if (processLogMatch) {
-        store.dispatch(WorkbenchActions.loadProcessLog(processLogMatch.params.id));
     } else if (rootMatch) {
         store.dispatch(navigateToRootProject);
     } else if (sharedWithMeMatch) {
@@ -86,7 +84,7 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
     } else if (virtualMachineUserMatch) {
         store.dispatch(WorkbenchActions.loadVirtualMachines);
     } else if (virtualMachineAdminMatch) {
-        store.dispatch(WorkbenchActions.loadVirtualMachines);
+        store.dispatch(WorkbenchActions.loadVirtualMachinesAdmin);
     } else if (repositoryMatch) {
         store.dispatch(WorkbenchActions.loadRepositories);
     } else if (sshKeysUserMatch) {
@@ -100,11 +98,13 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
     } else if (apiClientAuthorizationsMatch) {
         store.dispatch(WorkbenchActions.loadApiClientAuthorizations);
     } else if (myAccountMatch) {
-        store.dispatch(WorkbenchActions.loadMyAccount);
+        store.dispatch(WorkbenchActions.loadUserProfile());
     } else if (linkAccountMatch) {
         store.dispatch(WorkbenchActions.loadLinkAccount);
-    } else if (userMatch) {
+    } else if (usersMatch) {
         store.dispatch(WorkbenchActions.loadUsers);
+    } else if (userProfileMatch) {
+        store.dispatch(WorkbenchActions.loadUserProfile(userProfileMatch.params.id));
     } else if (groupsMatch) {
         store.dispatch(WorkbenchActions.loadGroupsPanel);
     } else if (groupDetailsMatch) {