diff --git a/src/constants.ts b/src/constants.ts index 744aeef..ceba694 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -47,6 +47,7 @@ export const APIMAccountCommandId = { accountSigningIn: "azureApiManagementAccountSigningIn", accountSelectTenant: "azureApiManagementAccountSelectTenant", accountError: "azureApiManagementAccountError", + accountSubscription: "azureApiManagementAccountSubscription", } export const AzureAccountUrl = { diff --git a/src/explorer/AzureAccountTreeItem.ts b/src/explorer/AzureAccountTreeItem.ts index 983bf39..ad41d04 100644 --- a/src/explorer/AzureAccountTreeItem.ts +++ b/src/explorer/AzureAccountTreeItem.ts @@ -141,10 +141,11 @@ export class AzureAccountTreeItem extends AzExtParentTreeItem { if (subscriptions.result.length === 0) { return [ new GenericTreeItem(this, { - label: UiStrings.NoSubscriptionsFound, + label: UiStrings.SelectSubscriptionInPanel, + commandId: "azureApiManagement.selectSubscriptions", contextValue: "azureCommand", - id: APIMAccountCommandId.accountError, - iconPath: new vscode.ThemeIcon("info"), + id: APIMAccountCommandId.accountSubscription, + includeInTreeItemPicker: true, }), ]; } diff --git a/src/uiStrings.ts b/src/uiStrings.ts index 046a9c7..ebfed44 100644 --- a/src/uiStrings.ts +++ b/src/uiStrings.ts @@ -27,4 +27,5 @@ export class UiStrings { static readonly NoTenantFound = vscode.l10n.t("No tenants found."); static readonly NoAzureSessionFound = vscode.l10n.t("No Azure session found."); static readonly FailedTo = vscode.l10n.t("Failed to retrieve Azure session: {0}"); + static readonly SelectSubscriptionInPanel = vscode.l10n.t("Select Subscriptions..."); }