Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/routes/console/project-[project]/overview/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<Onboard {projectId} />
{:else}
{#if $usage}
{@const storage = humanFileSize(last($usage.storage).value)}
{@const storage = humanFileSize(total($usage.storage))}
<section class="common-section">
<div class="grid-dashboard-1s-2m-6l">
<div class="card is-2-columns-medium-screen is-3-columns-large-screen">
Expand All @@ -89,14 +89,14 @@

<div class="grid-item-1-end-start">
<div class="heading-level-4">
{format(last($usage.documents).value)}
{format(total($usage.documents))}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the one for documents should be fine 👍🏻 they dont need any change

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think only executions are different

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these should be summed, as all these are now using time-series data, before we got sum from database and data already had the sum, now it's not

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that after usage refactor the is no more aggregation and we ONLY have time series data. So we should be summing everything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, not the best solution since we don't have real total, just total in time period. But its a patch until usage container can properly sum.

</div>
<div>Documents</div>
</div>

<div class="grid-item-1-end-end">
<div class="text">
Databases: {format(last($usage.databases).value)}
Databases: {format(total($usage.databases))}
</div>
</div>
</div>
Expand Down Expand Up @@ -124,7 +124,7 @@

<div class="grid-item-1-end-end">
<div class="text">
Buckets: {format(last($usage.buckets).value)}
Buckets: {format(total($usage.buckets))}
</div>
</div>
</div>
Expand All @@ -144,7 +144,7 @@

<div class="grid-item-1-end-start">
<div class="heading-level-4">
{format(last($usage.users).value)}
{format(total($usage.users))}
</div>
<div>Users</div>
</div>
Expand All @@ -165,7 +165,7 @@

<div class="grid-item-1-end-start">
<div class="heading-level-4">
{format(last($usage.executions).value)}
{format(total($usage.executions))}
</div>
<div>Executions</div>
</div>
Expand Down