From 1f8c2fa8b50713de43e1e0bffd22997915f92e91 Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Mon, 12 Feb 2024 12:20:43 +0100 Subject: [PATCH] feat(catalog): add overview warning components Signed-off-by: Camila Belo --- .changeset/orange-suns-yell.md | 5 +++ packages/app-next/app-config.yaml | 7 ++-- .../catalog/src/alpha/EntityOverviewPage.tsx | 42 +++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 .changeset/orange-suns-yell.md diff --git a/.changeset/orange-suns-yell.md b/.changeset/orange-suns-yell.md new file mode 100644 index 0000000000..f7314411eb --- /dev/null +++ b/.changeset/orange-suns-yell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': minor +--- + +Add entity warning components to the default entity overview page. diff --git a/packages/app-next/app-config.yaml b/packages/app-next/app-config.yaml index 28d05c902b..408b08acee 100644 --- a/packages/app-next/app-config.yaml +++ b/packages/app-next/app-config.yaml @@ -29,13 +29,14 @@ app: - entity-card:api-docs/providing-components - entity-card:api-docs/consuming-components + # - entity-card:azure-devops/readme # Entity page content - entity-content:api-docs/definition - entity-content:api-docs/apis - entity-content:techdocs - - entity-content:azure-devops/pipelines - - entity-content:azure-devops/pull-requests - - entity-content:azure-devops/git-tags + # - entity-content:azure-devops/pipelines + # - entity-content:azure-devops/pull-requests + # - entity-content:azure-devops/git-tags # Org Plugin - entity-card:org/group-profile diff --git a/plugins/catalog/src/alpha/EntityOverviewPage.tsx b/plugins/catalog/src/alpha/EntityOverviewPage.tsx index 85c318cf3f..dbc95f8d10 100644 --- a/plugins/catalog/src/alpha/EntityOverviewPage.tsx +++ b/plugins/catalog/src/alpha/EntityOverviewPage.tsx @@ -19,6 +19,19 @@ import { useEntity } from '@backstage/plugin-catalog-react'; import Grid from '@material-ui/core/Grid'; import React from 'react'; import { FilterWrapper } from './filter/FilterWrapper'; +import { EntitySwitch } from '../components/EntitySwitch'; +import { + EntityOrphanWarning, + isOrphan, +} from '../components/EntityOrphanWarning'; +import { + EntityRelationWarning, + hasRelationWarnings, +} from '../components/EntityRelationWarning'; +import { + EntityProcessingErrorsPanel, + hasCatalogProcessingErrors, +} from '../components/EntityProcessingErrorsPanel'; interface EntityOverviewPageProps { cards: Array<{ @@ -28,10 +41,39 @@ interface EntityOverviewPageProps { }>; } +const entityWarningContent = ( + <> + + + + + + + + + + + + + + + + + + + + + + + + +); + export function EntityOverviewPage(props: EntityOverviewPageProps) { const { entity } = useEntity(); return ( + {entityWarningContent} {props.cards.map((card, index) => ( ))}