Compare commits

...

2 Commits

Author SHA1 Message Date
Victor Meng
acd5974024 Hard code to always open old mongo shell 2022-12-07 10:21:08 -08:00
Victor Meng
22f5fc13b2 Empty commit to trigger new build 2022-11-14 12:42:07 -08:00
3 changed files with 4 additions and 11 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,

View File

@@ -382,7 +382,8 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) {
}
}
useTabs.getState().setShowNetworkSettingsWarning(!doNetworkSettingsAllowDataExplorerAccess());
const isDataExplorerAccessAllowed = doNetworkSettingsAllowDataExplorerAccess();
useTabs.getState().setShowNetworkSettingsWarning(!isDataExplorerAccessAllowed);
if (inputs.features) {
Object.assign(userContext.features, extractFeatures(new URLSearchParams(inputs.features)));