Skip to content

Commit

Permalink
Group subscriptions by account in selectSubscriptions (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexweininger authored Dec 6, 2024
1 parent 1e21cea commit 5b66562
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@
"@azure/ms-rest-js": "^2.7.0",
"@microsoft/vscode-azext-azureauth": "^3.1.0",
"@microsoft/vscode-azext-azureutils": "^3.1.1",
"@microsoft/vscode-azext-utils": "^2.5.11",
"@microsoft/vscode-azext-utils": "^2.5.12",
"buffer": "^6.0.3",
"form-data": "^4.0.1",
"jsonc-parser": "^2.2.1",
Expand Down
4 changes: 3 additions & 1 deletion src/commands/accounts/selectSubscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export async function selectSubscriptions(context: IActionContext, options?: Sel
.map(subscription => (<IAzureQuickPickItem<AzureSubscription>>{
label: duplicates.includes(subscription) ? subscription.name + ` (${subscription.account?.label})` : subscription.name,
description: subscription.subscriptionId,
data: subscription
data: subscription,
group: subscription.account.label
}))
.sort((a, b) => a.label.localeCompare(b.label));
}
Expand All @@ -63,6 +64,7 @@ export async function selectSubscriptions(context: IActionContext, options?: Sel
return selectedSubscriptionIds.length === 0 || selectedSubscriptionIds.includes((pick as IAzureQuickPickItem<AzureSubscription>).data.subscriptionId);
},
canPickMany: true,
enableGrouping: true,
placeHolder: localize('selectSubscriptions', 'Select Subscriptions')
});

Expand Down

0 comments on commit 5b66562

Please sign in to comment.