From b280e9fd1ca9ad258550fac30e31857dc03d8bbd Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 2 Feb 2024 13:28:35 -0700 Subject: [PATCH] JobList: Fix node count for queued jobs Signed-off-by: Zack Cerza --- src/components/JobList/index.tsx | 2 +- src/lib/paddles.d.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/JobList/index.tsx b/src/components/JobList/index.tsx index f9ed017..8fba7d1 100644 --- a/src/components/JobList/index.tsx +++ b/src/components/JobList/index.tsx @@ -147,7 +147,7 @@ const columns: MRT_ColumnDef[] = [ header: "nodes", accessorKey: "nodes", accessorFn: (row: Job) => { - return Object.keys(row.targets || {}).length || 0; + return Object.keys(row.targets || row.roles || {}).length || 0; }, size: 85, }, diff --git a/src/lib/paddles.d.ts b/src/lib/paddles.d.ts index 35ce4d0..381de57 100644 --- a/src/lib/paddles.d.ts +++ b/src/lib/paddles.d.ts @@ -39,10 +39,13 @@ export type Job = { status: JobStatus; failure_reason: string; targets: Node[]; + roles: NodeRoles[]; os_type: string; os_version: string; }; +export type NodeRoles = string[]; + export type RunResults = { queued: number; pass: number;