Updates changeset and adds EntityProcessingErrorsPanel to entitypage

Signed-off-by: Nicolas Torres <nicolast@backbase.com>
This commit is contained in:
Nicolas Torres
2021-07-27 11:24:28 +02:00
parent e45382c2df
commit 39ab9a4150
3 changed files with 30 additions and 10 deletions
+24 -5
View File
@@ -1,8 +1,27 @@
---
'example-app': minor
'@backstage/core-components': minor
'@backstage/plugin-catalog': minor
'@backstage/core-components': patch
'@backstage/plugin-catalog': patch
---
Displays errors in the entity page if the entity yaml is malformed
WarningPanel changes color depending on the severity
Added an EntityProcessingErrorsPanel component to show any errors that occurred when refreshing an entity from its source location. If upgrading, this should be added to EntityPage in your Backstage application:
```diff
// packages/app/src/components/catalog/EntityPage.tsx
const overviewContent = (
...
<EntityOrphanWarning />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
+ <EntitySwitch>
+ <EntitySwitch.Case if={hasCatalogProcessingErrors}>
+ <Grid item xs={12}>
+ <EntityProcessingErrorsPanel />
+ </Grid>
+ </EntitySwitch.Case>
+ </EntitySwitch>
```
Additionally, WarningPanel now changes color based on the provided severity.
@@ -40,8 +40,8 @@ import {
isKind,
EntityHasResourcesCard,
EntityOrphanWarning,
EntityProcessErrors,
hasErrors,
EntityProcessingErrorsPanel,
hasCatalogProcessingErrors,
isOrphan,
} from '@backstage/plugin-catalog';
import {
@@ -232,10 +232,11 @@ const overviewContent = (
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<EntitySwitch>
<EntitySwitch.Case if={hasErrors}>
<EntitySwitch.Case if={hasCatalogProcessingErrors}>
<Grid item xs={12}>
<EntityProcessErrors />
<EntityProcessingErrorsPanel />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
+1 -1
View File
@@ -366,7 +366,7 @@ export const FilteredEntityLayout: ({
// Warning: (ae-missing-release-tag) "hasErrors" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const hasErrors: (entity: Entity) => boolean;
export const hasCatalogProcessingErrors: (entity: Entity) => boolean;
// Warning: (ae-missing-release-tag) "isComponentType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//