mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 09:35:38 -05:00
Unified connection in notebooks (#3898)
* yarn files * #3897: Integrate unified connection with notebooks * ConnectionProfile serialization in unified connection * #3898 Handle connection validation from extension * Removing unused namespaces * Remove constant * Show a detailed error message on changing context * Indentation
This commit is contained in:
@@ -451,7 +451,11 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
let newConnectionProfile = new ConnectionProfile(this.notebookOptions.capabilitiesService, newConnection);
|
||||
this._activeConnection = newConnectionProfile;
|
||||
this.refreshConnections(newConnectionProfile);
|
||||
await this._activeClientSession.updateConnection(this._activeConnection);
|
||||
this._activeClientSession.updateConnection(this._activeConnection.toIConnectionProfile()).catch((error) => {
|
||||
if (error) {
|
||||
this.notifyError(error.message);
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
let msg = notebookUtils.getErrorMessage(err);
|
||||
this.notifyError(localize('changeContextFailed', 'Changing context failed: {0}', msg));
|
||||
@@ -556,7 +560,7 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
if (this._activeClientSession) {
|
||||
try {
|
||||
await this._activeClientSession.ready;
|
||||
} catch(err) {
|
||||
} catch (err) {
|
||||
this.notifyError(localize('shutdownClientSessionError', 'A client session error occurred when closing the notebook: {0}', err));
|
||||
}
|
||||
await this._activeClientSession.shutdown();
|
||||
|
||||
@@ -158,7 +158,7 @@ export class ConnectionProfile extends ProviderConnectionInfo implements interfa
|
||||
serverName: this.serverName,
|
||||
databaseName: this.databaseName,
|
||||
authenticationType: this.authenticationType,
|
||||
getOptionsKey: undefined,
|
||||
getOptionsKey: this.getOptionsKey,
|
||||
matches: undefined,
|
||||
groupId: this.groupId,
|
||||
groupFullName: this.groupFullName,
|
||||
|
||||
Reference in New Issue
Block a user