Skip to content

Add Global Catalog search and sort

Frédéric Caplette requested to merge fc-catalog-search into master

What does this MR do and why?

We add a search bar and the sort options, for now only created_at in asc and desc, to the Global catalog page. this is behind the disabled FF global_ci_catalog

Screenshots or screen recordings

header header
Screenshot_2023-10-26_at_10.00.36_AM Screenshot_2023-10-26_at_3.34.26_PM

Searching:

Screen_Recording_2023-10-25_at_1.02.53_PM

Sorting

Screen_Recording_2023-10-25_at_1.30.40_PM

How to set up and validate locally

  1. Enable the FF global_ci_catalog
  2. Create a few projects that you will be able to convert to Ci resources. Create them under the admin namespace for ease of testing.
  3. Once you have done so, get the ID of the first new project you wanted to convert. Then in Rails console, run:
projects = Project.where("id > ?", your_first_project_id -1)
projects.each do |project|
  project.update!(description: 'description')  
  ::Ci::Catalog::Resource.new(project_id: project.id).save   
end  
  1. Navigate to Explore -> CI/CD Catalog
  2. Notice that you see Catalog resources
  3. Scroll to the bottom
  4. Click on page 2
  5. Notice that it loads
  6. Click on a single item
  7. Notice that it loads the details page
  8. Enter a search term that does not exists
  9. Notice the empty page
  10. Clear the search term
  11. Notice that it reloads
  12. Enter a search term with less than 3 chars
  13. Notice a different empty screen
  14. Enter a valid search term
  15. Notice that it shows the right resources
  16. Change the sort direction
  17. Notice that it changes the order of resources shown.

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 Frédéric Caplette

Merge request reports

Loading