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
- Related issue: #419928 (closed)
- Related MRs:
- This is a follow up from #419928 (comment 2436869202)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
projects_sorting_uq_after |
How to set up and validate locally
- Prerequisites
- Simulate SaaS GitLab.com
- Enable these setting in
rails console:Gitlab::CurrentSettings.update!(automatic_purchased_storage_allocation: true)Gitlab::CurrentSettings.update!(repository_size_limit: 10.gigabytes)
- Create a group to work on. Make note of its id, e.g.:
147/g = Group.find(147) - Create 2 projects under this group. Make note of their ids, e.g.:
24,25 - Add the storage for these 2 projects:
Project.find(24).statistics.update(repository_size: 5.gigabytes)Project.find(25).statistics.update(repository_size: 6.gigabytes)- 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
- Propagate this data to the group:
Sidekiq.redis(&:flushdb)Namespaces::ScheduleAggregationWorker.perform_sync(g.id)Namespaces::RootStatisticsWorker.perform_sync(g.id)
- 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
