Issue:
Currently, the "Tables size" and "Cache tables size" sections in the dashboard always show table sizes in MB in the UI, even if a table exceeds 1,000 MB, which makes large tables difficult to read at a glance.

Proposed improvement:
Display table sizes in GB (with two decimals) if the value is greater than 999 MB, and in MB otherwise. This would make the reporting more intuitive and improve the end-user experience for large databases.

Suggested solution:
Format the table size strings in the controller before passing to Twig.
Remove the hardcoded MB from the Twig file and let the data include the units ("MB" or "GB") as appropriate.

Benefits:
Makes table sizes for large tables much more readable.
Keeps template logic minimal and future-proof.

Suggested solution

Comments

falco010 created an issue. See original summary.

falco010’s picture

StatusFileSize
new5.44 KB

Hereby a patch to solve this issue.

Summary of Improvements:

  • All DB queries are moved to submethods.
  • All size formatting is handled by a dedicated method.
  • Twig receives already-formatted, human-friendly strings.
falco010’s picture

Status: Active » Needs review
kgaut’s picture

Status: Needs review » Reviewed & tested by the community

Awesome, thanks.

Will commit and tag a new release :)

  • kgaut committed 3147cbf2 on 1.0.x
    Issue #3552123 by falco010: Enhance database size display and...
kgaut’s picture

Status: Reviewed & tested by the community » Fixed

Commited and tagged 1.0.2, Thanks

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.