RoyLee1224 commented on code in PR #58359:
URL: https://github.com/apache/airflow/pull/58359#discussion_r2582298658
##########
airflow-core/src/airflow/ui/src/layouts/Details/Grid/GridButton.tsx:
##########
@@ -41,39 +43,53 @@ export const GridButton = ({
state,
taskId,
...rest
-}: Props) =>
- isGroup ? (
- <Flex
- background={`${state}.solid`}
- borderRadius={2}
- height="10px"
- minW="14px"
- pb="2px"
- px="2px"
- title={`${label}\n${state}`}
- {...rest}
- >
- {children}
- </Flex>
- ) : (
- <Link
- replace
- to={{
- pathname: `/dags/${dagId}/runs/${runId}/${taskId === undefined ? "" :
`tasks/${taskId}`}`,
- search: searchParams.toString(),
- }}
- >
+}: Props) => {
+ const { t: translate } = useTranslation();
+
+ const tooltipContent = (
+ <>
+ {label}
+ <br />
+ {translate("state")}:{" "}
+ {state ? translate(`common:states.${state}`) :
translate("common:states.no_status")}
+ </>
+ );
+
+ return isGroup ? (
+ <BasicTooltip content={tooltipContent}>
<Flex
background={`${state}.solid`}
borderRadius={2}
height="10px"
+ minW="14px"
pb="2px"
px="2px"
- title={`${label}\n${state}`}
- width="14px"
{...rest}
>
{children}
</Flex>
- </Link>
+ </BasicTooltip>
+ ) : (
+ <BasicTooltip content={tooltipContent}>
+ <Link
+ replace
+ to={{
+ pathname: `/dags/${dagId}/runs/${runId}/${taskId === undefined ? ""
: `tasks/${taskId}`}`,
Review Comment:
Oh I've implemented `buildTaskInstanceUrl` in #58881, perhaps leaving the
url refactors in that PR would be better?
--
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]