Hard code to always open old mongo shell

This commit is contained in:
Victor Meng 2022-12-07 10:21:08 -08:00
parent 22f5fc13b2
commit acd5974024
2 changed files with 2 additions and 10 deletions

View File

@ -85,11 +85,7 @@ export const createCollectionContextMenuButton = (
iconSrc: HostedTerminalIcon,
onClick: () => {
const selectedCollection: ViewModels.Collection = useSelectedNode.getState().findSelectedCollection();
if (useNotebook.getState().isShellEnabled) {
container.openNotebookTerminal(ViewModels.TerminalKind.Mongo);
} else {
selectedCollection && selectedCollection.onNewMongoShellClick();
}
selectedCollection && selectedCollection.onNewMongoShellClick();
},
label: useNotebook.getState().isShellEnabled ? "Open Mongo Shell" : "New Shell",
});

View File

@ -166,11 +166,7 @@ export function createContextCommandBarButtons(
iconAlt: label,
onCommandClick: () => {
const selectedCollection: ViewModels.Collection = selectedNodeState.findSelectedCollection();
if (useNotebook.getState().isShellEnabled) {
container.openNotebookTerminal(ViewModels.TerminalKind.Mongo);
} else {
selectedCollection && selectedCollection.onNewMongoShellClick();
}
selectedCollection && selectedCollection.onNewMongoShellClick();
},
commandButtonLabel: label,
ariaLabel: label,