Mongo Shell Fixes (#738)
* initial commit for mongo shell refactor * multile tabs for terminals * added notebooks enabled check * added vnet check * minor edits * removed console log * fixes * hide main 'open mongo shell' button * addressed PR comments * Added check for iprules and other fixes * Updated snapshot * addressed PR comments * format errors fixed
This commit is contained in:
parent
dce52f848c
commit
ae76fb0258
|
@ -20,6 +20,8 @@ export interface DatabaseAccountExtendedProperties {
|
||||||
writeLocations?: DatabaseAccountResponseLocation[];
|
writeLocations?: DatabaseAccountResponseLocation[];
|
||||||
enableFreeTier?: boolean;
|
enableFreeTier?: boolean;
|
||||||
enableAnalyticalStorage?: boolean;
|
enableAnalyticalStorage?: boolean;
|
||||||
|
isVirtualNetworkFilterEnabled?: boolean;
|
||||||
|
ipRules?: IpRule[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DatabaseAccountResponseLocation {
|
export interface DatabaseAccountResponseLocation {
|
||||||
|
@ -31,6 +33,10 @@ export interface DatabaseAccountResponseLocation {
|
||||||
provisioningState: string;
|
provisioningState: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IpRule {
|
||||||
|
ipAddressOrRange: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ConfigurationOverrides {
|
export interface ConfigurationOverrides {
|
||||||
EnableBsonSchema: string;
|
EnableBsonSchema: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,9 +73,13 @@ export class ResourceTreeContextMenuButtonFactory {
|
||||||
iconSrc: HostedTerminalIcon,
|
iconSrc: HostedTerminalIcon,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
const selectedCollection: ViewModels.Collection = container.findSelectedCollection();
|
const selectedCollection: ViewModels.Collection = container.findSelectedCollection();
|
||||||
selectedCollection && selectedCollection.onNewMongoShellClick();
|
if (container.isShellEnabled()) {
|
||||||
|
container.openNotebookTerminal(ViewModels.TerminalKind.Mongo);
|
||||||
|
} else {
|
||||||
|
selectedCollection && selectedCollection.onNewMongoShellClick();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
label: "New Shell",
|
label: container.isShellEnabled() ? "Open Mongo Shell" : "New Shell",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -842,6 +842,7 @@ exports[`SettingsComponent renders 1`] = `
|
||||||
"isResourceTokenCollectionNodeSelected": [Function],
|
"isResourceTokenCollectionNodeSelected": [Function],
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
|
"isShellEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
"isSparkEnabledForAccount": [Function],
|
"isSparkEnabledForAccount": [Function],
|
||||||
"isSynapseLinkUpdating": [Function],
|
"isSynapseLinkUpdating": [Function],
|
||||||
|
@ -1737,6 +1738,7 @@ exports[`SettingsComponent renders 1`] = `
|
||||||
"isResourceTokenCollectionNodeSelected": [Function],
|
"isResourceTokenCollectionNodeSelected": [Function],
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
|
"isShellEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
"isSparkEnabledForAccount": [Function],
|
"isSparkEnabledForAccount": [Function],
|
||||||
"isSynapseLinkUpdating": [Function],
|
"isSynapseLinkUpdating": [Function],
|
||||||
|
@ -2645,6 +2647,7 @@ exports[`SettingsComponent renders 1`] = `
|
||||||
"isResourceTokenCollectionNodeSelected": [Function],
|
"isResourceTokenCollectionNodeSelected": [Function],
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
|
"isShellEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
"isSparkEnabledForAccount": [Function],
|
"isSparkEnabledForAccount": [Function],
|
||||||
"isSynapseLinkUpdating": [Function],
|
"isSynapseLinkUpdating": [Function],
|
||||||
|
@ -3540,6 +3543,7 @@ exports[`SettingsComponent renders 1`] = `
|
||||||
"isResourceTokenCollectionNodeSelected": [Function],
|
"isResourceTokenCollectionNodeSelected": [Function],
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
|
"isShellEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
"isSparkEnabledForAccount": [Function],
|
"isSparkEnabledForAccount": [Function],
|
||||||
"isSynapseLinkUpdating": [Function],
|
"isSynapseLinkUpdating": [Function],
|
||||||
|
|
|
@ -177,6 +177,8 @@ export default class Explorer {
|
||||||
public openDialog: ExplorerParams["openDialog"];
|
public openDialog: ExplorerParams["openDialog"];
|
||||||
public closeDialog: ExplorerParams["closeDialog"];
|
public closeDialog: ExplorerParams["closeDialog"];
|
||||||
|
|
||||||
|
public isShellEnabled: ko.Observable<boolean>;
|
||||||
|
|
||||||
private _isInitializingNotebooks: boolean;
|
private _isInitializingNotebooks: boolean;
|
||||||
private notebookBasePath: ko.Observable<string>;
|
private notebookBasePath: ko.Observable<string>;
|
||||||
private _arcadiaManager: ArcadiaResourceManager;
|
private _arcadiaManager: ArcadiaResourceManager;
|
||||||
|
@ -222,6 +224,7 @@ export default class Explorer {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.isShellEnabled = ko.observable(false);
|
||||||
this.isNotebooksEnabledForAccount = ko.observable(false);
|
this.isNotebooksEnabledForAccount = ko.observable(false);
|
||||||
this.isNotebooksEnabledForAccount.subscribe((isEnabledForAccount: boolean) => this.refreshCommandBarButtons());
|
this.isNotebooksEnabledForAccount.subscribe((isEnabledForAccount: boolean) => this.refreshCommandBarButtons());
|
||||||
this.isSparkEnabledForAccount = ko.observable(false);
|
this.isSparkEnabledForAccount = ko.observable(false);
|
||||||
|
@ -248,6 +251,12 @@ export default class Explorer {
|
||||||
((await this._containsDefaultNotebookWorkspace(userContext.databaseAccount)) ||
|
((await this._containsDefaultNotebookWorkspace(userContext.databaseAccount)) ||
|
||||||
userContext.features.enableNotebooks)
|
userContext.features.enableNotebooks)
|
||||||
);
|
);
|
||||||
|
this.isShellEnabled(
|
||||||
|
this.isNotebookEnabled() &&
|
||||||
|
!userContext.databaseAccount.properties.isVirtualNetworkFilterEnabled &&
|
||||||
|
userContext.databaseAccount.properties.ipRules.length === 0
|
||||||
|
);
|
||||||
|
|
||||||
TelemetryProcessor.trace(Action.NotebookEnabled, ActionModifiers.Mark, {
|
TelemetryProcessor.trace(Action.NotebookEnabled, ActionModifiers.Mark, {
|
||||||
isNotebookEnabled: this.isNotebookEnabled(),
|
isNotebookEnabled: this.isNotebookEnabled(),
|
||||||
dataExplorerArea: Constants.Areas.Notebook,
|
dataExplorerArea: Constants.Areas.Notebook,
|
||||||
|
@ -1715,32 +1724,27 @@ export default class Explorer {
|
||||||
throw new Error("Terminal kind: ${kind} not supported");
|
throw new Error("Terminal kind: ${kind} not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
const terminalTabs: TerminalTab[] = this.tabsManager.getTabs(
|
const terminalTabs: TerminalTab[] = this.tabsManager.getTabs(ViewModels.CollectionTabKind.Terminal, (tab) =>
|
||||||
ViewModels.CollectionTabKind.Terminal,
|
tab.hashLocation().startsWith(hashLocation)
|
||||||
(tab) => tab.hashLocation() == hashLocation
|
|
||||||
) as TerminalTab[];
|
) as TerminalTab[];
|
||||||
let terminalTab: TerminalTab = terminalTabs && terminalTabs[0];
|
|
||||||
|
|
||||||
if (terminalTab) {
|
const index = terminalTabs.length + 1;
|
||||||
this.tabsManager.activateTab(terminalTab);
|
const newTab = new TerminalTab({
|
||||||
} else {
|
account: userContext.databaseAccount,
|
||||||
const newTab = new TerminalTab({
|
tabKind: ViewModels.CollectionTabKind.Terminal,
|
||||||
account: userContext.databaseAccount,
|
node: null,
|
||||||
tabKind: ViewModels.CollectionTabKind.Terminal,
|
title: `${title} ${index}`,
|
||||||
node: null,
|
tabPath: `${title} ${index}`,
|
||||||
title: title,
|
collection: null,
|
||||||
tabPath: title,
|
hashLocation: `${hashLocation} ${index}`,
|
||||||
collection: null,
|
isTabsContentExpanded: ko.observable(true),
|
||||||
hashLocation: hashLocation,
|
onLoadStartKey: null,
|
||||||
isTabsContentExpanded: ko.observable(true),
|
onUpdateTabsButtons: this.onUpdateTabsButtons,
|
||||||
onLoadStartKey: null,
|
container: this,
|
||||||
onUpdateTabsButtons: this.onUpdateTabsButtons,
|
kind: kind,
|
||||||
container: this,
|
});
|
||||||
kind: kind,
|
|
||||||
});
|
|
||||||
|
|
||||||
this.tabsManager.activateNewTab(newTab);
|
this.tabsManager.activateNewTab(newTab);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async openGallery(
|
public async openGallery(
|
||||||
|
|
|
@ -139,6 +139,7 @@ describe("CommandBarComponentButtonFactory tests", () => {
|
||||||
|
|
||||||
mockExplorer.isDatabaseNodeOrNoneSelected = () => true;
|
mockExplorer.isDatabaseNodeOrNoneSelected = () => true;
|
||||||
mockExplorer.isServerlessEnabled = ko.computed<boolean>(() => false);
|
mockExplorer.isServerlessEnabled = ko.computed<boolean>(() => false);
|
||||||
|
mockExplorer.isShellEnabled = ko.observable(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
|
@ -154,6 +155,7 @@ describe("CommandBarComponentButtonFactory tests", () => {
|
||||||
mockExplorer.isNotebookEnabled = ko.observable(false);
|
mockExplorer.isNotebookEnabled = ko.observable(false);
|
||||||
mockExplorer.isNotebooksEnabledForAccount = ko.observable(false);
|
mockExplorer.isNotebooksEnabledForAccount = ko.observable(false);
|
||||||
mockExplorer.isRunningOnNationalCloud = ko.observable(false);
|
mockExplorer.isRunningOnNationalCloud = ko.observable(false);
|
||||||
|
mockExplorer.isShellEnabled = ko.observable(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Mongo Api not available - button should be hidden", () => {
|
it("Mongo Api not available - button should be hidden", () => {
|
||||||
|
@ -173,24 +175,18 @@ describe("CommandBarComponentButtonFactory tests", () => {
|
||||||
expect(openMongoShellBtn).toBeUndefined();
|
expect(openMongoShellBtn).toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Notebooks is not enabled and is unavailable - button should be shown and disabled", () => {
|
it("Notebooks is not enabled and is unavailable - button should be hidden", () => {
|
||||||
const buttons = CommandBarComponentButtonFactory.createStaticCommandBarButtons(mockExplorer);
|
const buttons = CommandBarComponentButtonFactory.createStaticCommandBarButtons(mockExplorer);
|
||||||
const openMongoShellBtn = buttons.find((button) => button.commandButtonLabel === openMongoShellBtnLabel);
|
const openMongoShellBtn = buttons.find((button) => button.commandButtonLabel === openMongoShellBtnLabel);
|
||||||
expect(openMongoShellBtn).toBeDefined();
|
expect(openMongoShellBtn).toBeUndefined();
|
||||||
expect(openMongoShellBtn.disabled).toBe(true);
|
|
||||||
expect(openMongoShellBtn.tooltipText).toBe(
|
|
||||||
"This feature is not yet available in your account's region. View supported regions here: https://aka.ms/cosmos-enable-notebooks."
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Notebooks is not enabled and is available - button should be shown and enabled", () => {
|
it("Notebooks is not enabled and is available - button should be hidden", () => {
|
||||||
mockExplorer.isNotebooksEnabledForAccount = ko.observable(true);
|
mockExplorer.isNotebooksEnabledForAccount = ko.observable(true);
|
||||||
|
|
||||||
const buttons = CommandBarComponentButtonFactory.createStaticCommandBarButtons(mockExplorer);
|
const buttons = CommandBarComponentButtonFactory.createStaticCommandBarButtons(mockExplorer);
|
||||||
const openMongoShellBtn = buttons.find((button) => button.commandButtonLabel === openMongoShellBtnLabel);
|
const openMongoShellBtn = buttons.find((button) => button.commandButtonLabel === openMongoShellBtnLabel);
|
||||||
expect(openMongoShellBtn).toBeDefined();
|
expect(openMongoShellBtn).toBeUndefined();
|
||||||
expect(openMongoShellBtn.disabled).toBe(false);
|
|
||||||
expect(openMongoShellBtn.tooltipText).toBe("");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Notebooks is enabled and is unavailable - button should be shown and enabled", () => {
|
it("Notebooks is enabled and is unavailable - button should be shown and enabled", () => {
|
||||||
|
@ -213,6 +209,16 @@ describe("CommandBarComponentButtonFactory tests", () => {
|
||||||
expect(openMongoShellBtn.disabled).toBe(false);
|
expect(openMongoShellBtn.disabled).toBe(false);
|
||||||
expect(openMongoShellBtn.tooltipText).toBe("");
|
expect(openMongoShellBtn.tooltipText).toBe("");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("Notebooks is enabled and is available, terminal is unavailable due to ipRules - button should be hidden", () => {
|
||||||
|
mockExplorer.isNotebookEnabled = ko.observable(true);
|
||||||
|
mockExplorer.isNotebooksEnabledForAccount = ko.observable(true);
|
||||||
|
mockExplorer.isShellEnabled = ko.observable(false);
|
||||||
|
|
||||||
|
const buttons = CommandBarComponentButtonFactory.createStaticCommandBarButtons(mockExplorer);
|
||||||
|
const openMongoShellBtn = buttons.find((button) => button.commandButtonLabel === openMongoShellBtnLabel);
|
||||||
|
expect(openMongoShellBtn).toBeUndefined();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Open Cassandra Shell button", () => {
|
describe("Open Cassandra Shell button", () => {
|
||||||
|
@ -273,11 +279,7 @@ describe("CommandBarComponentButtonFactory tests", () => {
|
||||||
it("Notebooks is not enabled and is unavailable - button should be shown and disabled", () => {
|
it("Notebooks is not enabled and is unavailable - button should be shown and disabled", () => {
|
||||||
const buttons = CommandBarComponentButtonFactory.createStaticCommandBarButtons(mockExplorer);
|
const buttons = CommandBarComponentButtonFactory.createStaticCommandBarButtons(mockExplorer);
|
||||||
const openCassandraShellBtn = buttons.find((button) => button.commandButtonLabel === openCassandraShellBtnLabel);
|
const openCassandraShellBtn = buttons.find((button) => button.commandButtonLabel === openCassandraShellBtnLabel);
|
||||||
expect(openCassandraShellBtn).toBeDefined();
|
expect(openCassandraShellBtn).toBeUndefined();
|
||||||
expect(openCassandraShellBtn.disabled).toBe(true);
|
|
||||||
expect(openCassandraShellBtn.tooltipText).toBe(
|
|
||||||
"This feature is not yet available in your account's region. View supported regions here: https://aka.ms/cosmos-enable-notebooks."
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Notebooks is not enabled and is available - button should be shown and enabled", () => {
|
it("Notebooks is not enabled and is available - button should be shown and enabled", () => {
|
||||||
|
@ -285,9 +287,7 @@ describe("CommandBarComponentButtonFactory tests", () => {
|
||||||
|
|
||||||
const buttons = CommandBarComponentButtonFactory.createStaticCommandBarButtons(mockExplorer);
|
const buttons = CommandBarComponentButtonFactory.createStaticCommandBarButtons(mockExplorer);
|
||||||
const openCassandraShellBtn = buttons.find((button) => button.commandButtonLabel === openCassandraShellBtnLabel);
|
const openCassandraShellBtn = buttons.find((button) => button.commandButtonLabel === openCassandraShellBtnLabel);
|
||||||
expect(openCassandraShellBtn).toBeDefined();
|
expect(openCassandraShellBtn).toBeUndefined();
|
||||||
expect(openCassandraShellBtn.disabled).toBe(false);
|
|
||||||
expect(openCassandraShellBtn.tooltipText).toBe("");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Notebooks is enabled and is unavailable - button should be shown and enabled", () => {
|
it("Notebooks is enabled and is unavailable - button should be shown and enabled", () => {
|
||||||
|
|
|
@ -61,48 +61,40 @@ export function createStaticCommandBarButtons(container: Explorer): CommandButto
|
||||||
if (container.notebookManager?.gitHubOAuthService) {
|
if (container.notebookManager?.gitHubOAuthService) {
|
||||||
buttons.push(createManageGitHubAccountButton(container));
|
buttons.push(createManageGitHubAccountButton(container));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!container.isRunningOnNationalCloud()) {
|
|
||||||
if (!container.isNotebookEnabled()) {
|
|
||||||
buttons.push(createEnableNotebooksButton(container));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (userContext.apiType === "Mongo") {
|
|
||||||
buttons.push(createOpenMongoTerminalButton(container));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (userContext.apiType === "Cassandra") {
|
|
||||||
buttons.push(createOpenCassandraTerminalButton(container));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (container.isNotebookEnabled()) {
|
|
||||||
buttons.push(createOpenTerminalButton(container));
|
buttons.push(createOpenTerminalButton(container));
|
||||||
|
|
||||||
buttons.push(createNotebookWorkspaceResetButton(container));
|
buttons.push(createNotebookWorkspaceResetButton(container));
|
||||||
|
if (
|
||||||
|
(userContext.apiType === "Mongo" && container.isShellEnabled() && container.isDatabaseNodeOrNoneSelected()) ||
|
||||||
|
userContext.apiType === "Cassandra"
|
||||||
|
) {
|
||||||
|
buttons.push(createDivider());
|
||||||
|
if (userContext.apiType === "Cassandra") {
|
||||||
|
buttons.push(createOpenCassandraTerminalButton(container));
|
||||||
|
} else {
|
||||||
|
buttons.push(createOpenMongoTerminalButton(container));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!container.isRunningOnNationalCloud()) {
|
||||||
|
buttons.push(createEnableNotebooksButton(container));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!container.isDatabaseNodeOrNoneSelected()) {
|
if (!container.isDatabaseNodeOrNoneSelected()) {
|
||||||
if (container.isNotebookEnabled()) {
|
const isQuerySupported = userContext.apiType === "SQL" || userContext.apiType === "Gremlin";
|
||||||
buttons.push(createDivider());
|
|
||||||
}
|
|
||||||
|
|
||||||
const isSqlQuerySupported = userContext.apiType === "SQL" || userContext.apiType === "Gremlin";
|
if (isQuerySupported) {
|
||||||
if (isSqlQuerySupported) {
|
buttons.push(createDivider());
|
||||||
const newSqlQueryBtn = createNewSQLQueryButton(container);
|
const newSqlQueryBtn = createNewSQLQueryButton(container);
|
||||||
buttons.push(newSqlQueryBtn);
|
buttons.push(newSqlQueryBtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
const isSupportedOpenQueryApi =
|
if (isQuerySupported && container.selectedNode() && container.findSelectedCollection()) {
|
||||||
userContext.apiType === "SQL" || userContext.apiType === "Mongo" || userContext.apiType === "Gremlin";
|
|
||||||
const isSupportedOpenQueryFromDiskApi = userContext.apiType === "SQL" || userContext.apiType === "Gremlin";
|
|
||||||
if (isSupportedOpenQueryApi && container.selectedNode() && container.findSelectedCollection()) {
|
|
||||||
const openQueryBtn = createOpenQueryButton(container);
|
const openQueryBtn = createOpenQueryButton(container);
|
||||||
openQueryBtn.children = [createOpenQueryButton(container), createOpenQueryFromDiskButton(container)];
|
openQueryBtn.children = [createOpenQueryButton(container), createOpenQueryFromDiskButton(container)];
|
||||||
buttons.push(openQueryBtn);
|
buttons.push(openQueryBtn);
|
||||||
} else if (isSupportedOpenQueryFromDiskApi && container.selectedNode() && container.findSelectedCollection()) {
|
|
||||||
buttons.push(createOpenQueryFromDiskButton(container));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (areScriptsSupported()) {
|
if (areScriptsSupported()) {
|
||||||
|
@ -132,13 +124,17 @@ export function createContextCommandBarButtons(container: Explorer): CommandButt
|
||||||
const buttons: CommandButtonComponentProps[] = [];
|
const buttons: CommandButtonComponentProps[] = [];
|
||||||
|
|
||||||
if (!container.isDatabaseNodeOrNoneSelected() && userContext.apiType === "Mongo") {
|
if (!container.isDatabaseNodeOrNoneSelected() && userContext.apiType === "Mongo") {
|
||||||
const label = "New Shell";
|
const label = container.isShellEnabled() ? "Open Mongo Shell" : "New Shell";
|
||||||
const newMongoShellBtn: CommandButtonComponentProps = {
|
const newMongoShellBtn: CommandButtonComponentProps = {
|
||||||
iconSrc: HostedTerminalIcon,
|
iconSrc: HostedTerminalIcon,
|
||||||
iconAlt: label,
|
iconAlt: label,
|
||||||
onCommandClick: () => {
|
onCommandClick: () => {
|
||||||
const selectedCollection: ViewModels.Collection = container.findSelectedCollection();
|
const selectedCollection: ViewModels.Collection = container.findSelectedCollection();
|
||||||
selectedCollection && selectedCollection.onNewMongoShellClick();
|
if (container.isShellEnabled()) {
|
||||||
|
container.openNotebookTerminal(ViewModels.TerminalKind.Mongo);
|
||||||
|
} else {
|
||||||
|
selectedCollection && selectedCollection.onNewMongoShellClick();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
commandButtonLabel: label,
|
commandButtonLabel: label,
|
||||||
ariaLabel: label,
|
ariaLabel: label,
|
||||||
|
|
|
@ -831,6 +831,7 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||||
"isResourceTokenCollectionNodeSelected": [Function],
|
"isResourceTokenCollectionNodeSelected": [Function],
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
|
"isShellEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
"isSparkEnabledForAccount": [Function],
|
"isSparkEnabledForAccount": [Function],
|
||||||
"isSynapseLinkUpdating": [Function],
|
"isSynapseLinkUpdating": [Function],
|
||||||
|
|
|
@ -821,6 +821,7 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
|
||||||
"isResourceTokenCollectionNodeSelected": [Function],
|
"isResourceTokenCollectionNodeSelected": [Function],
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
|
"isShellEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
"isSparkEnabledForAccount": [Function],
|
"isSparkEnabledForAccount": [Function],
|
||||||
"isSynapseLinkUpdating": [Function],
|
"isSynapseLinkUpdating": [Function],
|
||||||
|
|
|
@ -822,6 +822,7 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isSelectedDatabaseShared": [Function],
|
"isSelectedDatabaseShared": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
|
"isShellEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
"isSparkEnabledForAccount": [Function],
|
"isSparkEnabledForAccount": [Function],
|
||||||
"isSynapseLinkUpdating": [Function],
|
"isSynapseLinkUpdating": [Function],
|
||||||
|
|
Loading…
Reference in New Issue