From 753a7936fbf483448ca19da42f15ee44d68a7910 Mon Sep 17 00:00:00 2001 From: Junyu Qian Date: Tue, 18 Feb 2025 10:14:50 +1100 Subject: [PATCH] bug fix: member clusters in the treeview --- src/tree/subscriptionTreeItem.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tree/subscriptionTreeItem.ts b/src/tree/subscriptionTreeItem.ts index 51ad8a68..0871f5b2 100644 --- a/src/tree/subscriptionTreeItem.ts +++ b/src/tree/subscriptionTreeItem.ts @@ -123,6 +123,12 @@ class SubscriptionTreeItem extends AzExtParentTreeItem implements SubscriptionTr // filter out members that do not satisfy the filter (so that they are not shown in the tree) const membersAfterFilt = members.result.filter((m) => { // for each member cluster of the fleet + if (parseResource(m.clusterResourceId).subscriptionId !== this.subscriptionId) { + // if the member is not in the same subscription as the fleet, + // there is no way it can be in the filter, as cluster-filter only contains clusters from the same subscription + // to avoid being filtered out, add it to the list before applying the filter + return true; + } const filteredClusters = getFilteredClusters(); return filteredClusters.some( // check if the member is one of the clusters in the filter