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 |
---|---|
![]() |
![]() |
How to set up and validate locally
- Make sure you have an premium license for your GDK
- Login as an admin user
- Create a few projects that you will be able to convert to Ci resources. Create them under the admin namespace for ease of testing.
- 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
- Navigate to
/$namespace/$project/-/ci/catalog/resources/
. Any project under the same namespace will do (in this case, anything under the admin namespace) - Click on a resource
- Notice the components tab is not present
- Open your rails console and execute:
Feature.enable(:ci_catalog_components_tab)
- Refresh the page
- Notice the new components tab load as default!
- The data you see is mock data. This is why this is behind a disabled FF
- Click on the Readme tab
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #424967 (closed)
Edited by Frédéric Caplette