Adds links to storage entity pages on usage quota
What does this MR do and why?
On project Usage Quotas page this MR adds links to related storage entries.
There's a known issue that some of the resources might be deactivated on an instance, to cover those cases we check if related storage is not zero. If it is zero — we don't display the link. More in https://gitlab.com/groups/gitlab-org/-/epics/10286#note_1395004767
Related to #406265
Screenshots or screen recordings
header | header |
---|---|
How to set up and validate locally
Visit a project storage Usage Quotas, e.g. http://127.0.0.1:3000/gitlab-instance-3d22f6d0/Monitoring/-/usage_quotas#storage-quota-tab
Validate that the links are present and lead to relevant pages.
If want to mock some resources values — try running this in rails c
:
project = Project.find(<id>)
project.statistics.repository_size = 1.megabyte
project.statistics.lfs_objects_size = 1.megabyte
project.statistics.build_artifacts_size = 1.megabyte
project.statistics.shared_runners_seconds = 1.megabyte
project.statistics.packages_size = 1.megabyte
project.statistics.wiki_size = 1.megabyte
project.statistics.snippets_size = 1.megabyte
project.statistics.pipeline_artifacts_size = 1.megabyte
project.statistics.uploads_size = 1.megabyte
project.statistics.container_registry_size = 1.megabyte
project.statistics.save
project.save
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.