X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/095e176632bbf81d28a239742a1ecce12404bd2d..5b0d61f40100d50a53b460e397667d1ac85e174d:/services/workbench2/src/store/workbench/workbench-actions.ts diff --git a/services/workbench2/src/store/workbench/workbench-actions.ts b/services/workbench2/src/store/workbench/workbench-actions.ts index e89a95e039..ed05c0b172 100644 --- a/services/workbench2/src/store/workbench/workbench-actions.ts +++ b/services/workbench2/src/store/workbench/workbench-actions.ts @@ -15,13 +15,13 @@ 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"; import { favoritePanelColumns } from "views/favorite-panel/favorite-panel"; import { matchRootRoute } from "routes/routes"; import { - setBreadcrumbs, setGroupDetailsBreadcrumbs, setGroupsBreadcrumbs, setProcessBreadcrumbs, @@ -31,6 +31,10 @@ import { setUsersBreadcrumbs, setMyAccountBreadcrumbs, setUserProfileBreadcrumbs, + setInstanceTypesBreadcrumbs, + setVirtualMachinesBreadcrumbs, + setVirtualMachinesAdminBreadcrumbs, + setRepositoriesBreadcrumbs, } from "store/breadcrumbs/breadcrumbs-actions"; import { navigateTo, navigateToRootProject } from "store/navigation/navigation-action"; import { MoveToFormDialogData } from "store/move-to-dialog/move-to-dialog"; @@ -95,10 +99,10 @@ import { subprocessPanelActions } from "store/subprocess-panel/subprocess-panel- import { subprocessPanelColumns } from "views/subprocess-panel/subprocess-panel-root"; import { loadAllProcessesPanel, allProcessesPanelActions } from "../all-processes-panel/all-processes-panel-action"; import { allProcessesPanelColumns } from "views/all-processes-panel/all-processes-panel"; -import { AdminMenuIcon } from "components/icon/icon"; 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"; @@ -335,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, }) @@ -473,7 +477,7 @@ export const copyCollection = (data: CopyFormDialogData) => async (dispatch: Dis link: collection.ownerUuid, }) ); - dispatch(multiselectActions.deselectOne(copyToProject.uuid)); + dispatch(deselectOne(copyToProject.uuid)); } } catch (e) { dispatch( @@ -742,23 +746,30 @@ export const loadLinks = handleFirstTimeLoad(async (dispatch: Dispatch) => export const loadVirtualMachines = handleFirstTimeLoad(async (dispatch: Dispatch) => { await dispatch(loadVirtualMachinesPanel()); - dispatch(setBreadcrumbs([{ label: "Virtual Machines" }])); + dispatch(setVirtualMachinesBreadcrumbs()); + dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.SHELL_ACCESS)); }); export const loadVirtualMachinesAdmin = handleFirstTimeLoad(async (dispatch: Dispatch) => { await dispatch(loadVirtualMachinesPanel()); - dispatch(setBreadcrumbs([{ label: "Virtual Machines Admin", icon: AdminMenuIcon }])); + dispatch(setVirtualMachinesAdminBreadcrumbs()); + dispatch(treePickerActions.DEACTIVATE_TREE_PICKER_NODE({pickerId: SIDE_PANEL_TREE} )) }); export const loadRepositories = handleFirstTimeLoad(async (dispatch: Dispatch) => { await dispatch(loadRepositoriesPanel()); - dispatch(setBreadcrumbs([{ label: "Repositories" }])); + dispatch(setRepositoriesBreadcrumbs()); }); export const loadSshKeys = handleFirstTimeLoad(async (dispatch: Dispatch) => { await dispatch(loadSshKeysPanel()); }); +export const loadInstanceTypes = handleFirstTimeLoad(async (dispatch: Dispatch) => { + dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.INSTANCE_TYPES)); + dispatch(setInstanceTypesBreadcrumbs()); +}); + export const loadSiteManager = handleFirstTimeLoad(async (dispatch: Dispatch) => { await dispatch(loadSiteManagerPanel()); });