catalog: target use-case configuration of entity page cards
Co-authored-by: Philipp Hugenroth <philipph@spotify.com> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -10,10 +10,15 @@ app:
|
||||
- apis.plugin.graphiql.browse.gitlab: true
|
||||
|
||||
# Entity page cards
|
||||
- 'entity.cards.about'
|
||||
- entity.cards.about
|
||||
- entity.cards.labels
|
||||
- entity.cards.links:
|
||||
config:
|
||||
filter:
|
||||
- isKind: component
|
||||
|
||||
# Entity page content
|
||||
- 'entity.content.techdocs'
|
||||
- entity.content.techdocs
|
||||
|
||||
# scmAuthExtension: >-
|
||||
# createScmAuthExtension({
|
||||
|
||||
@@ -27,6 +27,7 @@ export const EntityAboutCard = createEntityCardExtension({
|
||||
|
||||
export const EntityLinksCard = createEntityCardExtension({
|
||||
id: 'links',
|
||||
filter: ({ entity }) => Boolean(entity.metadata.links),
|
||||
loader: async () =>
|
||||
import('../components/EntityLinksCard').then(m => {
|
||||
return <m.EntityLinksCard variant="gridItem" />;
|
||||
@@ -35,6 +36,7 @@ export const EntityLinksCard = createEntityCardExtension({
|
||||
|
||||
export const EntityLabelsCard = createEntityCardExtension({
|
||||
id: 'labels',
|
||||
filter: ({ entity }) => Boolean(entity.metadata.labels),
|
||||
loader: async () =>
|
||||
import('../components/EntityLabelsCard').then(m => (
|
||||
<m.EntityLabelsCard variant="gridItem" />
|
||||
|
||||
Reference in New Issue
Block a user