Revert "Stop executing the same code three times (#9835)" (#10026)

This reverts commit 97108bdeea.
This commit is contained in:
Anthony Dresser
2020-04-16 14:54:25 -07:00
committed by GitHub
parent e8bc6f8f6b
commit 5b19fe7c67
2 changed files with 3 additions and 0 deletions

View File

@@ -423,6 +423,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
this._params = params;
this._inputModel = model;
return new Promise<void>((resolve, reject) => {
this.updateModelServerCapabilities(model);
// If connecting from a query editor set "save connection" to false
if (params && (params.input && params.connectionType === ConnectionType.editor ||
params.connectionType === ConnectionType.temporary)) {
@@ -454,6 +455,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
this._connectionDialog.render();
}
this._connectionDialog.newConnectionParams = params;
this._connectionDialog.updateProvider(this._providerNameToDisplayNameMap[this._currentProviderType]);
const recentConnections: ConnectionProfile[] = this._connectionManagementService.getRecentConnections(params.providers);
await this._connectionDialog.open(recentConnections.length > 0);

View File

@@ -277,6 +277,7 @@ export class ConnectionDialogWidget extends Modal {
// Show connection form based on server type
DOM.clearNode(this._connectionUIContainer);
this._onShowUiComponent.fire({ selectedProviderDisplayName: selectedProviderDisplayName, container: this._connectionUIContainer });
this.initDialog();
}
private connect(element?: IConnectionProfile): void {