21200: copied branch from arvados-workbench2 Arvados-DCO-1.1-Signed-off-by: Lisa...
[arvados.git] / services / workbench2 / src / views-components / main-app-bar / account-menu.tsx
index 02dd54f1c4366c208f8ba050ed7b05992a31a781..3ff3aaedeb02f6538afb3af6c714f95ec155f35c 100644 (file)
@@ -22,6 +22,8 @@ import {
 import { openUserVirtualMachines } from "store/virtual-machines/virtual-machines-actions";
 import { pluginConfig } from 'plugins';
 import { ElementListReducer } from 'common/plugintypes';
+import { treePickerActions } from "store/tree-picker/tree-picker-actions";
+import { SIDE_PANEL_TREE, SidePanelTreeCategory } from "store/side-panel-tree/side-panel-tree-actions";
 
 interface AccountMenuProps {
     user?: User;
@@ -51,7 +53,10 @@ const styles: StyleRulesCallback<CssRules> = () => ({
 export const AccountMenuComponent =
     ({ user, dispatch, currentRoute, workbenchURL, apiToken, localCluster, classes }: AccountMenuProps & DispatchProp<any> & WithStyles<CssRules>) => {
         let accountMenuItems = <>
-            <MenuItem onClick={() => dispatch(openUserVirtualMachines())}>Virtual Machines</MenuItem>
+            <MenuItem onClick={() => {
+                dispatch(treePickerActions.ACTIVATE_TREE_PICKER_NODE({id: SidePanelTreeCategory.SHELL_ACCESS, pickerId: SIDE_PANEL_TREE} ))
+                dispatch(openUserVirtualMachines())
+            }}>Shell Access</MenuItem>
             <MenuItem onClick={() => dispatch(openRepositoriesPanel())}>Repositories</MenuItem>
             <MenuItem onClick={() => {
                 dispatch<any>(getNewExtraToken(true));