Show cost factored size on project page
What does this MR do and why?
It shows the cost factored storage size in the project's page (i.e. when the project is forked from another project, it uses less storage size).
The spec disables RSpec/FactoryBot/AvoidCreate
in a few places, where we have to use full project to have access to the statistics
and to be able to fork projects (more details in the comments below).
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- In
bin/rails console
:Feature.enable(:namespace_storage_limit)
andFeature.enable(: display_cost_factored_storage_size_on_project_pages)
-
(as root) Update the cost factor to
0.1
in/admin/application_settings/namespace_storage
- Fork a public project as private project in a namespace
- Navigate to the newly forked project's page
- Notice the project's storage a bit below the project's title
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.
Related to #416098
Edited by Ammar Alakkad