diff --git a/.changeset/giant-geckos-tickle.md b/.changeset/giant-geckos-tickle.md new file mode 100644 index 0000000000..a31ebafa55 --- /dev/null +++ b/.changeset/giant-geckos-tickle.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-kubernetes': patch +--- + +Minor updates to display of errors diff --git a/plugins/kubernetes/src/components/ErrorReporting/ErrorReporting.tsx b/plugins/kubernetes/src/components/ErrorReporting/ErrorReporting.tsx index c986c0158d..8243d48263 100644 --- a/plugins/kubernetes/src/components/ErrorReporting/ErrorReporting.tsx +++ b/plugins/kubernetes/src/components/ErrorReporting/ErrorReporting.tsx @@ -113,17 +113,17 @@ export const ErrorEmptyState = () => { return ( - + Nice! There are no errors to report! - + EmptyState { // title expect( getByText( - 'There was an error retrieving some Kubernetes resources for the entity: THIS_ENTITY', + 'There was a problem retrieving some Kubernetes resources for the entity: THIS_ENTITY. This could mean that the Error Reporting card is not completely accurate.', ), ).toBeInTheDocument(); @@ -67,7 +67,7 @@ describe('ErrorPanel', () => { // title expect( getByText( - 'There was an error retrieving some Kubernetes resources for the entity: THIS_ENTITY', + 'There was a problem retrieving some Kubernetes resources for the entity: THIS_ENTITY. This could mean that the Error Reporting card is not completely accurate.', ), ).toBeInTheDocument(); diff --git a/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.tsx b/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.tsx index 85060fc11b..650e6ddff1 100644 --- a/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.tsx +++ b/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.tsx @@ -52,8 +52,8 @@ export const ErrorPanel = ({ clustersWithErrors, }: ErrorPanelProps) => ( {clustersWithErrors && (
Errors: {clustersWithErrorsToErrorMessage(clustersWithErrors)}
diff --git a/plugins/kubernetes/src/components/KubernetesContent/KubernetesContent.tsx b/plugins/kubernetes/src/components/KubernetesContent/KubernetesContent.tsx index 293e7a4833..39e73782f1 100644 --- a/plugins/kubernetes/src/components/KubernetesContent/KubernetesContent.tsx +++ b/plugins/kubernetes/src/components/KubernetesContent/KubernetesContent.tsx @@ -106,51 +106,55 @@ export const KubernetesContent = ({ entity }: KubernetesContentProps) => { return ( - - {kubernetesObjects === undefined && error === undefined && ( - - )} + {kubernetesObjects === undefined && error === undefined && } - {/* errors retrieved from the kubernetes clusters */} - {clustersWithErrors.length > 0 && ( - - )} + {/* errors retrieved from the kubernetes clusters */} + {clustersWithErrors.length > 0 && ( + + + + + + )} - {/* other errors */} - {error !== undefined && ( - - )} + {/* other errors */} + {error !== undefined && ( + + + + + + )} - {kubernetesObjects && ( - <> - - - - - - - - Your Clusters - - - {kubernetesObjects?.items.map((item, i) => ( - - - - ))} - - - )} - + {kubernetesObjects && ( + + + + + + + + + Your Clusters + + + {kubernetesObjects?.items.map((item, i) => ( + + + + ))} + + + )} );