tirkarthi commented on code in PR #53438:
URL: https://github.com/apache/airflow/pull/53438#discussion_r2213502087
##########
airflow-core/src/airflow/ui/src/layouts/Details/Grid/GridTI.tsx:
##########
@@ -78,23 +116,51 @@ const Instance = ({ dagId, isGroup, isMapped, runId,
search, state, taskId }: Pr
>
<Badge
borderRadius={4}
- colorPalette={state === null ? "none" : state}
+ colorPalette={instance.state ?? "none"}
height="14px"
minH={0}
- opacity={state === "success" ? 0.6 : 1}
+ onMouseEnter={onBadgeMouseEnter}
+ onMouseLeave={onBadgeMouseLeave}
p={0}
+ position="relative"
variant="solid"
width="14px"
>
- {state === undefined ? undefined : (
- <StateIcon
- size={10}
- state={state}
- style={{
- marginLeft: "2px",
- }}
- />
- )}
+ <StateIcon
+ size={10}
+ state={instance.state}
+ style={{
+ marginLeft: "2px",
+ }}
+ />
+ <chakra.span
+ bg="bg.inverted"
+ borderRadius={2}
+ bottom={0}
+ color="fg.inverted"
+ id="tooltip"
+ p={2}
+ position="absolute"
+ right={0}
+ visibility="hidden"
+ zIndex={1}
+ >
+ {translate("taskId")}: {taskId}
+ <br />
+ {translate("state")}: {instance.state}
+ {instance.min_start_date !== null && (
+ <>
+ <br />
+ {translate("startDate")}: <Time
datetime={instance.min_start_date} />
Review Comment:
While testing the PR locally it seems this is always set as `null` for a
task. It will be useful to have `start_date` and `end_date` for a task along
with using the values to calculate the `duration` given that tasks are more
common than task groups.
https://github.com/apache/airflow/blob/ebf3fba15b2f4d2126049aac7357a3456675d1c8/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py#L340-L344
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]