Hide tenant dropdown from Connection Dialog (#22973)

This commit is contained in:
Cheena Malhotra
2023-05-05 10:40:00 -07:00
committed by GitHub
parent 876a4a24f6
commit 0dc05a6a4c
10 changed files with 153 additions and 15 deletions

View File

@@ -16,6 +16,7 @@ import { getErrorMessage, onUnexpectedError } from 'vs/base/common/errors';
import { AsyncServerTree, ConnectionError as AsyncTreeConnectionError, ServerTreeElement } from 'sql/workbench/services/objectExplorer/browser/asyncServerTree';
import { ObjectExplorerRequestStatus } from 'sql/workbench/services/objectExplorer/browser/treeSelectionHandler';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { localize } from 'vs/nls';
export interface IExpandableTree extends ITree {
/**
@@ -217,11 +218,11 @@ export class TreeUpdateUtils {
}
const result = await connectionManagementService.connect(connection, undefined, options, callbacks);
if (result.connected) {
if (result?.connected) {
let existingConnection = connectionManagementService.findExistingConnection(connection);
return existingConnection;
} else {
throw new Error(result.errorMessage);
throw new Error(result ? result.errorMessage : localize('connectionFailedError', 'Failed to connect, please try again.'));
}
}
} else {