diff --git a/src/lib/components/progressBarBig.svelte b/src/lib/components/progressBarBig.svelte
index 62777b97c..3a177f6a3 100644
--- a/src/lib/components/progressBarBig.svelte
+++ b/src/lib/components/progressBarBig.svelte
@@ -6,8 +6,10 @@
export let progressValue: number;
export let progressMax: number;
export let showBar = true;
+ export let minimum = 0;
+ export let maximum = 100;
- $: progress = Math.min(Math.max(Math.round((progressValue / progressMax) * 100), 0), 100);
+ $: progress = Math.round((progressValue / progressMax) * 100);
@@ -29,6 +31,6 @@
class="progress-bar-container u-margin-block-start-16"
class:is-warning={progress >= 75 && progress < 100}
class:is-danger={progress >= 100}
- style:--graph-size={progress + '%'} />
+ style:--graph-size={Math.max(Math.min(progress, maximum), minimum) + '%'} />
{/if}
diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts
index 17ba60b6a..7f535263d 100644
--- a/src/lib/sdk/billing.ts
+++ b/src/lib/sdk/billing.ts
@@ -165,6 +165,7 @@ export type Aggregation = {
export type OrganizationUsage = {
bandwidth: Array;
+ executions: Array;
executionsTotal: number;
storageTotal: number;
users: Array;
diff --git a/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.svelte b/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.svelte
index 3bc7db2ed..2ae1b1a2e 100644
--- a/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.svelte
+++ b/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.svelte
@@ -220,7 +220,24 @@
maxUnit="Executions"
maxValue={formatNum(max)}
progressValue={current}
- progressMax={max} />
+ progressMax={max}
+ showBar={false} />
+ [e.date, e.value])
+ ]
+ }
+ ]} />
{:else}
@@ -255,7 +272,8 @@
maxUnit="GB"
maxValue={max.toString()}
progressValue={bytesToSize(current, 'GB')}
- progressMax={max} />
+ progressMax={max}
+ minimum={1} />
{:else}
diff --git a/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.ts b/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.ts
index 6c2006924..176d456fe 100644
--- a/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.ts
+++ b/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.ts
@@ -19,6 +19,7 @@ export const load: PageLoad = async ({ params, parent }) => {
users: null,
usersTotal: null,
storageTotal: null,
+ executions: null,
executionsTotal: null,
projects: null
}
diff --git a/src/routes/console/project-[project]/functions/function-[function]/usage/[[period]]/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/usage/[[period]]/+page.svelte
index c71a6d1ad..c486d2ba5 100644
--- a/src/routes/console/project-[project]/functions/function-[function]/usage/[[period]]/+page.svelte
+++ b/src/routes/console/project-[project]/functions/function-[function]/usage/[[period]]/+page.svelte
@@ -4,6 +4,7 @@
import { BarChart } from '$lib/charts';
import { page } from '$app/stores';
import type { PageData } from './$types';
+ import { formatNumberWithCommas } from '$lib/helpers/numbers';
export let data: PageData;
$: total = data.executionsTotal;
@@ -33,7 +34,7 @@
{#if count}
- {total}
+ {formatNumberWithCommas(total)}
Executions