From fb7fbdfe82bd9b612915a4f079979b69d619e1c4 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Thu, 31 Oct 2024 23:48:22 -0400 Subject: [PATCH] remove active deployment acount from release cells --- .../systems/[systemSlug]/deployments/TableCells.tsx | 11 ----------- .../releases/DeploymentPageContent.tsx | 10 ---------- 2 files changed, 21 deletions(-) diff --git a/apps/webservice/src/app/[workspaceSlug]/systems/[systemSlug]/deployments/TableCells.tsx b/apps/webservice/src/app/[workspaceSlug]/systems/[systemSlug]/deployments/TableCells.tsx index f62a8278..7c86c78d 100644 --- a/apps/webservice/src/app/[workspaceSlug]/systems/[systemSlug]/deployments/TableCells.tsx +++ b/apps/webservice/src/app/[workspaceSlug]/systems/[systemSlug]/deployments/TableCells.tsx @@ -21,7 +21,6 @@ import { format } from "date-fns"; import _ from "lodash"; import { isPresent } from "ts-is-present"; -import { Badge } from "@ctrlplane/ui/badge"; import { Card } from "@ctrlplane/ui/card"; import { HoverCard, @@ -120,7 +119,6 @@ export const Release: React.FC<{ version: string; releaseId: string; environment: { id: string; name: string }; - activeDeploymentCount?: number; deployedAt: Date; releaseJobTriggers: Array< ReleaseJobTrigger & { @@ -137,7 +135,6 @@ export const Release: React.FC<{ name, deployedAt, releaseJobTriggers, - activeDeploymentCount, releaseId, version, environment, @@ -197,14 +194,6 @@ export const Release: React.FC<{ - {activeDeploymentCount != null && activeDeploymentCount > 0 && ( - - {activeDeploymentCount} - - )}
{format(deployedAt, "MMM d, hh:mm aa")} diff --git a/apps/webservice/src/app/[workspaceSlug]/systems/[systemSlug]/deployments/[deploymentSlug]/releases/DeploymentPageContent.tsx b/apps/webservice/src/app/[workspaceSlug]/systems/[systemSlug]/deployments/[deploymentSlug]/releases/DeploymentPageContent.tsx index 700ecd80..efa322ee 100644 --- a/apps/webservice/src/app/[workspaceSlug]/systems/[systemSlug]/deployments/[deploymentSlug]/releases/DeploymentPageContent.tsx +++ b/apps/webservice/src/app/[workspaceSlug]/systems/[systemSlug]/deployments/[deploymentSlug]/releases/DeploymentPageContent.tsx @@ -69,9 +69,6 @@ export const DeploymentPageContent: React.FC = ({ ) .map((releaseJobTrigger) => ({ ...releaseJobTrigger })); - const distribution = api.deployment.distributionById.useQuery(deployment.id, { - refetchInterval: 2_000, - }); const releaseIds = releases.data?.items.map((r) => r.id) ?? []; const blockedEnvByRelease = api.release.blocked.useQuery(releaseIds, { enabled: releaseIds.length > 0, @@ -196,12 +193,6 @@ export const DeploymentPageContent: React.FC = ({ t.environmentId === env.id, ); - const activeDeploymentCount = - distribution.data?.filter( - (d) => - d.release.id === release.id && - d.releaseJobTrigger.environmentId === env.id, - ).length ?? 0; const hasTargets = env.targets.length > 0; const hasRelease = environmentReleaseReleaseJobTriggers.length > 0; @@ -238,7 +229,6 @@ export const DeploymentPageContent: React.FC = ({ releaseId={release.id} version={release.version} environment={env} - activeDeploymentCount={activeDeploymentCount} name={release.version} deployedAt={ environmentReleaseReleaseJobTriggers[0]!