This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch v2-6-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit bb22b909dab32cb79ba480a0fad7607e6ea3e7d6 Author: Brent Bovenzi <[email protected]> AuthorDate: Thu Apr 27 12:09:27 2023 -0400 Fix mappedStates case (#30916) * Fix mappedStates case * remove stray console log (cherry picked from commit decaaa3df2b3ef0124366033346dc21d62cff057) --- airflow/www/static/js/dag/InstanceTooltip.tsx | 7 ++++--- airflow/www/static/js/dag/details/taskInstance/Details.tsx | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/airflow/www/static/js/dag/InstanceTooltip.tsx b/airflow/www/static/js/dag/InstanceTooltip.tsx index 2991aae63a..4765927abb 100644 --- a/airflow/www/static/js/dag/InstanceTooltip.tsx +++ b/airflow/www/static/js/dag/InstanceTooltip.tsx @@ -19,6 +19,7 @@ import React from "react"; import { Box, Text } from "@chakra-ui/react"; +import { snakeCase } from "lodash"; import { getGroupAndMapSummary } from "src/utils"; import { formatDuration, getDuration } from "src/datetime_utils"; @@ -46,11 +47,11 @@ const InstanceTooltip = ({ }); childTaskMap.forEach((key, val) => { + const childState = snakeCase(val); if (key > 0) { summary.push( - // eslint-disable-next-line react/no-array-index-key - <Text key={val} ml="10px"> - {val} + <Text key={childState} ml="10px"> + {childState} {": "} {key} </Text> diff --git a/airflow/www/static/js/dag/details/taskInstance/Details.tsx b/airflow/www/static/js/dag/details/taskInstance/Details.tsx index 3e3b9dc881..58964d3ec1 100644 --- a/airflow/www/static/js/dag/details/taskInstance/Details.tsx +++ b/airflow/www/static/js/dag/details/taskInstance/Details.tsx @@ -19,6 +19,7 @@ import React from "react"; import { Text, Flex, Table, Tbody, Tr, Td, Divider } from "@chakra-ui/react"; +import { snakeCase } from "lodash"; import { getGroupAndMapSummary } from "src/utils"; import { getDuration, formatDuration } from "src/datetime_utils"; @@ -59,15 +60,15 @@ const Details = ({ instance, group, dagId }: Props) => { }); childTaskMap.forEach((key, val) => { + const childState = snakeCase(val); if (key > 0) { summary.push( - // eslint-disable-next-line react/no-array-index-key - <Tr key={val}> + <Tr key={childState}> <Td /> <Td> <Flex alignItems="center"> - <SimpleStatus state={val as TaskState} mx={2} /> - {val} + <SimpleStatus state={childState as TaskState} mx={2} /> + {childState} {": "} {key} </Flex>
