File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -96,17 +96,17 @@ export const createCollectionContextMenuButton = (
96
96
iconSrc : HostedTerminalIcon ,
97
97
onClick : ( ) => {
98
98
const selectedCollection : ViewModels . Collection = useSelectedNode . getState ( ) . findSelectedCollection ( ) ;
99
- if ( useNotebook . getState ( ) . isShellEnabled ) {
99
+ if ( useNotebook . getState ( ) . isShellEnabled || userContext . features . enableCloudShell ) {
100
100
container . openNotebookTerminal ( ViewModels . TerminalKind . Mongo ) ;
101
101
} else {
102
102
selectedCollection && selectedCollection . onNewMongoShellClick ( ) ;
103
103
}
104
104
} ,
105
- label : useNotebook . getState ( ) . isShellEnabled ? "Open Mongo Shell" : "New Shell" ,
105
+ label : ( useNotebook . getState ( ) . isShellEnabled || userContext . features . enableCloudShell ) ? "Open Mongo Shell" : "New Shell" ,
106
106
} ) ;
107
107
}
108
108
109
- if ( useNotebook . getState ( ) . isShellEnabled && userContext . apiType === "Cassandra" ) {
109
+ if ( ( useNotebook . getState ( ) . isShellEnabled || userContext . features . enableCloudShell ) && userContext . apiType === "Cassandra" ) {
110
110
items . push ( {
111
111
iconSrc : HostedTerminalIcon ,
112
112
onClick : ( ) => {
Original file line number Diff line number Diff line change @@ -125,13 +125,13 @@ export function createContextCommandBarButtons(
125
125
const buttons : CommandButtonComponentProps [ ] = [ ] ;
126
126
127
127
if ( ! selectedNodeState . isDatabaseNodeOrNoneSelected ( ) && userContext . apiType === "Mongo" ) {
128
- const label = useNotebook . getState ( ) . isShellEnabled ? "Open Mongo Shell" : "New Shell" ;
128
+ const label = ( useNotebook . getState ( ) . isShellEnabled || userContext . features . enableCloudShell ) ? "Open Mongo Shell" : "New Shell" ;
129
129
const newMongoShellBtn : CommandButtonComponentProps = {
130
130
iconSrc : HostedTerminalIcon ,
131
131
iconAlt : label ,
132
132
onCommandClick : ( ) => {
133
133
const selectedCollection : ViewModels . Collection = selectedNodeState . findSelectedCollection ( ) ;
134
- if ( useNotebook . getState ( ) . isShellEnabled ) {
134
+ if ( useNotebook . getState ( ) . isShellEnabled || userContext . features . enableCloudShell ) {
135
135
container . openNotebookTerminal ( ViewModels . TerminalKind . Mongo ) ;
136
136
} else {
137
137
selectedCollection && selectedCollection . onNewMongoShellClick ( ) ;
@@ -145,7 +145,7 @@ export function createContextCommandBarButtons(
145
145
}
146
146
147
147
if (
148
- useNotebook . getState ( ) . isShellEnabled &&
148
+ ( useNotebook . getState ( ) . isShellEnabled || userContext . features . enableCloudShell ) &&
149
149
! selectedNodeState . isDatabaseNodeOrNoneSelected ( ) &&
150
150
userContext . apiType === "Cassandra"
151
151
) {
You can’t perform that action at this time.
0 commit comments