-
- {currentValue}
- {currentUnit}
+ {#if currentValue !== undefined && currentUnit !== undefined && progress !== undefined && maxValue !== undefined && maxUnit !== undefined}
+
+
+
+ {currentValue}
+ {currentUnit}
+
+
{progress}%
+
+
+
+ {maxValue}
+ {maxUnit}
-
{progress}%
-
- {maxValue}
- {maxUnit}
-
-
= 75 && progress < 100}
- class:is-danger={progress >= 100}
- style:--graph-size={Math.max(Math.min(progress, maximum), minimum) + '%'} />
+ {/if}
+ {#if showBar && progressBarData.length > 0}
+
{/if}
diff --git a/src/lib/components/progressBar.svelte b/src/lib/components/progressBarDeprecated.svelte
similarity index 100%
rename from src/lib/components/progressBar.svelte
rename to src/lib/components/progressBarDeprecated.svelte
diff --git a/src/lib/components/progressbar/ProgressBar.svelte b/src/lib/components/progressbar/ProgressBar.svelte
new file mode 100644
index 000000000..575c782c0
--- /dev/null
+++ b/src/lib/components/progressbar/ProgressBar.svelte
@@ -0,0 +1,92 @@
+
+
+
+ {#each $$props.data as item}
+ ${item.tooltip.title} ${item.tooltip.label}`
+ }}>
+
+ {/each}
+ {#if remainder > 0}
+
+ {/if}
+
+
+
diff --git a/src/lib/components/progressbar/index.ts b/src/lib/components/progressbar/index.ts
new file mode 100644
index 000000000..48c2711b8
--- /dev/null
+++ b/src/lib/components/progressbar/index.ts
@@ -0,0 +1,17 @@
+export type ProgressbarData = {
+ size: number;
+ color: string;
+ tooltip?: {
+ title: string;
+ label: string;
+ // linkTitle?: string;
+ // linkPath?: string;
+ };
+};
+
+export type ProgressbarProps = {
+ maxSize: number;
+ data: Array
;
+};
+
+export { default as ProgressBar } from './ProgressBar.svelte';
diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts
index f0fd8ec08..ba68502fc 100644
--- a/src/lib/sdk/billing.ts
+++ b/src/lib/sdk/billing.ts
@@ -178,6 +178,9 @@ export type OrganizationUsage = {
bandwidth: Array;
executions: Array;
executionsTotal: number;
+ filesStorageTotal: number;
+ buildsStorageTotal: number;
+ deploymentsStorageTotal: 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 d1fbdf0ee..8a220599e 100644
--- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte
+++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte
@@ -282,6 +282,32 @@
{@const current = data.organizationUsage.storageTotal}
{@const currentHumanized = humanFileSize(current)}
{@const max = getServiceLimit('storage', tier)}
+ {@const progressBarStorageDate = [
+ {
+ size: bytesToSize(data.organizationUsage.filesStorageTotal, 'GB'),
+ color: '#85DBD8',
+ tooltip: {
+ title: 'File storage',
+ label: `${Math.round(bytesToSize(data.organizationUsage.filesStorageTotal, 'GB') * 100) / 100}GB`
+ }
+ },
+ {
+ size: bytesToSize(data.organizationUsage.deploymentsStorageTotal, 'GB'),
+ color: '#7C67FE',
+ tooltip: {
+ title: 'Deployments storage',
+ label: `${Math.round(bytesToSize(data.organizationUsage.deploymentsStorageTotal, 'GB') * 100) / 100}GB`
+ }
+ },
+ {
+ size: bytesToSize(data.organizationUsage.buildsStorageTotal, 'GB'),
+ color: '#FE9567',
+ tooltip: {
+ title: 'Builds storage',
+ label: `${Math.round(bytesToSize(data.organizationUsage.buildsStorageTotal, 'GB') * 100) / 100}GB`
+ }
+ }
+ ]}
+ progressBarData={progressBarStorageDate} />
{#if project?.length > 0}
{/if}
diff --git a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts
index cb8264f1a..75b9d65c2 100644
--- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts
+++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts
@@ -19,6 +19,9 @@ export const load: PageLoad = async ({ params, parent }) => {
users: null,
usersTotal: null,
storageTotal: null,
+ filesStorageTotal: null,
+ buildsStorageTotal: null,
+ deploymentsStorageTotal: 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 265b063c1..828c5d019 100644
--- a/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
+++ b/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
@@ -1,6 +1,6 @@