Skip to content

Commit

Permalink
Fix run/task table links (apache#46901)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbovenzi authored Feb 19, 2025
1 parent 711d1fd commit 0adb5ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
5 changes: 0 additions & 5 deletions airflow/ui/src/pages/DagRuns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ const runColumns = (dagId?: string): Array<ColumnDef<DAGRunResponse>> => [
: [
{
accessorKey: "dag_id",
cell: ({ row: { original } }: DagRunRow) => (
<Link asChild color="fg.info" fontWeight="bold">
<RouterLink to={`/dags/${original.dag_id}`}>{original.dag_id}</RouterLink>
</Link>
),
enableSorting: false,
header: "Dag ID",
},
Expand Down
23 changes: 11 additions & 12 deletions airflow/ui/src/pages/TaskInstances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ const taskInstanceColumns = (
: [
{
accessorKey: "dag_id",
cell: ({ row: { original } }: TaskInstanceRow) => (
<Link asChild color="fg.info" fontWeight="bold">
<RouterLink to={`/dags/${original.dag_id}`}>{original.dag_id}</RouterLink>
</Link>
),
enableSorting: false,
header: "Dag ID",
},
Expand All @@ -63,13 +58,17 @@ const taskInstanceColumns = (
: [
{
accessorKey: "run_after",
cell: ({ row: { original } }: TaskInstanceRow) => (
<Link asChild color="fg.info" fontWeight="bold">
<RouterLink to={`/dags/${original.dag_id}/runs/${original.dag_run_id}`}>
<Time datetime={original.run_after} />
</RouterLink>
</Link>
),
// If we don't show the taskId column, make the dag run a link to the task instance
cell: ({ row: { original } }: TaskInstanceRow) =>
Boolean(taskId) ? (
<Link asChild color="fg.info" fontWeight="bold">
<RouterLink to={getTaskInstanceLink(original)}>
<Time datetime={original.run_after} />
</RouterLink>
</Link>
) : (
<Time datetime={original.run_after} />
),
header: "Dag Run",
},
]),
Expand Down

0 comments on commit 0adb5ad

Please sign in to comment.