diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index a5a32cf..98f05aa 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -10,11 +10,8 @@ import { } from '@backstage/plugin-api-docs'; import { EntityAboutCard, - EntityDependsOnComponentsCard, - EntityDependsOnResourcesCard, EntityHasComponentsCard, EntityHasResourcesCard, - EntityHasSubcomponentsCard, EntityHasSystemsCard, EntityLayout, EntityLinksCard, @@ -28,10 +25,6 @@ import { hasRelationWarnings, EntityRelationWarning, } from '@backstage/plugin-catalog'; -import { - isGithubActionsAvailable, - EntityGithubActionsContent, -} from '@backstage-community/plugin-github-actions'; import { EntityUserProfileCard, EntityGroupProfileCard, @@ -58,7 +51,7 @@ import { import { TechDocsAddons } from '@backstage/plugin-techdocs-react'; import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib'; -import { EntityKubernetesContent } from '@backstage/plugin-kubernetes'; +import { EntityKubernetesContent, isKubernetesAvailable } from '@backstage/plugin-kubernetes'; import { EntityArgoCDOverviewCard, @@ -66,7 +59,7 @@ import { } from '@roadiehq/backstage-plugin-argo-cd'; import { - EntityArgoWorkflowsOverviewCard, EntityArgoWorkflowsTemplateOverviewCard, + EntityArgoWorkflowsOverviewCard, isArgoWorkflowsAvailable, } from '@internal/plugin-argo-workflows'; import {ApacheSparkPage, isApacheSparkAvailable} from "@internal/plugin-apache-spark"; @@ -81,11 +74,9 @@ const techdocsContent = ( ); const cicdContent = ( - // This is an example of how you can implement your company's logic in entity page. - // You can for example enforce that all components of type 'service' should use GitHubActions - - + isArgoWorkflowsAvailable(e)}> + @@ -148,16 +139,6 @@ const overviewContent = ( - - isArgoWorkflowsAvailable(e)}> - - - - - - - - isTerraformAvailable(e)}> @@ -168,14 +149,9 @@ const overviewContent = ( - - - - - ); @@ -189,7 +165,7 @@ const serviceEntityPage = ( {cicdContent} - + isKubernetesAvailable(e)}> @@ -208,17 +184,6 @@ const serviceEntityPage = ( - - - - - - - - - - - {techdocsContent} @@ -235,17 +200,6 @@ const websiteEntityPage = ( {cicdContent} - - - - - - - - - - - {techdocsContent} @@ -296,9 +250,6 @@ const apiPage = ( - - - diff --git a/plugins/argo-workflows/src/components/Overview/Overview.tsx b/plugins/argo-workflows/src/components/Overview/Overview.tsx index aa1d205..78923fd 100644 --- a/plugins/argo-workflows/src/components/Overview/Overview.tsx +++ b/plugins/argo-workflows/src/components/Overview/Overview.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react'; import { Header, HeaderLabel, @@ -7,12 +7,12 @@ import { ContentHeader, SupportButton, InfoCard, -} from "@backstage/core-components"; -import { Grid } from "@material-ui/core"; -import { OverviewTable } from "../WorkflowOverview/WorkflowOverview"; -import { useEntity } from "@backstage/plugin-catalog-react"; -import { isArgoWorkflowsAvailable } from "../../plugin"; -import { WorkflowTemplateTable } from "../WorkflowTemplateOverview/WorkflowTemplateOverview"; +} from '@backstage/core-components'; +import { Grid } from '@material-ui/core'; +import { OverviewTable } from '../WorkflowOverview/WorkflowOverview'; +import { useEntity } from '@backstage/plugin-catalog-react'; +import { isArgoWorkflowsAvailable } from '../../plugin'; +import { WorkflowTemplateTable } from '../WorkflowTemplateOverview/WorkflowTemplateOverview'; export const ArgoWorkflowsOverviewPage = () => ( @@ -33,11 +33,11 @@ export const ArgoWorkflowsOverviewPage = () => ( ); -export const ArgoWorkflowsOverviewCard = () => { +export const ArgoWorkflowsOverviewCard = (props: { title?: string }) => { const { entity } = useEntity(); if (isArgoWorkflowsAvailable(entity)) { return ( - + ); @@ -49,7 +49,7 @@ export const ArgoWorkflowsTemplatesOverviewCard = () => { const { entity } = useEntity(); if (isArgoWorkflowsAvailable(entity)) { return ( - + ); diff --git a/plugins/argo-workflows/src/components/Overview/index.ts b/plugins/argo-workflows/src/components/Overview/index.ts index e7f5a27..c478643 100644 --- a/plugins/argo-workflows/src/components/Overview/index.ts +++ b/plugins/argo-workflows/src/components/Overview/index.ts @@ -2,4 +2,4 @@ export { ArgoWorkflowsOverviewPage, ArgoWorkflowsOverviewCard, ArgoWorkflowsTemplatesOverviewCard, -} from "./Overview"; +} from './Overview';