Skip to content

Use StatisticsCard in usage_quota/storage

Ammar Alakkad requested to merge 350646-use-statistics-block into master

What does this MR do and why?

It uses the StatisticsCard component added in !80261 (merged) in usage_quota storage app (group's usage quota > storage).

MR status
!80261 (merged) Add statistics card component merged
!82497 (merged) Adjust statistics card component merged
!79525 (merged) Use StatisticsBlock in usage_quota/storage ​ 👈 you're here

Screenshots or screen recordings

# excess storage purchased storage screenshot
1 Screen_Shot_2022-04-04_at_11.09.38
2 Screen_Shot_2022-04-04_at_11.09.21
3 Screen_Shot_2022-04-04_at_11.09.52
4 Screen_Shot_2022-04-04_at_11.10.20

How to set up and validate locally

  1. create a new group
  2. create a project inside the new group (choose a template or keep the README.md file to use storage)
  3. from rails console run:
  • n = Group.find_by(name: "GROUP_NAME_HERE")
  • to add purchased storage run: n.additional_purchased_storage_size = 1 followed by n.save!
  • to add storage limit run: n.additional_purchased_storage_size = 1 followed by n.save!
  1. 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.

Related to #350646 (closed)

Edited by Ammar Alakkad

Merge request reports