Skip to content

Commit

Permalink
remove active deployment acount from release cells
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Nov 1, 2024
1 parent 5cc778e commit fb7fbdf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 & {
Expand All @@ -137,7 +135,6 @@ export const Release: React.FC<{
name,
deployedAt,
releaseJobTriggers,
activeDeploymentCount,
releaseId,
version,
environment,
Expand Down Expand Up @@ -197,14 +194,6 @@ export const Release: React.FC<{
</TooltipContent>
</Tooltip>
</TooltipProvider>
{activeDeploymentCount != null && activeDeploymentCount > 0 && (
<Badge
variant="outline"
className="rounded-full px-1.5 font-light text-muted-foreground"
>
{activeDeploymentCount}
</Badge>
)}
</div>
<div className="text-left text-muted-foreground">
{format(deployedAt, "MMM d, hh:mm aa")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ export const DeploymentPageContent: React.FC<DeploymentPageContentProps> = ({
)
.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,
Expand Down Expand Up @@ -196,12 +193,6 @@ export const DeploymentPageContent: React.FC<DeploymentPageContentProps> = ({
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;
Expand Down Expand Up @@ -238,7 +229,6 @@ export const DeploymentPageContent: React.FC<DeploymentPageContentProps> = ({
releaseId={release.id}
version={release.version}
environment={env}
activeDeploymentCount={activeDeploymentCount}
name={release.version}
deployedAt={
environmentReleaseReleaseJobTriggers[0]!
Expand Down

0 comments on commit fb7fbdf

Please sign in to comment.