From bd5763e5c4cfa6a895dc173ac0fb68babe0f4fa6 Mon Sep 17 00:00:00 2001 From: Manabu McCloskey Date: Wed, 18 Sep 2024 22:30:57 +0000 Subject: [PATCH] move argo workflows to ci/cd tab. remove unused components Signed-off-by: Manabu McCloskey --- .../app/src/components/catalog/EntityPage.tsx | 59 ++----------------- .../src/components/Overview/Overview.tsx | 4 +- 2 files changed, 7 insertions(+), 56 deletions(-) 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..2533bce 100644 --- a/plugins/argo-workflows/src/components/Overview/Overview.tsx +++ b/plugins/argo-workflows/src/components/Overview/Overview.tsx @@ -33,11 +33,11 @@ export const ArgoWorkflowsOverviewPage = () => ( ); -export const ArgoWorkflowsOverviewCard = () => { +export const ArgoWorkflowsOverviewCard = (props: {title?: string}) => { const { entity } = useEntity(); if (isArgoWorkflowsAvailable(entity)) { return ( - + );