Use a unique key for the accounts (#11380)

* Use a unique key for the accounts

* Fix some tests

* Simplify display name

* Change to a random UUID
This commit is contained in:
Amir Omidi
2020-07-17 13:39:53 -07:00
committed by GitHub
parent eb82cd3f4b
commit 5613a97fae
9 changed files with 31 additions and 23 deletions

View File

@@ -520,7 +520,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
let oldSelection = this._azureAccountDropdown.value;
const accounts = await this._accountManagementService.getAccounts();
this._azureAccountList = accounts.filter(a => a.key.providerId.startsWith('azure'));
let accountDropdownOptions = this._azureAccountList.map(account => account.key.accountId);
let accountDropdownOptions = this._azureAccountList.map(account => account.displayInfo.displayName);
if (accountDropdownOptions.length === 0) {
// If there are no accounts add a blank option so that add account isn't automatically selected
accountDropdownOptions.unshift('');