Skip to content

fix(console): correct usage chart labels from functions/sites to deployments#2986

Open
singhvishalkr wants to merge 2 commits intoappwrite:mainfrom
singhvishalkr:fix/usage-label-deployments
Open

fix(console): correct usage chart labels from functions/sites to deployments#2986
singhvishalkr wants to merge 2 commits intoappwrite:mainfrom
singhvishalkr:fix/usage-label-deployments

Conversation

@singhvishalkr
Copy link
Copy Markdown

Summary

Fixes #2224

The usage chart on both the Functions and Sites aggregate usage pages displays incorrect labels. The data source is deploymentsTotal / deployments, but the chart metadata says "Total functions" / "Total sites" respectively.

Changes

  • Functions usage page: Changed legend from "Functions" to "Deployments" and title from "Total functions" to "Total deployments"
  • Sites usage page: Changed legend from "Sites" to "Deployments" and title from "Total sites" to "Total deployments"

Both pages load deployment metrics from the API (data.deploymentsTotal, data.deployments), so the labels should reflect that.

Files changed

  • src/routes/(console)/project-[region]-[project]/functions/usage/[[period]]/+page.svelte
  • src/routes/(console)/project-[region]-[project]/sites/usage/[[period]]/+page.svelte

Test plan

  • Navigate to Functions > Usage tab and verify chart says "Total deployments"
  • Navigate to Sites > Usage tab and verify chart says "Total deployments"
  • Verify the actual count matches the number of deployments, not the number of functions/sites

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 20, 2026

Greptile Summary

This PR fixes a label mismatch in the usage charts for the Functions and Sites pages: the chart metadata previously displayed "Total functions" / "Total sites" even though both pages source their data from deploymentsTotal and deployments. The fix updates legend and title to "Deployments" / "Total deployments" in both components.

Confidence Score: 5/5

Safe to merge — two-line label-only changes with no logic impact.

The changes are purely cosmetic string corrections that align chart labels with the actual data source already in use. No logic, data flow, or security concerns introduced.

No files require special attention.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/functions/usage/[[period]]/+page.svelte Chart labels corrected from "Functions"/"Total functions" to "Deployments"/"Total deployments" to match the actual deploymentsTotal/deployments data source.
src/routes/(console)/project-[region]-[project]/sites/usage/[[period]]/+page.svelte Chart labels corrected from "Sites"/"Total sites" to "Deployments"/"Total deployments" to match the actual deploymentsTotal/deployments data source.

Reviews (1): Last reviewed commit: "fix(sites): correct usage chart label fr..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Functions usage typo

1 participant