diff --git a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte index 0b25f4dcc..771f22e9a 100644 --- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte +++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte @@ -119,36 +119,41 @@ - - value - ? `${humanFileSize(+value).value} ${ - humanFileSize(+value).unit - }` - : '0' +
+ + value + ? `${humanFileSize(+value).value} ${ + humanFileSize(+value).unit + }` + : '0' + } } - } - }} - series={[ - { - name: 'Bandwidth', - data: [ - ...data.organizationUsage.bandwidth.map((e) => [e.date, e.value]) - ], - tooltip: { - valueFormatter: (value) => - `${humanFileSize(+value).value} ${humanFileSize(+value).unit}` + }} + series={[ + { + name: 'Bandwidth', + data: [ + ...data.organizationUsage.bandwidth.map((e) => [ + e.date, + e.value + ]) + ], + tooltip: { + valueFormatter: (value) => + `${humanFileSize(+value).value} ${humanFileSize(+value).unit}` + } } - } - ]} /> + ]} /> +
{#if project?.length > 0} {/if} @@ -183,23 +188,25 @@ progressValue={current} progressMax={max} showBar={false} /> - + + }} + series={[ + { + name: 'Users', + data: accumulateFromEndingTotal( + data.organizationUsage.users, + data.organizationUsage.usersTotal + ) + } + ]} /> + {#if project?.length > 0} {/if} @@ -231,27 +238,32 @@ - + [e.date, e.value]) - ] - } - ]} /> + }} + series={[ + { + name: 'Executions', + data: [ + ...data.organizationUsage.executions.map((e) => [ + e.date, + e.value + ]) + ] + } + ]} /> + {#if project?.length > 0} {/if} @@ -311,8 +323,8 @@ @@ -336,12 +348,16 @@ GB hours

- GB hours represent the memory usage (in gigabytes) of your function executions and builds, multiplied by the total execution time (in hours). + GB hours represent the memory usage (in gigabytes) of your function executions and + builds, multiplied by the total execution time (in hours).

{#if data.organizationUsage.storageTotal} - {@const totalGbHours = mbSecondsToGBHours(data.organizationUsage.executionsMBSecondsTotal + data.organizationUsage.buildsMBSecondsTotal)} + {@const totalGbHours = mbSecondsToGBHours( + data.organizationUsage.executionsMBSecondsTotal + + data.organizationUsage.buildsMBSecondsTotal + )} {@const progressBarStorageDate = [ { size: mbSecondsToGBHours(data.organizationUsage.executionsMBSecondsTotal), @@ -363,7 +379,8 @@

- {Math.round(totalGbHours).toLocaleString('en-US')} + {Math.round(totalGbHours).toLocaleString('en-US')} {`GB hours`}