mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 03:28:33 -05:00
Fix default auth and 'AzureTenantId' to persist and not reset on selection event (#21289)
This commit is contained in:
@@ -206,10 +206,10 @@ class FlatAccountTreeNodeLoader {
|
||||
const resourceProviderIds = await this._resourceService.listResourceProviderIds();
|
||||
for (const subscription of subscriptions) {
|
||||
for (const providerId of resourceProviderIds) {
|
||||
const resourceTypes = await this._resourceService.getRootChildren(providerId, this._account, subscription, subscription.tenant!);
|
||||
const resourceTypes = await this._resourceService.getRootChildren(providerId, this._account, subscription);
|
||||
for (const resourceType of resourceTypes) {
|
||||
const resources = await this._resourceService.getChildren(providerId, resourceType.resourceNode, true);
|
||||
if (resources.length > 0) {
|
||||
if (resources?.length > 0) {
|
||||
this._nodes.push(...resources.map(dr => new AzureResourceResourceTreeNode(dr, this._accountNode, this.appContext)));
|
||||
this._nodes = this.nodes.sort((a, b) => {
|
||||
return a.getNodeInfo().label.localeCompare(b.getNodeInfo().label);
|
||||
|
||||
@@ -126,7 +126,7 @@ class ResourceLoader {
|
||||
for (const tenant of account.properties.tenants) {
|
||||
for (const subscription of await this.subscriptionService.getSubscriptions(account, [tenant.id])) {
|
||||
for (const providerId of await this.resourceService.listResourceProviderIds()) {
|
||||
for (const group of await this.resourceService.getRootChildren(providerId, account, subscription, subscription.tenant!)) {
|
||||
for (const group of await this.resourceService.getRootChildren(providerId, account, subscription)) {
|
||||
const children = await this.resourceService.getChildren(providerId, group.resourceNode);
|
||||
let groupNode: AzureResourceResourceTreeNode | undefined = this.resourceGroups.get(group.resourceProviderId);
|
||||
if (groupNode) {
|
||||
|
||||
@@ -42,7 +42,7 @@ export class AzureResourceSubscriptionTreeNode extends AzureResourceContainerTre
|
||||
const children: IAzureResourceNodeWithProviderId[] = [];
|
||||
|
||||
for (const resourceProviderId of await resourceService.listResourceProviderIds()) {
|
||||
children.push(...await resourceService.getRootChildren(resourceProviderId, this.account, this.subscription, this.tenantId));
|
||||
children.push(...await resourceService.getRootChildren(resourceProviderId, this.account, this.subscription));
|
||||
}
|
||||
|
||||
if (children.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user