Skip to content

Commit b8b9531

Browse files
authored
Add mapped task count to graph task node (#48445)
1 parent fde5051 commit b8b9531

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export const TaskNode = ({
7979
>
8080
<Box>
8181
<TaskLink
82+
childCount={taskInstance?.task_count}
8283
id={id}
8384
isGroup={isGroup}
8485
isMapped={isMapped}

airflow-core/src/airflow/ui/src/components/TaskName.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { FiArrowUpRight, FiArrowDownRight } from "react-icons/fi";
2323
import type { NodeResponse } from "openapi/requests/types.gen";
2424

2525
export type TaskNameProps = {
26+
readonly childCount?: number;
2627
readonly isGroup?: boolean;
2728
readonly isMapped?: boolean;
2829
readonly isOpen?: boolean;
@@ -38,6 +39,7 @@ const iconStyle: CSSProperties = {
3839
};
3940

4041
export const TaskName = ({
42+
childCount,
4143
isGroup = false,
4244
isMapped = false,
4345
isOpen = false,
@@ -59,7 +61,7 @@ export const TaskName = ({
5961
return (
6062
<Text fontSize={isZoomedOut ? "lg" : "md"} fontWeight="bold" {...rest}>
6163
{label}
62-
{isMapped ? " [ ]" : undefined}
64+
{isMapped ? ` [${childCount ?? " "}]` : undefined}
6365
{setupTeardownType === "setup" && <FiArrowUpRight size={isZoomedOut ? 24 : 15} style={iconStyle} />}
6466
{setupTeardownType === "teardown" && (
6567
<FiArrowDownRight size={isZoomedOut ? 24 : 15} style={iconStyle} />

0 commit comments

Comments
 (0)