This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 8871f9591c correcting wrong time showing in grid view (#34179)
8871f9591c is described below
commit 8871f9591cc164f7692bd3fa0088f5e565d7d498
Author: Abhishek-kumar-samsung <[email protected]>
AuthorDate: Tue Sep 12 18:04:49 2023 +0530
correcting wrong time showing in grid view (#34179)
* correcting wrong time showing in grid view
* lint errors resolved
* lint errors resolved
---
airflow/www/static/js/dag/grid/dagRuns/Bar.tsx | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/airflow/www/static/js/dag/grid/dagRuns/Bar.tsx
b/airflow/www/static/js/dag/grid/dagRuns/Bar.tsx
index 95fc1cd11d..8b71126b53 100644
--- a/airflow/www/static/js/dag/grid/dagRuns/Bar.tsx
+++ b/airflow/www/static/js/dag/grid/dagRuns/Bar.tsx
@@ -26,9 +26,14 @@ import { Flex, Box, Tooltip, Text, VStack, useTheme } from
"@chakra-ui/react";
import { useContainerRef } from "src/context/containerRef";
import Time from "src/components/Time";
import type { SelectionProps } from "src/dag/useSelection";
-import { hoverDelay, getStatusBackgroundColor } from "src/utils";
+import {
+ hoverDelay,
+ getStatusBackgroundColor,
+ getDagRunLabel,
+} from "src/utils";
import RunTypeIcon from "src/components/RunTypeIcon";
+import { useGridData } from "src/api";
import DagRunTooltip from "./Tooltip";
import type { RunWithDuration } from ".";
@@ -51,7 +56,7 @@ const DagRunBar = ({
isSelected,
onSelect,
}: Props) => {
- const { runType, runId, duration, state, executionDate } = run;
+ const { runType, runId, duration, state } = run;
const containerRef = useContainerRef();
const { colors } = useTheme();
const hoverBlue = `${colors.blue[100]}50`;
@@ -86,6 +91,10 @@ const DagRunBar = ({
inverseIndex === 4 || (inverseIndex > 4 && (inverseIndex - 4) % 10 === 0);
const color = stateColors[state];
+ const {
+ data: { ordering },
+ } = useGridData();
+ const dagRun = run;
return (
<Box
@@ -159,7 +168,10 @@ const DagRunBar = ({
transform="rotate(-30deg) translateX(28px)"
mt="-23px !important"
>
- <Time dateTime={executionDate} format="MMM DD, HH:mm" />
+ <Time
+ dateTime={getDagRunLabel({ dagRun, ordering })}
+ format="MMM DD, HH:mm"
+ />
</Text>
<Box borderLeftWidth={1} opacity={0.7} height="100px" zIndex={0} />
</VStack>