Unifies Dependency proxy and Container registry size formats

What does this MR do and why?

Moves Dependency proxy value to be formatting from BackEnd to FrontEnd, with a more consistent and technically more accurate labelling.

Previously we sent a formatted string from the BE, now we send a raw number and format it on the FE.

Screenshots or screen recordings

before after
localhost_3000_groups_gitlab-instance-3d22f6d0_-usage_quotas__22 localhost_3000_groups_gitlab-instance-3d22f6d0_-usage_quotas__21

How to set up and validate locally

Stub the BE method for D/P stats

code Apply this diff:
diff --git a/app/graphql/types/group_type.rb b/app/graphql/types/group_type.rb
index da2c06d04b72..65998cc6a638 100644
--- a/app/graphql/types/group_type.rb
+++ b/app/graphql/types/group_type.rb
@@ -289,7 +289,7 @@ def dependency_proxy_total_size
     end
 
     def dependency_proxy_total_size_in_bytes
-      group.dependency_proxy_manifests.sum(:size) + group.dependency_proxy_blobs.sum(:size)
+      return 42.megabytes
     end
 
     def dependency_proxy_setting

Then visit your namespace Storage Usage Quotas (like http://localhost:3000/groups/gitlab-instance-3d22f6d0/-/usage_quotas#storage-quota-tab)

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 #371494

Edited by Kos Palchyk

Merge request reports

Loading