use selected subscriptions (#12691) (#12741)

* working version

* pr feedback

Co-authored-by: Arvind Ranasaria <ranasaria@outlook.com>
This commit is contained in:
Charles Gagnon
2020-10-05 18:51:26 -07:00
committed by GitHub
parent d5daaf918d
commit 4c6b606c82
7 changed files with 51 additions and 19 deletions

View File

@@ -10,7 +10,8 @@ import { OptionsSourceType } from './helpers/optionSources';
const localize = nls.loadMessageBundle();
export const account = localize('azure.account', "Azure Account");
export const subscription = localize('azure.account.subscription', "Subscription");
export const subscription = localize('azure.account.subscription', "Subscription (selected subset)");
export const subscriptionDescription = localize('azure.account.subscriptionDescription', "Change the currently selected subscriptions through the 'Select Subscriptions' action on an account listed in the 'Azure' tree view of the 'Connections' viewlet");
export const resourceGroup = localize('azure.account.resourceGroup', "Resource Group");
export const location = localize('azure.account.location', "Azure Location");
export const browse = localize('filePicker.browse', "Browse");

View File

@@ -1010,6 +1010,7 @@ function createAzureSubscriptionDropdown(
subscriptionValueToSubscriptionMap: Map<string, azureResource.AzureResourceSubscription>): azdata.DropDownComponent {
const label = createLabel(context.view, {
text: loc.subscription,
description: loc.subscriptionDescription,
required: context.fieldInfo.required,
width: context.fieldInfo.labelWidth,
cssStyles: context.fieldInfo.labelCSSStyles
@@ -1069,7 +1070,7 @@ async function handleSelectedAccountChanged(
}
try {
const response = await apiService.azurecoreApi.getSubscriptions(selectedAccount, true);
const response = await apiService.azurecoreApi.getSubscriptions(selectedAccount, true, false);
if (!response) {
return;
}