mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 01:25:37 -05:00
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:
@@ -71,13 +71,7 @@ export class AccountPickerListRenderer implements IListRenderer<azdata.Account,
|
||||
templateData.icon.classList.add('account-logo', account.displayInfo.accountType);
|
||||
|
||||
templateData.contextualDisplayName.innerText = account.displayInfo.contextualDisplayName;
|
||||
|
||||
// show the account display name text, something like "User Name (user@email.com)"
|
||||
if (account.displayInfo.userId && account.displayInfo.displayName) {
|
||||
templateData.displayName.innerText = account.displayInfo.displayName + ' (' + account.displayInfo.userId + ')';
|
||||
} else {
|
||||
templateData.displayName.innerText = account.displayInfo.displayName;
|
||||
}
|
||||
templateData.displayName.innerText = account.displayInfo.displayName;
|
||||
|
||||
if (account.isStale) {
|
||||
templateData.badgeContent.className = 'badge-content codicon warning-badge';
|
||||
|
||||
@@ -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('');
|
||||
|
||||
Reference in New Issue
Block a user