mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Add gbHours metrics to functions
This commit is contained in:
+22
@@ -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,24 @@
|
||||
]} />
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user