diff --git a/src/components/RunList/index.tsx b/src/components/RunList/index.tsx index 1d09428..15578e9 100644 --- a/src/components/RunList/index.tsx +++ b/src/components/RunList/index.tsx @@ -247,6 +247,7 @@ export default function RunList(props: RunListProps) { desc: true, }, ], + showColumnFilters: false, }, state: { columnFilters, diff --git a/src/lib/paddles.d.ts b/src/lib/paddles.d.ts index 381de57..412119c 100644 --- a/src/lib/paddles.d.ts +++ b/src/lib/paddles.d.ts @@ -64,7 +64,6 @@ export type Run = { name: string; branch: string; suite: string; - jobs: Job[]; scheduled: string; user: string; started: string; @@ -78,6 +77,11 @@ export type Run = { status: RunStatus; }; + +interface RunWithJobs extends Run { + jobs: Job[]; +} + export type Node = { name: string; description: string | null; diff --git a/src/lib/paddles.ts b/src/lib/paddles.ts index 905b79d..1f0b9eb 100644 --- a/src/lib/paddles.ts +++ b/src/lib/paddles.ts @@ -4,6 +4,7 @@ import type { UseQueryResult } from "@tanstack/react-query"; import type { GetURLParams, Run, Job, + RunWithJobs, Node, NodeJobs, StatsLocksResponse, StatsJobsResponse, @@ -69,10 +70,10 @@ function useRuns(params: GetURLParams): UseQueryResult { return query; } -function useRun(name: string): UseQueryResult { +function useRun(name: string): UseQueryResult { const url = getURL(`/runs/${name}/`); - const query = useQuery(["run", { url }], { - select: (data: Run) => { + const query = useQuery(["run", { url }], { + select: (data: RunWithJobs) => { data.jobs.forEach((item) => { item.id = item.job_id + ""; }); diff --git a/src/pages/Run/index.tsx b/src/pages/Run/index.tsx index a71382c..fcc8119 100644 --- a/src/pages/Run/index.tsx +++ b/src/pages/Run/index.tsx @@ -6,7 +6,7 @@ import Typography from "@mui/material/Typography"; import { format } from "date-fns"; import { Helmet } from "react-helmet"; -import type { Run as Run_, RunParams } from "../../lib/paddles.d"; +import type { RunWithJobs as Run_, RunParams } from "../../lib/paddles.d"; import { useRun } from "../../lib/paddles"; import JobList from "../../components/JobList";