Skip to content

Draft: Resolve "Follow up: FE: Storage project table - column sorting"

What does this MR do and why?

Allows sorting by all statistics columns in namespace Usage Quotas > Storage tab.

Resolves #389425

Screenshots or screen recordings

localhost_3000_groups_gitlab-instance-3d22f6d0_-usage_quotas__23

How to set up and validate locally

  1. Open a group with many projects, then go to Usage Quotas > Storage tab (e.g. http://localhost:3000/groups/gitlab-instance-3d22f6d0/-/usage_quotas#storage-quota-tab)
  2. Try sorting by different columns

If you projects have don't have values, here's a rails c script to populate it:

group = Group.find(<GROUP_ID>)
prng1 = Random.new()
group.projects.each do |p| 
 [:storage_size,
 :repository_size,
 :lfs_objects_size,
 :build_artifacts_size,
 :packages_size,
 :wiki_size,
 :snippets_size,
 :pipeline_artifacts_size,
 :uploads_size,
 :container_registry_size].each { |k| p.statistics[k] = prng1.rand(100).megabytes }
 p.statistics.save
 p.save
end
group.save

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Kos Palchyk

Merge request reports