Skip to content

Show usage graph for each storage type

Nicolas Dular requested to merge nicolasdular/storage-quota-usage-graph into master

workflowblocked because it's waiting for the next gitlab-ui release

What does this MR do?

Part of https://gitlab.com/gitlab-org/gitlab/-/issues/217104

Shows a graph with the distribution of the different storage types. This is the first iteration where we just show the distribution. In the next iteration we will also show storage that is left when there is a limit set on the namespace. (FYI: Colors from the screenshot in the issue don't reflect

How to test on review app

Log in with root account on review app and head over to

https://gitlab-review-nicolasdul-3nbpkv.gitlab-review.app/groups/gitlab-qa-sandbox-group/-/usage_quotas#storage-quota-tab

How to test locally

Since it would require you to have local storage with projects/wikis etc. and start workers to calculate it, it's easier to fake it for now.

  1. Open the console bin/rails c
  2. Copy/Paste the following script
  3. Log in with the root account to see it at http://localhost:3000/profile/usage_quotas#storage-quota-tab
n = Namespace.first
n.root_storage_statistics.destroy!
s = Namespace::RootStorageStatistics.new(
  namespace: n,
  build_artifacts_size: 400000,
  wiki_size: 300000,
  repository_size: 3900000,
  packages_size: 3800000,
  lfs_objects_size: 4800000
)
s.storage_size = s.repository_size + s.lfs_objects_size + s.wiki_size + s.build_artifacts_size + s.packages_size
s.save!

Screenshots

Large Medium Small
Screenshot_2020-05-14_at_21.50.26 Screenshot_2020-05-14_at_21.50.32 Screenshot_2020-05-14_at_21.50.36

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Yorick Peterse

Merge request reports

Loading