Fix some minor connection db dropdown bugs (#637)

* Fix some minor connection db dropdown bugs

* Put back cache for failed list
This commit is contained in:
Matt Irvine
2018-02-07 19:17:32 -08:00
committed by GitHub
parent 362664c4d8
commit e28b86ea87

View File

@@ -60,6 +60,8 @@ export class ConnectionController implements IConnectionComponentController {
tempProfile.authenticationType = authenticationType; tempProfile.authenticationType = authenticationType;
tempProfile.userName = userName; tempProfile.userName = userName;
tempProfile.password = password; tempProfile.password = password;
tempProfile.groupFullName = '';
tempProfile.saveProfile = false;
let uri = this._connectionManagementService.getConnectionId(tempProfile); let uri = this._connectionManagementService.getConnectionId(tempProfile);
return new Promise<string[]>((resolve, reject) => { return new Promise<string[]>((resolve, reject) => {
if (this._databaseCache.has(uri)) { if (this._databaseCache.has(uri)) {
@@ -80,7 +82,7 @@ export class ConnectionController implements IConnectionComponentController {
this._databaseCache.set(uri, null); this._databaseCache.set(uri, null);
reject(); reject();
} }
}) });
} else { } else {
reject(connResult.errorMessage); reject(connResult.errorMessage);
} }
@@ -114,6 +116,7 @@ export class ConnectionController implements IConnectionComponentController {
} }
public showUiComponent(container: HTMLElement): void { public showUiComponent(container: HTMLElement): void {
this._databaseCache = new Map<string, string[]>();
this._connectionWidget.createConnectionWidget(container); this._connectionWidget.createConnectionWidget(container);
} }