Skip to content

Commit

Permalink
Merge pull request #134 from rancher/cluster-id-filter
Browse files Browse the repository at this point in the history
Fixing the cluster_id in filters
  • Loading branch information
codyrancher authored Apr 6, 2023
2 parents 31b9504 + 654495a commit efd756c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions public/utils/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface LogTemplate {
}

export interface BasicBreakdown {
clusterId: string;
clusterName: string;
name: string;
anomaly: number;
Expand Down Expand Up @@ -189,7 +190,8 @@ export async function getControlPlaneBreakdown(range: Range, clusterId: string,
...extractCounts(bucket.anomaly_level.buckets),
keywords: keywordsBucket?.doc_count || 0,
name: bucket.key,
clusterName: clusterById[cluster.key]?.name || cluster.key
clusterName: clusterById[cluster.key]?.name || cluster.key,
clusterId: cluster.key
};
});
});
Expand All @@ -215,7 +217,8 @@ export async function getRancherBreakdown(range: Range, clusterId: string, keywo
...extractCounts(bucket.anomaly_level.buckets),
keywords: keywordsBucket?.doc_count || 0,
name: bucket.key,
clusterName: clusterById[cluster.key]?.name || cluster.key
clusterName: clusterById[cluster.key]?.name || cluster.key,
clusterId: cluster.key
};
});
});
Expand All @@ -239,7 +242,8 @@ export async function getLonghornBreakdown(range: Range, clusterId: string, keyw
...extractCounts(bucket.anomaly_level?.buckets),
keywords: keywordsBucket?.doc_count || 0,
name: bucket.key,
clusterName: clusterById[cluster.key]?.name || cluster.key
clusterName: clusterById[cluster.key]?.name || cluster.key,
clusterId: cluster.key
};
});
});
Expand Down Expand Up @@ -271,7 +275,8 @@ export async function getPodBreakdown(range: Range, clusterId: string, keywords:
...extractCounts(bucket.anomaly_level.buckets),
keywords: keywordsBucket?.doc_count || 0,
name: bucket.key,
clusterName: clusterById[cluster.key]?.name || cluster.key
clusterName: clusterById[cluster.key]?.name || cluster.key,
clusterId: cluster.key
};
});
});
Expand Down Expand Up @@ -349,7 +354,8 @@ export async function getNamespaceBreakdown(range: Range, clusterId: string, key
...extractCounts(bucket.anomaly_level.buckets),
keywords: keywordsBucket?.doc_count || 0,
name: bucket.key,
clusterName: clusterById[cluster.key]?.name || cluster.key
clusterName: clusterById[cluster.key]?.name || cluster.key,
clusterId: cluster.key
};
});
});
Expand Down

0 comments on commit efd756c

Please sign in to comment.