mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 01:25:38 -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:
@@ -449,7 +449,7 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
public async changeContext(server: string, newConnection?: IConnectionProfile): Promise<void> {
|
||||
public async changeContext(server: string, newConnection?: IConnectionProfile, hideErrorMessage?: boolean): Promise<void> {
|
||||
try {
|
||||
if (!newConnection) {
|
||||
newConnection = this._activeContexts.otherConnections.find((connection) => connection.serverName === server);
|
||||
@@ -467,7 +467,9 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
},
|
||||
error => {
|
||||
if (error) {
|
||||
this.notifyError(notebookUtils.getErrorMessage(error));
|
||||
if (!hideErrorMessage) {
|
||||
this.notifyError(notebookUtils.getErrorMessage(error));
|
||||
}
|
||||
//Selected a wrong connection, Attach to should be defaulted with 'Select connection'
|
||||
this._onValidConnectionSelected.fire(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user