fix: do not show plan exceeded for compute (#19661)

This commit is contained in:
Kevin Grüneberg
2023-12-13 13:12:50 +01:00
committed by GitHub
parent f5941e2dd4
commit 20fbbdbf95

View File

@@ -49,7 +49,11 @@ const TotalUsage = ({
showRelationToSubscription &&
Boolean(
usage?.usages.find(
(metric) => !metric.unlimited && metric.usage > (metric?.pricing_free_units ?? 0)
(usageItem) =>
// Filter out compute as compute has no quota and is always being charged for
!usageItem.metric.startsWith('COMPUTE_') &&
!usageItem.unlimited &&
usageItem.usage > (usageItem?.pricing_free_units ?? 0)
)
)