added support for a custom component when entity not found
Signed-off-by: shahar.shmaram <shahar.shmaram@appsflyer.com>
This commit is contained in:
@@ -260,6 +260,12 @@ export const EntityLayout = (props: EntityLayoutProps) => {
|
||||
{entity && <RoutedTabs routes={routes} />}
|
||||
|
||||
{error && (
|
||||
<Content>
|
||||
<Alert severity="error">{error.toString()}</Alert>
|
||||
</Content>
|
||||
)}
|
||||
|
||||
{!loading && !error && !entity && (
|
||||
<Content>
|
||||
{NotFoundComponent ? (
|
||||
NotFoundComponent
|
||||
@@ -275,18 +281,6 @@ export const EntityLayout = (props: EntityLayoutProps) => {
|
||||
</Content>
|
||||
)}
|
||||
|
||||
{!loading && !error && !entity && (
|
||||
<Content>
|
||||
<WarningPanel title="Entity not found">
|
||||
There is no {kind} with the requested{' '}
|
||||
<Link to="https://backstage.io/docs/features/software-catalog/references">
|
||||
kind, namespace, and name
|
||||
</Link>
|
||||
.
|
||||
</WarningPanel>
|
||||
</Content>
|
||||
)}
|
||||
|
||||
<UnregisterEntityDialog
|
||||
open={confirmationDialogOpen}
|
||||
entity={entity!}
|
||||
|
||||
Reference in New Issue
Block a user