Use statistics cards in storage usage quota
What does this MR do and why?
It re-introduce !79525 (merged) after being reverted, adjusting the behavior when storage limit isn't set and keeping the change behind a feature flag.
It uses the StatisticsCard
component added in !80261 (merged) in usage_quota storage app (group's usage quota > storage).
Screenshots
no purchase | with purchase | |
---|---|---|
within limit | ||
excess storage |
How to set up and validate locally
Enable feature flag
In rails console
run to use the new design:
Feature.enable(:update_storage_usage_design)
Add dummy storage data
- create a new group
- create a project inside the new group (choose a template or keep the
README.md
file to use storage) - from
rails console
run:
n = Group.find_by(name: "GROUP_NAME_HERE")
- to add purchased storage run:
n.additional_purchased_storage_size = 1
followed byn.save!
- to add storage limit run:
n.additional_purchased_storage_size = 1
followed byn.save!
- to add more storage to a project:
p = Project.find_by(name: "PROJECT_NAME_HERE")
p.statistics.update!(repository_size: 3145600)
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 #350646 (closed)