Use MissingAnnotationEmptyState for plugins (#2824)
This commit is contained in:
@@ -20,7 +20,7 @@ import { Route, Routes } from 'react-router-dom';
|
||||
|
||||
import { rootCatalogKubernetesRouteRef } from './plugin';
|
||||
import { KubernetesContent } from './components/KubernetesContent';
|
||||
import { WarningPanel } from '@backstage/core';
|
||||
import { MissingAnnotationEmptyState } from '@backstage/core';
|
||||
|
||||
const KUBERNETES_ANNOTATION = 'backstage.io/kubernetes-id';
|
||||
|
||||
@@ -29,11 +29,7 @@ export const Router = ({ entity }: { entity: Entity }) => {
|
||||
entity.metadata.annotations?.[KUBERNETES_ANNOTATION];
|
||||
|
||||
if (!kubernetesAnnotationValue) {
|
||||
return (
|
||||
<WarningPanel title="Kubernetes plugin:">
|
||||
<pre>{KUBERNETES_ANNOTATION}</pre> annotation is missing on the entity.
|
||||
</WarningPanel>
|
||||
);
|
||||
return <MissingAnnotationEmptyState annotation={KUBERNETES_ANNOTATION} />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user