Skip to content

Commit

Permalink
JobList: Fix node count for queued jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Cerza <[email protected]>
  • Loading branch information
zmc committed Feb 2, 2024
1 parent f6f9a7a commit 99119d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/JobList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const columns: MRT_ColumnDef<Job>[] = [
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,
},
Expand Down
3 changes: 3 additions & 0 deletions src/lib/paddles.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 99119d7

Please sign in to comment.