mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Attach To is set to 'Localhost' upon cancelling the connection dialog (#3941)
* #3924: Attach To sets 'Localhost' upon cancelling the connection dialog * Indentation
This commit is contained in:
@@ -344,11 +344,10 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
|||||||
attachSelectBoxStyler(kernelDropdown, this.themeService);
|
attachSelectBoxStyler(kernelDropdown, this.themeService);
|
||||||
|
|
||||||
let attachToContainer = document.createElement('div');
|
let attachToContainer = document.createElement('div');
|
||||||
let attachTodropdwon = new AttachToDropdown(attachToContainer, this.contextViewService, this.modelRegistered,
|
let attachToDropdown = new AttachToDropdown(attachToContainer, this.contextViewService, this.modelRegistered,
|
||||||
this.connectionManagementService, this.connectionDialogService, this.notificationService, this.capabilitiesService);
|
this.connectionManagementService, this.connectionDialogService, this.notificationService, this.capabilitiesService);
|
||||||
attachTodropdwon.render(attachToContainer);
|
attachToDropdown.render(attachToContainer);
|
||||||
attachSelectBoxStyler(attachTodropdwon, this.themeService);
|
attachSelectBoxStyler(attachToDropdown, this.themeService);
|
||||||
|
|
||||||
|
|
||||||
let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('code', 'Code'), 'notebook-button icon-add');
|
let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('code', 'Code'), 'notebook-button icon-add');
|
||||||
addCodeCellButton.cellType = CellTypes.Code;
|
addCodeCellButton.cellType = CellTypes.Code;
|
||||||
|
|||||||
@@ -336,14 +336,14 @@ export class AttachToDropdown extends SelectBox {
|
|||||||
await this._connectionDialogService.openDialogAndWait(this._connectionManagementService, { connectionType: 1, providers: this.model.getApplicableConnectionProviderIds(this.model.clientSession.kernel.name) }).then(connection => {
|
await this._connectionDialogService.openDialogAndWait(this._connectionManagementService, { connectionType: 1, providers: this.model.getApplicableConnectionProviderIds(this.model.clientSession.kernel.name) }).then(connection => {
|
||||||
let attachToConnections = this.values;
|
let attachToConnections = this.values;
|
||||||
if (!connection) {
|
if (!connection) {
|
||||||
this.loadAttachToDropdown(this.model, this.model.clientSession.kernel.name);
|
this.loadAttachToDropdown(this.model, this.getKernelDisplayName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let connectionProfile = new ConnectionProfile(this._capabilitiesService, connection);
|
let connectionProfile = new ConnectionProfile(this._capabilitiesService, connection);
|
||||||
let connectedServer = connectionProfile.serverName;
|
let connectedServer = connectionProfile.serverName;
|
||||||
//Check to see if the same server is already there in dropdown. We only have server names in dropdown
|
//Check to see if the same server is already there in dropdown. We only have server names in dropdown
|
||||||
if (attachToConnections.some(val => val === connectedServer)) {
|
if (attachToConnections.some(val => val === connectedServer)) {
|
||||||
this.loadAttachToDropdown(this.model, this.model.clientSession.kernel.name);
|
this.loadAttachToDropdown(this.model, this.getKernelDisplayName());
|
||||||
this.doChangeContext();
|
this.doChangeContext();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user