mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -05:00
Fix Issue when OE connection Disconnects on Notebook Close (#4425)
* Fix OE connection closing when notebook closes * handle connections created through Add new connection
This commit is contained in:
@@ -379,7 +379,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
* otherwise tries to make a connection and returns the owner uri when connection is complete
|
||||
* The purpose is connection by default
|
||||
*/
|
||||
public connectIfNotConnected(connection: IConnectionProfile, purpose?: 'dashboard' | 'insights' | 'connection', saveConnection: boolean = false): Promise<string> {
|
||||
public connectIfNotConnected(connection: IConnectionProfile, purpose?: 'dashboard' | 'insights' | 'connection' | 'notebook', saveConnection: boolean = false): Promise<string> {
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
let ownerUri: string = Utils.generateUri(connection, purpose);
|
||||
if (this._connectionStatusManager.isConnected(ownerUri)) {
|
||||
@@ -1156,7 +1156,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
* Finds existing connection for given profile and purpose is any exists.
|
||||
* The purpose is connection by default
|
||||
*/
|
||||
public findExistingConnection(connection: IConnectionProfile, purpose?: 'dashboard' | 'insights' | 'connection'): ConnectionProfile {
|
||||
public findExistingConnection(connection: IConnectionProfile, purpose?: 'dashboard' | 'insights' | 'connection' | 'notebook'): ConnectionProfile {
|
||||
let connectionUri = Utils.generateUri(connection, purpose);
|
||||
let existingConnection = this._connectionStatusManager.findConnection(connectionUri);
|
||||
if (existingConnection && this._connectionStatusManager.isConnected(connectionUri)) {
|
||||
|
||||
@@ -17,7 +17,8 @@ export const uriPrefixes = {
|
||||
default: 'connection://',
|
||||
connection: 'connection://',
|
||||
dashboard: 'dashboard://',
|
||||
insights: 'insights://'
|
||||
insights: 'insights://',
|
||||
notebook: 'notebook://'
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user