Updates changeset and adds EntityProcessingErrorsPanel to entitypage
Signed-off-by: Nicolas Torres <nicolast@backbase.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user