Add CTA to private catalog in pipeline editor
What does this MR do and why?
We are adding a CTA to browse the private catalog inside the pipeline editor header. This should only be visible to user who have access to the catalog ,meanign that we are using the policy can_view_namespace_catalog
. Using that helper from ee/app/helpers/ee/ci/catalog/resources_helper.rb
will already contain all the permissions check, including licenses and FF. Clicking on the button should take you to the ci catalog index page.
I also noticed while I was updating this component that action buttons in the header were overflowing on smaller screens. I fixed it for now by making them render in a column rather than a row.
Design: #393209[MVC_-_Editor.png]
Screenshots or screen recordings
Desktop
Before | After |
---|---|
Mobile
Before | After |
---|---|
Video
Screen_Recording_2023-05-19_at_1.41.14_PM
How to set up and validate locally
- Make sure you have an ultimate license for your GDK
- Enable the feature flag:
ci_namespace_catalog_experimental
- Login as a user
- Create a few projects that you will be able to convert to Ci resources (ideally 20+).
- 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 CI -> Pipeline editor
- Notice the new button to take you to the catalog
- Click on it
- Notice you are taken to the catalog index page
- Turn off the FF
- Go back to CI -> Pipeline editor
- Notice that you do not see the button anymore
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 #393209 (closed)