|
1 | | -import RunIcon from "@/assets/icons/terminal.svg?react"; |
2 | 1 | import PipelineIcon from "@/assets/icons/pipeline.svg?react"; |
| 2 | +import RunIcon from "@/assets/icons/terminal.svg?react"; |
| 3 | +import { CopyButton } from "@/components/CopyButton"; |
3 | 4 | import { ExecutionStatusIcon, getExecutionStatusColor } from "@/components/ExecutionStatus"; |
| 5 | +import { routes } from "@/router/routes"; |
4 | 6 | import { ExecutionStatus } from "@/types/pipeline-runs"; |
5 | | -import { PipelineNamespace, PipelineNamespaceBody } from "@/types/pipelines"; |
| 7 | +import { Pipeline } from "@/types/pipelines"; |
6 | 8 | import { ColumnDef } from "@tanstack/react-table"; |
7 | 9 | import { Tag, TagProps } from "@zenml-io/react-component-library"; |
8 | 10 | import { Link } from "react-router-dom"; |
9 | | -import { routes } from "@/router/routes"; |
10 | | -import { CopyButton } from "@/components/CopyButton"; |
11 | 11 |
|
12 | | -export function getPipelineColumns(): ColumnDef<PipelineNamespace>[] { |
| 12 | +export function getPipelineColumns(): ColumnDef<Pipeline>[] { |
13 | 13 | return [ |
14 | 14 | { |
15 | 15 | id: "name", |
16 | 16 | header: "Pipeline", |
17 | 17 | accessorFn: (row) => ({ name: row.name, status: row.body?.latest_run_status }), |
18 | 18 | cell: ({ getValue }) => { |
19 | 19 | const { name, status } = getValue<{ |
20 | | - name: PipelineNamespace["name"]; |
21 | | - status: PipelineNamespaceBody["latest_run_status"]; |
| 20 | + name: string; |
| 21 | + status: ExecutionStatus; |
22 | 22 | }>(); |
23 | 23 |
|
24 | 24 | return ( |
@@ -46,7 +46,7 @@ export function getPipelineColumns(): ColumnDef<PipelineNamespace>[] { |
46 | 46 | cell: ({ getValue }) => { |
47 | 47 | const { runId, status } = getValue<{ |
48 | 48 | runId?: string; |
49 | | - status?: PipelineNamespaceBody["latest_run_status"]; |
| 49 | + status?: ExecutionStatus; |
50 | 50 | }>(); |
51 | 51 |
|
52 | 52 | if (!runId || !status) return <div>No run</div>; |
|
0 commit comments