Skip to content

Add the new Catalog details components tab

What does this MR do and why?

Adds the new Components tab to the CI/Cd catalog details page. This fetches the component details so that we can document usage automatically. For this MR, we use mock data since the API is not ready yet.

This is behind a disabled feature flag ci_catalog_components_tab.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2023-09-29_at_9.57.25_AM Screenshot_2023-09-29_at_9.55.33_AM

How to set up and validate locally

  1. Make sure you have an premium license for your GDK
  2. Login as an admin user
  3. Create a few projects that you will be able to convert to Ci resources. Create them under the admin namespace for ease of testing.
  4. 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)
projects.each do |project|
  project.update!(description: 'description')  
  ::Ci::Catalog::Resource.new(project_id: project.id).save   
end  
  1. Navigate to /$namespace/$project/-/ci/catalog/resources/. Any project under the same namespace will do (in this case, anything under the admin namespace)
  2. Click on a resource
  3. Notice the components tab is not present
  4. Open your rails console and execute: Feature.enable(:ci_catalog_components_tab)
  5. Refresh the page
  6. Notice the new components tab load as default!
  7. The data you see is mock data. This is why this is behind a disabled FF
  8. Click on the Readme tab
  9. Notice all still load correctly.

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 #424967 (closed)

Edited by Frédéric Caplette

Merge request reports