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:
Patrik Oldsberg
2023-10-20 15:13:00 +02:00
parent a7e3499c6a
commit 3df7b26de5
2 changed files with 9 additions and 2 deletions
+7 -2
View File
@@ -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" />