X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/095e176632bbf81d28a239742a1ecce12404bd2d..11c207c691729bdc94aa131f332f63969766b20a:/services/workbench2/src/views-components/side-panel-tree/side-panel-tree.tsx

diff --git a/services/workbench2/src/views-components/side-panel-tree/side-panel-tree.tsx b/services/workbench2/src/views-components/side-panel-tree/side-panel-tree.tsx
index 19ab3184af..cc1b57da48 100644
--- a/services/workbench2/src/views-components/side-panel-tree/side-panel-tree.tsx
+++ b/services/workbench2/src/views-components/side-panel-tree/side-panel-tree.tsx
@@ -9,18 +9,20 @@ import { TreePicker, TreePickerProps } from "../tree-picker/tree-picker";
 import { TreeItem } from "components/tree/tree";
 import { ProjectResource } from "models/project";
 import { ListItemTextIcon } from "components/list-item-text-icon/list-item-text-icon";
-import { ProcessIcon, ProjectIcon, FilterGroupIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon, TerminalIcon } from 'components/icon/icon';
+import { ProcessIcon, ProjectIcon, FilterGroupIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon, TerminalIcon, ResourceIcon } from 'components/icon/icon';
 import { activateSidePanelTreeItem, toggleSidePanelTreeItemCollapse, SIDE_PANEL_TREE, SidePanelTreeCategory } from 'store/side-panel-tree/side-panel-tree-actions';
 import { openSidePanelContextMenu } from 'store/context-menu/context-menu-actions';
 import { noop } from 'lodash';
 import { ResourceKind } from "models/resource";
 import { IllegalNamingWarning } from "components/warning/warning";
 import { GroupClass } from "models/group";
+import { setSelectedResourceUuid } from "store/selected-resource/selected-resource-actions";
 
 export interface SidePanelTreeProps {
     onItemActivation: (id: string) => void;
     sidePanelProgress?: boolean;
     isCollapsed?: boolean
+    setCurrentSideWidth: (width: number) => void
 }
 
 type SidePanelTreeActionProps = Pick<TreePickerProps<ProjectResource | string>, 'onContextMenu' | 'toggleItemActive' | 'toggleItemOpen' | 'toggleItemSelection'>;
@@ -31,6 +33,8 @@ const mapDispatchToProps = (dispatch: Dispatch, props: SidePanelTreeProps): Side
     },
     toggleItemActive: (_, { id }) => {
         dispatch<any>(activateSidePanelTreeItem(id));
+        const isSidePanelCat = Object.values(SidePanelTreeCategory).includes(id as SidePanelTreeCategory);
+        dispatch<any>(setSelectedResourceUuid(isSidePanelCat ? null : id));
         props.onItemActivation(id);
     },
     toggleItemOpen: (_, { id }) => {
@@ -80,6 +84,8 @@ export const getSidePanelIcon = (category: string) => {
             return PublicFavoriteIcon;
         case SidePanelTreeCategory.ALL_PROCESSES:
             return ProcessIcon;
+        case SidePanelTreeCategory.INSTANCE_TYPES:
+            return ResourceIcon;
         case SidePanelTreeCategory.GROUPS:
             return GroupsIcon;
         case SidePanelTreeCategory.SHELL_ACCESS:
