12567 Fixed Notebooks not adding to recent connections (#13113)

* 12567 Changed tryAddActiveConnection to always add recent connection

* 12567 Reverted change to tryAddActiveConnection. Removed this._params.input from connectionDialogService > createModel

* 12567 Simplified conditional in connectionDialogService
This commit is contained in:
Justin M
2020-11-16 11:27:09 -08:00
committed by GitHub
parent c18a54bc1d
commit 271fe62344
2 changed files with 2 additions and 2 deletions

View File

@@ -480,7 +480,7 @@ export class AttachToDropdown extends SelectBox {
} }
let connection = await this._connectionDialogService.openDialogAndWait(this._connectionManagementService, let connection = await this._connectionDialogService.openDialogAndWait(this._connectionManagementService,
{ {
connectionType: ConnectionType.temporary, connectionType: ConnectionType.editor,
providers: providers providers: providers
}, },
useProfile ? this.model.connectionProfile : undefined); useProfile ? this.model.connectionProfile : undefined);

View File

@@ -381,7 +381,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
newProfile.saveProfile = true; newProfile.saveProfile = true;
newProfile.generateNewId(); newProfile.generateNewId();
// If connecting from a query editor set "save connection" to false // If connecting from a query editor set "save connection" to false
if (this._params && this._params.input && this._params.connectionType === ConnectionType.editor) { if (this._params?.connectionType === ConnectionType.editor) {
newProfile.saveProfile = false; newProfile.saveProfile = false;
} }
return newProfile; return newProfile;