Backend: Add `path` column where to persist full path to component YAML file
Context
From #428142 (comment 1616710899)
Introduce
catalog_resource_components.path
to clearly indicate the component location. We could show this on landing page to have a link to source code of the component to be able to quickly view it. It will be hard to populate it once we start publishing data.
Problem
The directory structure of a component allows simple path to a component as well as a more complex component structure that uses a dedicated directory. If we want to redirect the user to the source file of the component in the repository we need the actual path.
The path can be either:
/templates/the-component.yml
/templates/the-component/template.yml
Proposal
Add column catalog_resource_components.path
.
In Backend: Scan a catalog resource for components (#415413 - closed) we collect the actual path of the YAML file during the metadata collection of components and persist it in the database. Then use this field to allow the user to inspect the source code from the UI.