Merge branch '21278-search-redirect' refs #21278
[arvados.git] / services / workbench2 / src / views-components / side-panel / side-panel-collapsed.tsx
index d2f5cfec3b43b7850f8008c2977502ac1f011da8..4ac91f4febb5862e550e2821b3f36eecc5817bee 100644 (file)
@@ -4,12 +4,12 @@
 
 import React, { ReactElement } from 'react'
 import { connect } from 'react-redux'
-import { ProjectsIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'
+import { ProjectsIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon, ResourceIcon } from 'components/icon/icon'
 import { TerminalIcon } from 'components/icon/icon'
 import { IconButton, List, ListItem, Tooltip } from '@material-ui/core'
 import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'
 import { ArvadosTheme } from 'common/custom-theme'
-import { navigateTo } from 'store/navigation/navigation-action'
+import { navigateTo, navigateToInstanceTypes } from 'store/navigation/navigation-action'
 import { RootState } from 'store/store'
 import { Dispatch } from 'redux'
 import {
@@ -48,6 +48,7 @@ enum SidePanelCollapsedCategory {
     PUBLIC_FAVORITES = 'Public Favorites',
     SHARED_WITH_ME = 'Shared with me',
     ALL_PROCESSES = 'All Processes',
+    INSTANCE_TYPES = 'Instance Types',
     SHELL_ACCESS = 'Shell Access',
     GROUPS = 'Groups',
     TRASH = 'Trash',
@@ -85,6 +86,11 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
         icon: <ProcessIcon />,
         navTarget: navigateToAllProcesses,
     },
+    {
+        name: SidePanelCollapsedCategory.INSTANCE_TYPES,
+        icon: <ResourceIcon />,
+        navTarget: navigateToInstanceTypes,
+    },
     {
         name: SidePanelCollapsedCategory.SHELL_ACCESS,
         icon: <TerminalIcon />,
@@ -113,9 +119,7 @@ const mapStateToProps = ({auth, properties }: RootState) => {
         return {
             user: auth.user,
             selectedPath: properties.breadcrumbs
-                ? properties.breadcrumbs[0].label !== 'Virtual Machines'
                 ? properties.breadcrumbs[0].label
-                : SidePanelCollapsedCategory.SHELL_ACCESS
                 : SidePanelCollapsedCategory.PROJECTS,
         }
 }