From 1c8b7a4b177280c4009d74ecbaa1241b2bacdf22 Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 26 Oct 2023 18:37:05 +0200 Subject: [PATCH] chore: change usage of the component Signed-off-by: blam --- .../EmptyState/MissingAnnotationEmptyState.tsx | 8 +++++++- .../components/EntityAdrContent/EntityAdrContent.tsx | 6 ++++-- .../EntityAirbrakeWidget/EntityAirbrakeWidget.tsx | 2 +- .../AllureReportComponent/AllureReportComponent.tsx | 10 +++++----- .../AzureSitesOverview.tsx | 7 +++---- .../BitriseBuildsComponent.tsx | 12 +++++------- plugins/circleci/src/components/Router.tsx | 6 ++++-- plugins/cloudbuild/src/components/Router.tsx | 6 ++++-- .../CodeClimateCardContents.tsx | 8 +++----- plugins/code-coverage/src/components/Router.tsx | 6 ++++-- .../src/components/DynatraceTab/DynatraceTab.tsx | 7 +++---- plugins/fossa/src/components/FossaCard/FossaCard.tsx | 6 ++++-- plugins/github-actions/src/components/Router.tsx | 6 ++++-- .../src/components/GithubDeploymentsCard.tsx | 11 +++++------ .../GoCdBuildsComponent/GoCdBuildsComponent.tsx | 6 ++++-- plugins/jenkins/src/components/Router.tsx | 6 +++--- plugins/kafka/src/Router.tsx | 6 ++++-- plugins/kubernetes-cluster/src/Router.tsx | 6 ++++-- plugins/kubernetes/src/Router.tsx | 6 ++++-- plugins/lighthouse/src/Router.tsx | 6 ++++-- plugins/newrelic-dashboard/src/Router.tsx | 6 ++++-- plugins/nomad/src/Router.tsx | 6 ++++-- .../EntityNomadAllocationListTable.tsx | 6 ++++-- .../EntityNomadJobVersionListCard.tsx | 6 ++++-- plugins/puppetdb/src/components/Router.tsx | 6 ++++-- plugins/rollbar/src/components/Router.tsx | 6 ++++-- .../SentryIssuesWidget/SentryIssuesWidget.tsx | 2 +- .../src/components/SonarQubeCard/SonarQubeCard.tsx | 6 ++++-- .../SonarQubeContentPage/SonarQubeContentPage.tsx | 6 ++++-- .../src/components/EntitySplunkOnCallCard.tsx | 6 ++++-- plugins/techdocs/src/Router.tsx | 6 ++++-- .../components/EntityVaultCard/EntityVaultCard.tsx | 6 ++++-- 32 files changed, 124 insertions(+), 81 deletions(-) diff --git a/packages/core-components/src/components/EmptyState/MissingAnnotationEmptyState.tsx b/packages/core-components/src/components/EmptyState/MissingAnnotationEmptyState.tsx index b8798043db..efbfdb9999 100644 --- a/packages/core-components/src/components/EmptyState/MissingAnnotationEmptyState.tsx +++ b/packages/core-components/src/components/EmptyState/MissingAnnotationEmptyState.tsx @@ -47,7 +47,13 @@ type Props = { annotation: string | string[]; readMoreUrl?: string; }; + +/** + * @public + * @deprecated This component is deprecated, please use {@link @backstage/plugin-catalog-react#MissingAnnotationEmptyStateClassKey} instead + */ export type MissingAnnotationEmptyStateClassKey = 'code'; + const useStyles = makeStyles( theme => ({ code: { @@ -92,7 +98,7 @@ function generateDescription(annotations: string[]) { /** * @public - * @deprecated This component is deprecated, please use {@link @backstage/plugin-catalog-react#MissingAnnotationEmptyuseState} instead + * @deprecated This component is deprecated, please use {@link @backstage/plugin-catalog-react#MissingAnnotationEmptyState} instead */ export function MissingAnnotationEmptyState(props: Props) { const { annotation, readMoreUrl } = props; diff --git a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx index b1abd4f02c..261dd994fb 100644 --- a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx +++ b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx @@ -24,7 +24,6 @@ import { Content, ContentHeader, InfoCard, - MissingAnnotationEmptyState, Progress, SupportButton, WarningPanel, @@ -38,7 +37,10 @@ import { isAdrAvailable, madrFilePathFilter, } from '@backstage/plugin-adr-common'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { Box, Chip, diff --git a/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx b/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx index 6780b80dbc..3e82d60d81 100644 --- a/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx +++ b/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx @@ -19,7 +19,6 @@ import { EmptyState, ErrorPanel, InfoCard, - MissingAnnotationEmptyState, Progress, } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; @@ -29,6 +28,7 @@ import { makeStyles } from '@material-ui/core/styles'; import React from 'react'; import useAsync from 'react-use/lib/useAsync'; import { airbrakeApiRef } from '../../api'; +import { MissingAnnotationEmptyState } from '@backstage/plugin-catalog-react'; import { AIRBRAKE_PROJECT_ID_ANNOTATION, useProjectId } from '../useProjectId'; const useStyles = makeStyles(() => ({ diff --git a/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx b/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx index e7564dd097..21846af529 100644 --- a/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx +++ b/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx @@ -16,16 +16,16 @@ import React from 'react'; import { useApi } from '@backstage/core-plugin-api'; import { allureApiRef } from '../../api'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { ALLURE_PROJECT_ID_ANNOTATION, isAllureReportAvailable, getAllureProjectId, } from '../annotationHelpers'; -import { - MissingAnnotationEmptyState, - Progress, -} from '@backstage/core-components'; +import { Progress } from '@backstage/core-components'; import useAsync from 'react-use/lib/useAsync'; import { Entity } from '@backstage/catalog-model'; diff --git a/plugins/azure-sites/src/components/AzureSitesOverviewComponent/AzureSitesOverview.tsx b/plugins/azure-sites/src/components/AzureSitesOverviewComponent/AzureSitesOverview.tsx index 755a42f5da..dbed6cdbd6 100644 --- a/plugins/azure-sites/src/components/AzureSitesOverviewComponent/AzureSitesOverview.tsx +++ b/plugins/azure-sites/src/components/AzureSitesOverviewComponent/AzureSitesOverview.tsx @@ -21,12 +21,11 @@ import { AZURE_WEB_SITE_NAME_ANNOTATION, useServiceEntityAnnotations, } from '../../hooks/useServiceEntityAnnotations'; +import { ErrorBoundary, ResponseErrorPanel } from '@backstage/core-components'; import { - ErrorBoundary, + useEntity, MissingAnnotationEmptyState, - ResponseErrorPanel, -} from '@backstage/core-components'; -import { useEntity } from '@backstage/plugin-catalog-react'; +} from '@backstage/plugin-catalog-react'; import { AzureSitesOverviewTable } from '../AzureSitesOverviewTableComponent/AzureSitesOverviewTable'; /** @public */ diff --git a/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx b/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx index 3c93fb20d7..f8a7f7ece4 100644 --- a/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx +++ b/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx @@ -15,18 +15,16 @@ */ import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import React, { useState } from 'react'; import { useBitriseBuildWorkflows } from '../../hooks/useBitriseBuildWorkflows'; import { AsyncState } from 'react-use/lib/useAsync'; import { BitriseBuildsTable } from '../BitriseBuildsTableComponent'; import { Item, Select } from '../Select'; -import { - Content, - ContentHeader, - MissingAnnotationEmptyState, - Page, -} from '@backstage/core-components'; +import { Content, ContentHeader, Page } from '@backstage/core-components'; export type Props = { entity: Entity; diff --git a/plugins/circleci/src/components/Router.tsx b/plugins/circleci/src/components/Router.tsx index 33e7d43dee..78261108ae 100644 --- a/plugins/circleci/src/components/Router.tsx +++ b/plugins/circleci/src/components/Router.tsx @@ -21,8 +21,10 @@ import { BuildWithStepsPage } from './BuildWithStepsPage/'; import { BuildsPage } from './BuildsPage'; import { CIRCLECI_ANNOTATION } from '../constants'; import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; /** @public */ export const isCircleCIAvailable = (entity: Entity) => diff --git a/plugins/cloudbuild/src/components/Router.tsx b/plugins/cloudbuild/src/components/Router.tsx index 2041416cfc..8c7687ee90 100644 --- a/plugins/cloudbuild/src/components/Router.tsx +++ b/plugins/cloudbuild/src/components/Router.tsx @@ -15,13 +15,15 @@ */ import React from 'react'; import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { Routes, Route } from 'react-router-dom'; import { buildRouteRef } from '../routes'; import { WorkflowRunDetails } from './WorkflowRunDetails'; import { WorkflowRunsTable } from './WorkflowRunsTable'; import { CLOUDBUILD_ANNOTATION } from './useProjectName'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; /** @public */ export const isCloudbuildAvailable = (entity: Entity) => diff --git a/plugins/code-climate/src/components/CodeClimateCardContents/CodeClimateCardContents.tsx b/plugins/code-climate/src/components/CodeClimateCardContents/CodeClimateCardContents.tsx index c9dc1894fc..4bf45c4b1d 100644 --- a/plugins/code-climate/src/components/CodeClimateCardContents/CodeClimateCardContents.tsx +++ b/plugins/code-climate/src/components/CodeClimateCardContents/CodeClimateCardContents.tsx @@ -19,13 +19,11 @@ import useAsync from 'react-use/lib/useAsync'; import { codeClimateApiRef } from '../../api'; import { CodeClimateTable } from '../CodeClimateTable'; import { CODECLIMATE_REPO_ID_ANNOTATION } from '../../plugin'; -import { useEntity } from '@backstage/plugin-catalog-react'; import { - EmptyState, - ErrorPanel, + useEntity, MissingAnnotationEmptyState, - Progress, -} from '@backstage/core-components'; +} from '@backstage/plugin-catalog-react'; +import { EmptyState, ErrorPanel, Progress } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; export const CodeClimateCardContents = () => { diff --git a/plugins/code-coverage/src/components/Router.tsx b/plugins/code-coverage/src/components/Router.tsx index 190b441c7a..921aaeb325 100644 --- a/plugins/code-coverage/src/components/Router.tsx +++ b/plugins/code-coverage/src/components/Router.tsx @@ -16,9 +16,11 @@ import React from 'react'; import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { CodeCoveragePage } from './CodeCoveragePage'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; /** * Returns true if the given entity has code coverage enabled. diff --git a/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx b/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx index 3f58eed9dc..16d9d47545 100644 --- a/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx +++ b/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx @@ -15,12 +15,11 @@ */ import React from 'react'; import { Grid } from '@material-ui/core'; +import { Page, Content } from '@backstage/core-components'; import { - Page, - Content, + useEntity, MissingAnnotationEmptyState, -} from '@backstage/core-components'; -import { useEntity } from '@backstage/plugin-catalog-react'; +} from '@backstage/plugin-catalog-react'; import { ProblemsList } from '../Problems/ProblemsList'; import { SyntheticsCard } from '../Synthetics/SyntheticsCard'; import { isDynatraceAvailable } from '../../plugin'; diff --git a/plugins/fossa/src/components/FossaCard/FossaCard.tsx b/plugins/fossa/src/components/FossaCard/FossaCard.tsx index c31f5b9d0c..fb6c2abdb0 100644 --- a/plugins/fossa/src/components/FossaCard/FossaCard.tsx +++ b/plugins/fossa/src/components/FossaCard/FossaCard.tsx @@ -14,7 +14,10 @@ * limitations under the License. */ -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { Grid, Tooltip } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; @@ -31,7 +34,6 @@ import { EmptyState, InfoCard, InfoCardVariants, - MissingAnnotationEmptyState, Progress, ResponseErrorPanel, } from '@backstage/core-components'; diff --git a/plugins/github-actions/src/components/Router.tsx b/plugins/github-actions/src/components/Router.tsx index 14c36a93fd..e9a40f13f4 100644 --- a/plugins/github-actions/src/components/Router.tsx +++ b/plugins/github-actions/src/components/Router.tsx @@ -16,13 +16,15 @@ import React from 'react'; import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { Routes, Route } from 'react-router-dom'; import { buildRouteRef } from '../routes'; import { WorkflowRunDetails } from './WorkflowRunDetails'; import { WorkflowRunsTable } from './WorkflowRunsTable'; import { GITHUB_ACTIONS_ANNOTATION } from './getProjectNameFromEntity'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; /** @public */ export const isGithubActionsAvailable = (entity: Entity) => diff --git a/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx b/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx index e828116f41..9367e84d56 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx +++ b/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx @@ -17,7 +17,10 @@ import React from 'react'; import useAsyncRetry from 'react-use/lib/useAsyncRetry'; import { GithubDeployment, githubDeploymentsApiRef } from '../api'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { GITHUB_PROJECT_SLUG_ANNOTATION, isGithubDeploymentsAvailable, @@ -28,11 +31,7 @@ import { ANNOTATION_SOURCE_LOCATION, } from '@backstage/catalog-model'; -import { - MissingAnnotationEmptyState, - ResponseErrorPanel, - TableColumn, -} from '@backstage/core-components'; +import { ResponseErrorPanel, TableColumn } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; const GithubDeploymentsComponent = ({ diff --git a/plugins/gocd/src/components/GoCdBuildsComponent/GoCdBuildsComponent.tsx b/plugins/gocd/src/components/GoCdBuildsComponent/GoCdBuildsComponent.tsx index abaaad8506..7fac9bafe2 100644 --- a/plugins/gocd/src/components/GoCdBuildsComponent/GoCdBuildsComponent.tsx +++ b/plugins/gocd/src/components/GoCdBuildsComponent/GoCdBuildsComponent.tsx @@ -15,11 +15,13 @@ */ import React, { useState } from 'react'; import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { Content, ContentHeader, - MissingAnnotationEmptyState, EmptyState, Page, } from '@backstage/core-components'; diff --git a/plugins/jenkins/src/components/Router.tsx b/plugins/jenkins/src/components/Router.tsx index 30ce999f31..95049932e6 100644 --- a/plugins/jenkins/src/components/Router.tsx +++ b/plugins/jenkins/src/components/Router.tsx @@ -15,11 +15,11 @@ */ import { Entity } from '@backstage/catalog-model'; +import { TableColumn } from '@backstage/core-components'; import { + useEntity, MissingAnnotationEmptyState, - TableColumn, -} from '@backstage/core-components'; -import { useEntity } from '@backstage/plugin-catalog-react'; +} from '@backstage/plugin-catalog-react'; import React from 'react'; import { Route, Routes } from 'react-router-dom'; import { JENKINS_ANNOTATION, LEGACY_JENKINS_ANNOTATION } from '../constants'; diff --git a/plugins/kafka/src/Router.tsx b/plugins/kafka/src/Router.tsx index d367c55991..abe2f4fb76 100644 --- a/plugins/kafka/src/Router.tsx +++ b/plugins/kafka/src/Router.tsx @@ -17,10 +17,12 @@ import { Entity } from '@backstage/catalog-model'; import React from 'react'; import { Route, Routes } from 'react-router-dom'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { KAFKA_CONSUMER_GROUP_ANNOTATION } from './constants'; import { KafkaTopicsForConsumer } from './components/ConsumerGroupOffsets/ConsumerGroupOffsets'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; /** @public */ export const isPluginApplicableToEntity = (entity: Entity) => diff --git a/plugins/kubernetes-cluster/src/Router.tsx b/plugins/kubernetes-cluster/src/Router.tsx index 86563439ce..7ae1711f94 100644 --- a/plugins/kubernetes-cluster/src/Router.tsx +++ b/plugins/kubernetes-cluster/src/Router.tsx @@ -16,9 +16,11 @@ import React from 'react'; import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { Route, Routes } from 'react-router-dom'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; import { ANNOTATION_KUBERNETES_API_SERVER } from '@backstage/plugin-kubernetes-common'; import { KubernetesClusterContent } from './components/KubernetesClusterContent'; diff --git a/plugins/kubernetes/src/Router.tsx b/plugins/kubernetes/src/Router.tsx index bd8fc09edc..8266b1908e 100644 --- a/plugins/kubernetes/src/Router.tsx +++ b/plugins/kubernetes/src/Router.tsx @@ -16,11 +16,13 @@ import React from 'react'; import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { Route, Routes } from 'react-router-dom'; import { KubernetesContent } from './KubernetesContent'; import { Button } from '@material-ui/core'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; const KUBERNETES_ANNOTATION = 'backstage.io/kubernetes-id'; const KUBERNETES_LABEL_SELECTOR_QUERY_ANNOTATION = diff --git a/plugins/lighthouse/src/Router.tsx b/plugins/lighthouse/src/Router.tsx index 04c00cde41..e550becb04 100644 --- a/plugins/lighthouse/src/Router.tsx +++ b/plugins/lighthouse/src/Router.tsx @@ -16,14 +16,16 @@ import React from 'react'; import { Route, Routes } from 'react-router-dom'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import AuditList from './components/AuditList'; import AuditView, { AuditViewContent } from './components/AuditView'; import CreateAudit, { CreateAuditContent } from './components/CreateAudit'; import { Entity } from '@backstage/catalog-model'; import { LIGHTHOUSE_WEBSITE_URL_ANNOTATION } from '../constants'; import { AuditListForEntity } from './components/AuditList/AuditListForEntity'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; /** @public */ export const isLighthouseAvailable = (entity: Entity) => diff --git a/plugins/newrelic-dashboard/src/Router.tsx b/plugins/newrelic-dashboard/src/Router.tsx index b549d1107b..82f20a4a29 100644 --- a/plugins/newrelic-dashboard/src/Router.tsx +++ b/plugins/newrelic-dashboard/src/Router.tsx @@ -15,10 +15,12 @@ */ import { Entity } from '@backstage/catalog-model'; import React from 'react'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; import { Button } from '@material-ui/core'; import { NewRelicDashboard } from './components/NewRelicDashboard'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { NEWRELIC_GUID_ANNOTATION } from './constants'; /** @public */ diff --git a/plugins/nomad/src/Router.tsx b/plugins/nomad/src/Router.tsx index 4a3377779a..aa872bae70 100644 --- a/plugins/nomad/src/Router.tsx +++ b/plugins/nomad/src/Router.tsx @@ -15,8 +15,10 @@ */ import React from 'react'; -import { useEntity } from '@backstage/plugin-catalog-react'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { Route, Routes } from 'react-router-dom'; import { EntityNomadAllocationListTable } from './components/EntityNomadAllocationListTable/EntityNomadAllocationListTable'; import { diff --git a/plugins/nomad/src/components/EntityNomadAllocationListTable/EntityNomadAllocationListTable.tsx b/plugins/nomad/src/components/EntityNomadAllocationListTable/EntityNomadAllocationListTable.tsx index cc19d1ec53..ea4f2836fe 100644 --- a/plugins/nomad/src/components/EntityNomadAllocationListTable/EntityNomadAllocationListTable.tsx +++ b/plugins/nomad/src/components/EntityNomadAllocationListTable/EntityNomadAllocationListTable.tsx @@ -17,7 +17,6 @@ import { DateTime } from 'luxon'; import { Link, - MissingAnnotationEmptyState, ResponseErrorPanel, StatusError, StatusOK, @@ -26,7 +25,10 @@ import { Table, TableColumn, } from '@backstage/core-components'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import React, { useState } from 'react'; import { Allocation, nomadApiRef } from '../../api'; import { configApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/nomad/src/components/EntityNomadJobVersionListCard/EntityNomadJobVersionListCard.tsx b/plugins/nomad/src/components/EntityNomadJobVersionListCard/EntityNomadJobVersionListCard.tsx index bb4e4b0fad..d7d200bce4 100644 --- a/plugins/nomad/src/components/EntityNomadJobVersionListCard/EntityNomadJobVersionListCard.tsx +++ b/plugins/nomad/src/components/EntityNomadJobVersionListCard/EntityNomadJobVersionListCard.tsx @@ -17,12 +17,14 @@ import { DateTime } from 'luxon'; import { InfoCard, - MissingAnnotationEmptyState, ResponseErrorPanel, Table, TableColumn, } from '@backstage/core-components'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import React, { useEffect, useState } from 'react'; import { Version, nomadApiRef } from '../../api'; import { configApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/puppetdb/src/components/Router.tsx b/plugins/puppetdb/src/components/Router.tsx index 3a8a05911b..5e6a79bc43 100644 --- a/plugins/puppetdb/src/components/Router.tsx +++ b/plugins/puppetdb/src/components/Router.tsx @@ -19,8 +19,10 @@ import { Routes, Route } from 'react-router-dom'; import { puppetDbReportRouteRef } from '../routes'; import { ANNOTATION_PUPPET_CERTNAME } from '../constants'; import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { ReportsPage } from './ReportsPage'; import { ReportDetailsPage } from './ReportDetailsPage'; diff --git a/plugins/rollbar/src/components/Router.tsx b/plugins/rollbar/src/components/Router.tsx index aa86904248..0eec406c78 100644 --- a/plugins/rollbar/src/components/Router.tsx +++ b/plugins/rollbar/src/components/Router.tsx @@ -15,12 +15,14 @@ */ import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import React from 'react'; import { Route, Routes } from 'react-router-dom'; import { ROLLBAR_ANNOTATION } from '../constants'; import { EntityPageRollbar } from './EntityPageRollbar/EntityPageRollbar'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; /** @public */ export const isPluginApplicableToEntity = (entity: Entity) => diff --git a/plugins/sentry/src/components/SentryIssuesWidget/SentryIssuesWidget.tsx b/plugins/sentry/src/components/SentryIssuesWidget/SentryIssuesWidget.tsx index 3cf1162505..4db2721efb 100644 --- a/plugins/sentry/src/components/SentryIssuesWidget/SentryIssuesWidget.tsx +++ b/plugins/sentry/src/components/SentryIssuesWidget/SentryIssuesWidget.tsx @@ -20,12 +20,12 @@ import useAsync from 'react-use/lib/useAsync'; import { sentryApiRef } from '../../api'; import SentryIssuesTable from '../SentryIssuesTable/SentryIssuesTable'; import { SENTRY_PROJECT_SLUG_ANNOTATION, useProjectSlug } from '../hooks'; +import { MissingAnnotationEmptyState } from '@backstage/plugin-catalog-react'; import { EmptyState, InfoCard, InfoCardVariants, - MissingAnnotationEmptyState, Progress, } from '@backstage/core-components'; diff --git a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx index 46a22b9284..9a6e9fb8ed 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx +++ b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx @@ -14,7 +14,10 @@ * limitations under the License. */ -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { sonarQubeApiRef, useProjectInfo, @@ -38,7 +41,6 @@ import { EmptyState, InfoCard, InfoCardVariants, - MissingAnnotationEmptyState, Progress, } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.tsx b/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.tsx index f577d08eeb..877a52843c 100644 --- a/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.tsx +++ b/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.tsx @@ -19,8 +19,10 @@ import { ContentHeader, SupportButton, } from '@backstage/core-components'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import React from 'react'; import { SonarQubeCard } from '../SonarQubeCard'; import { diff --git a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx index 54784b1f4e..5800ea98b6 100644 --- a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx +++ b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx @@ -16,7 +16,10 @@ import React, { useCallback, useState } from 'react'; import useAsync from 'react-use/lib/useAsync'; import { Entity } from '@backstage/catalog-model'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { Card, CardContent, @@ -40,7 +43,6 @@ import { EmptyState, HeaderIconLinkRow, IconLinkVerticalProps, - MissingAnnotationEmptyState, Progress, } from '@backstage/core-components'; diff --git a/plugins/techdocs/src/Router.tsx b/plugins/techdocs/src/Router.tsx index 814bf3cf65..719217a32d 100644 --- a/plugins/techdocs/src/Router.tsx +++ b/plugins/techdocs/src/Router.tsx @@ -19,10 +19,12 @@ import { Route, Routes, useRoutes } from 'react-router-dom'; import { Entity } from '@backstage/catalog-model'; import { EntityPageDocs } from './EntityPageDocs'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; import { TechDocsIndexPage } from './home/components/TechDocsIndexPage'; import { TechDocsReaderPage } from './reader/components/TechDocsReaderPage'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; const TECHDOCS_ANNOTATION = 'backstage.io/techdocs-ref'; diff --git a/plugins/vault/src/components/EntityVaultCard/EntityVaultCard.tsx b/plugins/vault/src/components/EntityVaultCard/EntityVaultCard.tsx index ae8e28cb01..ec21dfb114 100644 --- a/plugins/vault/src/components/EntityVaultCard/EntityVaultCard.tsx +++ b/plugins/vault/src/components/EntityVaultCard/EntityVaultCard.tsx @@ -15,11 +15,13 @@ */ import React from 'react'; -import { useEntity } from '@backstage/plugin-catalog-react'; +import { + useEntity, + MissingAnnotationEmptyState, +} from '@backstage/plugin-catalog-react'; import { isVaultAvailable } from '../../conditions'; import { VAULT_SECRET_PATH_ANNOTATION } from '../../constants'; import { EntityVaultTable } from '../EntityVaultTable'; -import { MissingAnnotationEmptyState } from '@backstage/core-components'; export const EntityVaultCard = () => { const { entity } = useEntity();