diff --git a/.changeset/wild-emus-write.md b/.changeset/wild-emus-write.md new file mode 100644 index 0000000000..5c86a1d07d --- /dev/null +++ b/.changeset/wild-emus-write.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +Migrated `EntityRelationWarning` and `EntityProcessingErrorsPanel` components from Material UI to Backstage UI. diff --git a/plugins/catalog/src/components/EntityProcessingErrorsPanel/EntityProcessingErrorsPanel.tsx b/plugins/catalog/src/components/EntityProcessingErrorsPanel/EntityProcessingErrorsPanel.tsx index a98efefffc..a5ba1b31ae 100644 --- a/plugins/catalog/src/components/EntityProcessingErrorsPanel/EntityProcessingErrorsPanel.tsx +++ b/plugins/catalog/src/components/EntityProcessingErrorsPanel/EntityProcessingErrorsPanel.tsx @@ -21,7 +21,6 @@ import { EntityRefLink, useEntity, } from '@backstage/plugin-catalog-react'; -import Box from '@material-ui/core/Box'; import { ResponseErrorPanel } from '@backstage/core-components'; import { CatalogApi, @@ -32,6 +31,7 @@ import useAsync from 'react-use/esm/useAsync'; import { SerializedError } from '@backstage/errors'; import { catalogTranslationRef } from '../../alpha/translation'; import { useTranslationRef } from '@backstage/core-plugin-api/alpha'; +import { Box } from '@backstage/ui'; const errorFilter = (i: EntityStatusItem) => i.error && @@ -100,7 +100,7 @@ export function EntityProcessingErrorsPanel() { if (error) { return ( - + ); @@ -113,10 +113,10 @@ export function EntityProcessingErrorsPanel() { return ( <> {value.items.map((ancestorError, index) => ( - + {stringifyEntityRef(entity) !== stringifyEntityRef(ancestorError.entity) && ( - + {t('entityProcessingErrorsDescription')}{' '} diff --git a/plugins/catalog/src/components/EntityRelationWarning/EntityRelationWarning.tsx b/plugins/catalog/src/components/EntityRelationWarning/EntityRelationWarning.tsx index b69993e190..ce50392173 100644 --- a/plugins/catalog/src/components/EntityRelationWarning/EntityRelationWarning.tsx +++ b/plugins/catalog/src/components/EntityRelationWarning/EntityRelationWarning.tsx @@ -20,13 +20,12 @@ import { catalogApiRef, useEntity, } from '@backstage/plugin-catalog-react'; -import Alert from '@material-ui/lab/Alert'; import useAsync from 'react-use/esm/useAsync'; -import Box from '@material-ui/core/Box'; import { ResponseErrorPanel } from '@backstage/core-components'; import { useApi, ApiHolder } from '@backstage/core-plugin-api'; import { catalogTranslationRef } from '../../alpha/translation'; import { useTranslationRef } from '@backstage/core-plugin-api/alpha'; +import { Alert, Box } from '@backstage/ui'; async function getRelationWarnings(entity: Entity, catalogApi: CatalogApi) { const entityRefRelations = entity.relations?.map( @@ -85,7 +84,7 @@ export function EntityRelationWarning() { if (error) { return ( - + ); @@ -96,10 +95,15 @@ export function EntityRelationWarning() { } return ( - <> - - {t('entityRelationWarningDescription')} {value.join(', ')} - - + + {t('entityRelationWarningDescription')} {value.join(', ')} + + } + /> ); }