mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 10:12:34 -05:00
'Attach to' with Spark kernel resets to sql connection on cancelling connection dialog (#4024)
* Sql connection resets to Select Connection on cancelling dialog * Hiding error message wehen cancel the connection dialog
This commit is contained in:
@@ -392,11 +392,11 @@ export class AttachToDropdown extends SelectBox {
|
||||
return otherConnections;
|
||||
}
|
||||
|
||||
public doChangeContext(connection?: ConnectionProfile): void {
|
||||
public doChangeContext(connection?: ConnectionProfile, hideErrorMessage?: boolean): void {
|
||||
if (this.value === msgAddNewConnection) {
|
||||
this.openConnectionDialog();
|
||||
} else {
|
||||
this.model.changeContext(this.value, connection).then(ok => undefined, err => this._notificationService.error(getErrorMessage(err)));
|
||||
this.model.changeContext(this.value, connection, hideErrorMessage).then(ok => undefined, err => this._notificationService.error(getErrorMessage(err)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,6 +412,7 @@ export class AttachToDropdown extends SelectBox {
|
||||
let attachToConnections = this.values;
|
||||
if (!connection) {
|
||||
this.loadAttachToDropdown(this.model, this.getKernelDisplayName());
|
||||
this.doChangeContext(undefined, true);
|
||||
return;
|
||||
}
|
||||
let connectionProfile = new ConnectionProfile(this._capabilitiesService, connection);
|
||||
|
||||
Reference in New Issue
Block a user