mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix getUriForConnection API returning wrong URIs (#2202)
* Fix connection URI api to return working URI * run tsfmt * Keep using hand-built connection string for now in import * Use connection ID instead of URI to get connection string
This commit is contained in:
committed by
Karl Burtram
parent
efa3658ced
commit
3001640eec
@@ -22,14 +22,18 @@ export class ConnectionStatusManager {
|
||||
this._providerCapabilitiesMap = {};
|
||||
}
|
||||
|
||||
public findConnection(id: string): ConnectionManagementInfo {
|
||||
if (id in this._connections) {
|
||||
return this._connections[id];
|
||||
public findConnection(uri: string): ConnectionManagementInfo {
|
||||
if (uri in this._connections) {
|
||||
return this._connections[uri];
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
public findConnectionByProfileId(profileId: string): ConnectionManagementInfo {
|
||||
return Object.values(this._connections).find((connection: ConnectionManagementInfo) => connection.connectionProfile.id === profileId);
|
||||
}
|
||||
|
||||
public findConnectionProfile(connectionProfile: IConnectionProfile): ConnectionManagementInfo {
|
||||
let id = Utils.generateUri(connectionProfile);
|
||||
return this.findConnection(id);
|
||||
|
||||
Reference in New Issue
Block a user