mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
chore: added image transformation breakdown
This commit is contained in:
1 parent
2258baaa9d
commit
586a51ebde
3 files changed
+13
-6
No files matched your search
@@ -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;
|
||||
};
|
||||
|
||||
@@ -265,6 +265,9 @@
|
||||
<p class="text">
|
||||
The total number of image transformations across all projects in your organization.
|
||||
</p>
|
||||
{#if $organization.billingPlan === BillingPlan.FREE}
|
||||
<p>This feature is not available on the Free plan.</p>
|
||||
{/if}
|
||||
<svelte:fragment slot="aside">
|
||||
{#if data.organizationUsage.imageTransformationsTotal}
|
||||
{@const current = data.organizationUsage.imageTransformationsTotal}
|
||||
@@ -273,7 +276,7 @@
|
||||
<ProgressBarBig
|
||||
currentUnit="Transformations"
|
||||
currentValue={formatNum(current)}
|
||||
maxUnit="Transformations"
|
||||
maxUnit="transformations"
|
||||
maxValue={`out of ${formatNum(max)}`}
|
||||
progressValue={current}
|
||||
progressMax={max}
|
||||
@@ -297,6 +300,9 @@
|
||||
}
|
||||
]} />
|
||||
</div>
|
||||
{#if projects?.length > 0}
|
||||
<ProjectBreakdown {projects} metric="imageTransformations" {data} />
|
||||
{/if}
|
||||
{:else}
|
||||
<Card isDashed>
|
||||
<div class="u-flex u-cross-center u-flex-vertical u-main-center u-flex">
|
||||
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import type { PageData } from './$types';
|
||||
import { base } from '$app/paths';
|
||||
import { Collapsible, CollapsibleItem } from '$lib/components';
|
||||
import {
|
||||
TableBody,
|
||||
@@ -13,9 +13,9 @@
|
||||
import { abbreviateNumber, formatCurrency, formatNumberWithCommas } from '$lib/helpers/numbers';
|
||||
import { humanFileSize } from '$lib/helpers/sizeConvertion';
|
||||
import type { OrganizationUsage } from '$lib/sdk/billing';
|
||||
import { base } from '$app/paths';
|
||||
import { canSeeProjects } from '$lib/stores/roles';
|
||||
import { onMount } from 'svelte';
|
||||
import type { PageData } from './$types';
|
||||
|
||||
type Metric =
|
||||
| 'users'
|
||||
@@ -24,7 +24,8 @@
|
||||
| 'executions'
|
||||
| 'authPhoneTotal'
|
||||
| 'databasesReads'
|
||||
| 'databasesWrites';
|
||||
| 'databasesWrites'
|
||||
| 'imageTransformations';
|
||||
|
||||
type Estimate = 'authPhoneEstimate';
|
||||
|
||||
|
||||
Reference in new issue
Block a user