fix: remove all-time usage stats from functions, sites, and storage#3013
fix: remove all-time usage stats from functions, sites, and storage#3013HarshMN2345 merged 5 commits intomainfrom
Conversation
…d storage The *Total fields returned by the API represent all-time entity counts (databases, buckets, files, deployments) that do not change with the selected date range. Showing these alongside period selectors caused customer confusion when comparing against billing stats. - Remove Usage tab and page content for functions, sites, and storage sections where only all-time counts were displayed - Keep databases usage page with reads/writes (period-specific) - Keep individual function usage page with executions and GB hours (period-specific) - Fix typo in function header tab event name (sage -> usage)
Greptile SummaryThis PR removes all-time (non-period-specific) usage stat pages from functions, sites, and storage to avoid confusion when customers compare against billing stats. Nav tabs are removed from all relevant headers, page content is cleared, and data loaders are stripped down to return empty objects — correctly eliminating the previously wasteful API calls. The databases usage page is correctly preserved with its period-specific reads/writes charts, and the The one remaining nit is that Confidence Score: 5/5Safe to merge; all changes are removals of all-time stat UI with no functional regressions. All P1+ issues from prior review rounds have been addressed (loaders return src/routes/(console)/project-[region]-[project]/sites/site-[site]/usage/[[period]]/+page.svelte — dangling Important Files Changed
Reviews (3): Last reviewed commit: "Revert "fix: remove databases reads/writ..." | Re-trigger Greptile |
Stop unnecessary API calls on usage routes that no longer render anything. Replace each loader with an empty return and remove leftover export let data bindings from the page components.
| <script lang="ts"> | ||
| import { Container, UsageMultiple } from '$lib/layout'; | ||
|
|
||
| export let data; | ||
|
|
||
| $: reads = data.databaseReads; | ||
| $: readsTotal = data.databaseReadsTotal; | ||
|
|
||
| $: writes = data.databaseWrites; | ||
| $: writesTotal = data.databaseWritesTotal; | ||
| import { Container } from '$lib/layout'; | ||
| </script> | ||
|
|
||
| <Container databasesMainScreen> | ||
| <UsageMultiple | ||
| title="Reads and writes" | ||
| showHeader={false} | ||
| total={[readsTotal, writesTotal]} | ||
| count={[reads, writes]} | ||
| legendNumberFormat="abbreviate" | ||
| legendData={[ | ||
| { name: 'Reads', value: readsTotal }, | ||
| { name: 'Writes', value: writesTotal } | ||
| ]} /> | ||
| </Container> | ||
| <Container></Container> |
There was a problem hiding this comment.
Databases reads/writes removed despite PR description
The PR description explicitly states "Keep databases usage page with reads/writes (period-specific)", but both the individual database usage page (this file) and the top-level databases/usage/+page.svelte have been emptied, and their nav tabs removed from both databases/database-[database]/header.svelte and databases/header.svelte. Unlike the all-time entity counts removed from functions/sites/storage, database reads and writes are period-specific and directly meaningful for billing comparison — exactly the data the PR says should be preserved.
There was a problem hiding this comment.
@eldadfux should I remove them?
They are correct and are from time period 1st-30th of each month
This reverts commit 1f2aab9.
The *Total fields returned by the API represent all-time entity counts (databases, buckets, files, deployments) that do not change with the selected date range. Showing these alongside period selectors caused customer confusion when comparing against billing stats.
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)