Merge branch 'feat-implement-gb-hours' into feat-implement-runtime-controls

This commit is contained in:
Bradley Schofield committed 2024-07-30 11:48:24 +09:00
commit cf87620c32
1 file changed
+25
@@ -9,6 +9,8 @@
export let data: PageData;
$: total = data.executionsTotal;
$: count = data.executions;
$: gbHoursTotal = data.executionsMbSecondsTotal / 1000 / 3600;
$: mbSecondsCount = data.executionsMbSeconds;
</script>
<Container>
@@ -46,4 +48,27 @@
]} />
</Card>
{/if}
<div class="u-flex u-main-space-between common-section">
<Heading tag="h2" size="5">GB Hours</Heading>
</div>
{#if count}
<Card>
<Heading tag="h6" size="6">{formatNumberWithCommas(gbHoursTotal)}</Heading>
<p>GB Hours</p>
<div class="u-margin-block-start-16" />
<BarChart
series={[
{
name: 'Count of gbHours over time',
data: [
...mbSecondsCount.map((e) => [
e.date,
Math.ceil((e.value / 1000 / 3600) * 1000) / 1000
])
]
}
]} />
</Card>
{/if}
</Container>