From 586a51ebde6d07b928bc97708ff9e78ed9bbe09b Mon Sep 17 00:00:00 2001 From: ChiragAgg5k Date: Wed, 26 Feb 2025 10:26:38 +0530 Subject: [PATCH] chore: added image transformation breakdown --- src/lib/sdk/usage.ts | 4 ++-- .../usage/[[invoice]]/+page.svelte | 8 +++++++- .../usage/[[invoice]]/ProjectBreakdown.svelte | 7 ++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/lib/sdk/usage.ts b/src/lib/sdk/usage.ts index 1d99d8d50..f0bf1dc40 100644 --- a/src/lib/sdk/usage.ts +++ b/src/lib/sdk/usage.ts @@ -186,11 +186,11 @@ export type UsageBuckets = { */ storage: Metric[]; /** - * Aggregated statistics of bucket file transformations per period. + * Aggregated statistics of bucket image transformations per period. */ imageTransformations: Metric[]; /** - * Total aggregated number of file transformations. + * Total aggregated number of bucket image transformations. */ imageTransformationsTotal: number; }; diff --git a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte index e172ae8f3..24d5fae5c 100644 --- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte +++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte @@ -265,6 +265,9 @@

The total number of image transformations across all projects in your organization.

+ {#if $organization.billingPlan === BillingPlan.FREE} +

This feature is not available on the Free plan.

+ {/if} {#if data.organizationUsage.imageTransformationsTotal} {@const current = data.organizationUsage.imageTransformationsTotal} @@ -273,7 +276,7 @@ + {#if projects?.length > 0} + + {/if} {:else}
diff --git a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte index ca31412f4..5eea3c4a7 100644 --- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte +++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte @@ -1,5 +1,5 @@