diff --git a/apps/webapp/app/components/billing/ConcurrentRunsChart.tsx b/apps/webapp/app/components/billing/ConcurrentRunsChart.tsx index 5d2b7b0b2..4677f1566 100644 --- a/apps/webapp/app/components/billing/ConcurrentRunsChart.tsx +++ b/apps/webapp/app/components/billing/ConcurrentRunsChart.tsx @@ -2,6 +2,7 @@ import { Label, Line, LineChart, + Rectangle, ReferenceLine, ResponsiveContainer, Tooltip, @@ -30,8 +31,6 @@ export function ConcurrentRunsChart({ concurrentRunsLimit?: number; data: { name: string; maxConcurrentRuns: number }[]; }) { - console.log(data); - return (
Concurrent Runs @@ -81,7 +80,7 @@ export function ConcurrentRunsChart({ function ReferenceLineLabel({ y }: { y: number }) { return ( - + Concurrency limit diff --git a/apps/webapp/app/presenters/OrgUsagePresenter.server.ts b/apps/webapp/app/presenters/OrgUsagePresenter.server.ts index 6f3ae1bb9..5d0a054f1 100644 --- a/apps/webapp/app/presenters/OrgUsagePresenter.server.ts +++ b/apps/webapp/app/presenters/OrgUsagePresenter.server.ts @@ -219,7 +219,6 @@ function fillInMissingConcurrencyDays( days: number, data: Array<{ day: Date; max_concurrent_runs: BigInt }> ) { - console.log("inputData", data); const outputData: Array<{ name: string; maxConcurrentRuns: number }> = []; for (let i = 0; i < days; i++) { const date = new Date(startDate); diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.billing._index/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.billing._index/route.tsx index c55f2fd29..c3e9705e9 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.billing._index/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.billing._index/route.tsx @@ -51,29 +51,35 @@ export default function Page() { const loaderData = useTypedLoaderData(); const currentPlan = useCurrentPlan(); - console.log(currentPlan); + const hitConcurrencyLimit = currentPlan?.subscription?.limits.concurrentRuns + ? loaderData.concurrencyData.some( + (c) => c.maxConcurrentRuns >= currentPlan.subscription!.limits.concurrentRuns! + ) + : false; return (
Concurrent Runs
- - Increase concurrent Runs - - } - > - Some of your Runs are being queued because the number of concurrent Runs is limited to - 50. - + {hitConcurrencyLimit && ( + + Increase concurrent Runs + + } + > + {`Some of your Runs are being queued because the number of concurrent Runs is limited to + ${currentPlan?.subscription?.limits.concurrentRuns}.`} + + )}