diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts index d2b407c8b..f46a3f634 100644 --- a/src/lib/sdk/billing.ts +++ b/src/lib/sdk/billing.ts @@ -184,6 +184,7 @@ export type OrganizationUsage = { deploymentsStorageTotal: number; executionsMBSecondsTotal: number; buildsMBSecondsTotal: number; + backupsStorageTotal: number; storageTotal: number; users: Array; usersTotal: number; diff --git a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte index 5e716cfab..4f7733ff1 100644 --- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte +++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte @@ -283,7 +283,7 @@ Storage

- Calculated for all your files, deployments, builds and databases. While in beta, only + Calculated for all your files, deployments, builds, databases and backups. While in beta, only file storage is counted against your plan limits.

@@ -301,6 +301,14 @@ label: `${Math.round(bytesToSize(data.organizationUsage.filesStorageTotal, 'GB') * 100) / 100}GB` } }, + { + size: bytesToSize(data.organizationUsage.backupsStorageTotal, 'GB'), + color: '#FF6F61', + tooltip: { + title: 'Backups storage', + label: `${Math.round(bytesToSize(data.organizationUsage.backupsStorageTotal, 'GB') * 100) / 100}MB` + } + }, { size: bytesToSize(data.organizationUsage.deploymentsStorageTotal, 'GB'), color: '#7C67FE', @@ -353,7 +361,7 @@ {#if data.organizationUsage.storageTotal} {@const totalGbHours = mbSecondsToGBHours( data.organizationUsage.executionsMBSecondsTotal + - data.organizationUsage.buildsMBSecondsTotal + data.organizationUsage.buildsMBSecondsTotal )} {@const progressBarStorageDate = [ { diff --git a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts index 9f548dd0e..243e5b52c 100644 --- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts +++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts @@ -22,6 +22,7 @@ export const load: PageLoad = async ({ params, parent }) => { filesStorageTotal: null, buildsStorageTotal: null, deploymentsStorageTotal: null, + backupsStorageTotal: null, executions: null, executionsTotal: null, projects: null, diff --git a/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte b/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte index ee2d2af1a..08c0f8c3e 100644 --- a/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte +++ b/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte @@ -31,7 +31,8 @@ $: storage = data.usage.filesStorageTotal + data.usage.deploymentsStorageTotal + - data.usage.buildsStorageTotal; + data.usage.buildsStorageTotal + + data.usage.backupsStorageTotal; const tier = data?.currentInvoice?.plan ?? $organization?.billingPlan; const plan = tierToPlan(tier).name; @@ -267,7 +268,7 @@ Storage

- Calculated for all your files, deployments, builds and databases. While in beta, only + Calculated for all your files, deployments, builds, databases and backups. While in beta, only file storage is counted against your plan limits.

@@ -283,6 +284,14 @@ label: `${Math.round(bytesToSize(data.usage.filesStorageTotal, 'MB') * 100) / 100}MB` } }, + { + size: bytesToSize(data.usage.backupsStorageTotal, 'MB'), + color: '#FF6F61', + tooltip: { + title: 'Backups storage', + label: `${Math.round(bytesToSize(data.usage.backupsStorageTotal, 'MB') * 100) / 100}MB` + } + }, { size: bytesToSize(data.usage.deploymentsStorageTotal, 'MB'), color: '#7C67FE',