Merge branch '21359-rightclick-newproject-bug'
[arvados.git] / services / workbench2 / src / store / workbench / workbench-actions.ts
index c6e7ff66d37e9836c4b89c7feae2fe14deafca9e..ed05c0b172db3af96fa75fb2203d11dc2b30016f 100644 (file)
@@ -15,6 +15,7 @@ import {
     initSidePanelTree,
     loadSidePanelTreeProjects,
     SidePanelTreeCategory,
+    SIDE_PANEL_TREE, 
 } from "store/side-panel-tree/side-panel-tree-actions";
 import { updateResources } from "store/resources/resources-actions";
 import { projectPanelColumns } from "views/project-panel/project-panel";
@@ -100,7 +101,8 @@ import { loadAllProcessesPanel, allProcessesPanelActions } from "../all-processe
 import { allProcessesPanelColumns } from "views/all-processes-panel/all-processes-panel";
 import { userProfileGroupsColumns } from "views/user-profile-panel/user-profile-panel-root";
 import { selectedToArray, selectedToKindSet } from "components/multiselect-toolbar/MultiselectToolbar";
-import { multiselectActions } from "store/multiselect/multiselect-actions";
+import { deselectOne } from "store/multiselect/multiselect-actions";
+import { treePickerActions } from "store/tree-picker/tree-picker-actions";
 
 export const WORKBENCH_LOADING_SCREEN = "workbenchLoadingScreen";
 
@@ -337,7 +339,7 @@ export const moveProject =
                 } catch (e) {
                     dispatch(
                         snackbarActions.OPEN_SNACKBAR({
-                            message: e.message,
+                            message: !!(project as any).frozenByUuid ? 'Could not move frozen project.' : e.message,
                             hideDuration: 2000,
                             kind: SnackbarKind.ERROR,
                         })
@@ -475,7 +477,7 @@ export const copyCollection = (data: CopyFormDialogData) => async (dispatch: Dis
                         link: collection.ownerUuid,
                     })
                 );
-                dispatch<any>(multiselectActions.deselectOne(copyToProject.uuid));
+                dispatch<any>(deselectOne(copyToProject.uuid));
             }
         } catch (e) {
             dispatch(
@@ -745,11 +747,13 @@ export const loadLinks = handleFirstTimeLoad(async (dispatch: Dispatch<any>) =>
 export const loadVirtualMachines = handleFirstTimeLoad(async (dispatch: Dispatch<any>) => {
     await dispatch(loadVirtualMachinesPanel());
     dispatch(setVirtualMachinesBreadcrumbs());
+    dispatch<any>(activateSidePanelTreeItem(SidePanelTreeCategory.SHELL_ACCESS));
 });
 
 export const loadVirtualMachinesAdmin = handleFirstTimeLoad(async (dispatch: Dispatch<any>) => {
     await dispatch(loadVirtualMachinesPanel());
     dispatch(setVirtualMachinesAdminBreadcrumbs());
+    dispatch(treePickerActions.DEACTIVATE_TREE_PICKER_NODE({pickerId: SIDE_PANEL_TREE} ))
 });
 
 export const loadRepositories = handleFirstTimeLoad(async (dispatch: Dispatch<any>) => {