Skip to content

Commit ec7fce8

Browse files
committed
fix(webapp): cap the concurrency-keys table at 25 per page and move pagination into a table title bar (TRI-12438)
1 parent 3037321 commit ec7fce8

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues_.$queueParam/route.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -862,13 +862,21 @@ function KeyStatsTable({
862862

863863
const rows: ConcurrencyKeyRow[] = data?.success ? data.rows : [];
864864
const total = data?.success ? data.total : 0;
865-
const perPage = data?.success ? data.perPage : 50;
865+
const perPage = data?.success ? data.perPage : 25;
866866
const totalPages = Math.max(1, Math.ceil(total / perPage));
867867
// Only show a skeleton before the first response; keep prior rows visible while revalidating.
868868
const showLoading = isLoading && !data;
869869

870870
return (
871871
<div className="flex flex-col">
872+
{/* Title bar above the table, shown only when there's more than one page: the section title
873+
on the left, prev/next pagination on the right. Hidden entirely for a single page. */}
874+
{totalPages > 1 ? (
875+
<div className="flex items-center justify-between border-t px-3 py-2">
876+
<Header3>Concurrency keys</Header3>
877+
<PaginationControls currentPage={page} totalPages={totalPages} showPageNumbers={false} />
878+
</div>
879+
) : null}
872880
{/* Full-bleed, edge-to-edge like the Queues list table: a top border, no rounded side box. */}
873881
<Table containerClassName="border-t">
874882
<TableHeader>
@@ -915,11 +923,6 @@ function KeyStatsTable({
915923
)}
916924
</TableBody>
917925
</Table>
918-
{totalPages > 1 ? (
919-
<div className="flex justify-end px-3 py-2">
920-
<PaginationControls currentPage={page} totalPages={totalPages} />
921-
</div>
922-
) : null}
923926
</div>
924927
);
925928
}

apps/webapp/app/routes/resources.queues.concurrency-keys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { engine } from "~/v3/runEngine.server";
1313
// paginated authority — ranked by peak backlog over the window with the total on every row
1414
// (single scan) — and the ≤PER_PAGE keys on the page are enriched with live "now" counts from
1515
// Redis (O(page), independent of total key cardinality). This replaces the old top-50 cap.
16-
export const CONCURRENCY_KEYS_PER_PAGE = 50;
16+
export const CONCURRENCY_KEYS_PER_PAGE = 25;
1717

1818
// Matches QUEUE_METRICS_DEFAULT_PERIOD (the detail page's TimeFilter default).
1919
const DEFAULT_PERIOD = "1d";

0 commit comments

Comments
 (0)