Always enable sorting for storage usage quotas

What does this MR do and why?

Always enable sorting for storage usage quotas

Users will be able to sort projects in each column and order by storage type independent of what was the initial sorting

Changelog: changed

References

Screenshots or screen recordings

Before After
projects_sorting_uq_before projects_sorting_uq_after

How to set up and validate locally

  1. Prerequisites
    1. Simulate SaaS GitLab.com
    2. Enable these setting in rails console:
      1. Gitlab::CurrentSettings.update!(automatic_purchased_storage_allocation: true)
      2. Gitlab::CurrentSettings.update!(repository_size_limit: 10.gigabytes)
  2. Create a group to work on. Make note of its id, e.g.: 147 / g = Group.find(147)
  3. Create 2 projects under this group. Make note of their ids, e.g.: 24, 25
  4. Add the storage for these 2 projects:
    1. Project.find(24).statistics.update(repository_size: 5.gigabytes)
    2. Project.find(25).statistics.update(repository_size: 6.gigabytes)
    3. If you want to add for the other fields, they are: snippets_size, build_artifacts_size, lfs_objects_size, packages_size, wiki_size, container_registry_size
  5. Propagate this data to the group:
    1. Sidekiq.redis(&:flushdb)
    2. Namespaces::ScheduleAggregationWorker.perform_sync(g.id)
    3. Namespaces::RootStatisticsWorker.perform_sync(g.id)
  6. Use the sorting on each column 🎉

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sheldon Led

Merge request reports

Loading