Skip to content

Commit

Permalink
Prefer rendered_map_index value if defined over map_index. (#45086)
Browse files Browse the repository at this point in the history
  • Loading branch information
tirkarthi authored Dec 19, 2024
1 parent 65b110d commit 06b7d57
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion airflow/ui/src/components/ClearRun/ClearRunDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const ClearRunDialog = ({
{ label: "Clear only failed tasks", value: "only_failed" },
{
disabled: true,
label: "Queued up new tasks",
label: "Queue up new tasks",
value: "new_tasks",
},
]}
Expand Down
3 changes: 2 additions & 1 deletion airflow/ui/src/components/ClearRun/ClearRunTaskAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ const columns: Array<ColumnDef<TaskInstanceResponse>> = [
header: () => "State",
},
{
accessorKey: "map_index",
accessorFn: (row: TaskInstanceResponse) =>
row.rendered_map_index ?? row.map_index,
enableSorting: false,
header: "Map Index",
},
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/components/ui/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(
<ChakraTooltip.Arrow>
<ChakraTooltip.ArrowTip />
</ChakraTooltip.Arrow>
) : null}
) : undefined}
{content}
</ChakraTooltip.Content>
</ChakraTooltip.Positioner>
Expand Down
3 changes: 2 additions & 1 deletion airflow/ui/src/pages/Run/TaskInstances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ const columns: Array<ColumnDef<TaskInstanceResponse>> = [
header: "End Date",
},
{
accessorKey: "map_index",
accessorFn: (row: TaskInstanceResponse) =>
row.rendered_map_index ?? row.map_index,
header: "Map Index",
},

Expand Down
3 changes: 2 additions & 1 deletion airflow/ui/src/pages/Task/Instances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ const columns = (
...(isMapped
? [
{
accessorKey: "map_index",
accessorFn: (row: TaskInstanceResponse) =>
row.rendered_map_index ?? row.map_index,
header: "Map Index",
},
]
Expand Down
4 changes: 3 additions & 1 deletion airflow/ui/src/pages/TaskInstance/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export const Header = ({
<SimpleGrid columns={6} gap={4} my={2}>
<Stat label="Operator">{taskInstance.operator}</Stat>
{taskInstance.map_index > -1 ? (
<Stat label="Map Index">{taskInstance.map_index}</Stat>
<Stat label="Map Index">
{taskInstance.rendered_map_index ?? taskInstance.map_index}
</Stat>
) : undefined}
{taskInstance.try_number > 1 ? (
<Stat label="Try Number">{taskInstance.try_number}</Stat>
Expand Down

0 comments on commit 06b7d57

Please sign in to comment.