You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bb...@apache.org on 2022/04/28 11:45:42 UTC
[airflow] branch main updated: Use in Mapped Instance table (#23313)
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 98ec8c6990 Use <Time /> in Mapped Instance table (#23313)
98ec8c6990 is described below
commit 98ec8c6990347fda60cbad33db915dc21497b1f0
Author: Brent Bovenzi <br...@gmail.com>
AuthorDate: Thu Apr 28 07:45:14 2022 -0400
Use <Time /> in Mapped Instance table (#23313)
The start/end dates for a mapped instance weren't updating when a user changed their timezone. Using <Time /> fixes that
---
.../js/tree/details/content/taskInstance/MappedInstances.jsx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/airflow/www/static/js/tree/details/content/taskInstance/MappedInstances.jsx b/airflow/www/static/js/tree/details/content/taskInstance/MappedInstances.jsx
index c2cef5d008..336b9d1f19 100644
--- a/airflow/www/static/js/tree/details/content/taskInstance/MappedInstances.jsx
+++ b/airflow/www/static/js/tree/details/content/taskInstance/MappedInstances.jsx
@@ -31,10 +31,11 @@ import {
} from 'react-icons/md';
import { getMetaValue } from '../../../../utils';
-import { formatDateTime, formatDuration, getDuration } from '../../../../datetime_utils';
+import { formatDuration, getDuration } from '../../../../datetime_utils';
import { useMappedInstances } from '../../../api';
import { SimpleStatus } from '../../../StatusBox';
import Table from '../../../Table';
+import Time from '../../../Time';
const renderedTemplatesUrl = getMetaValue('rendered_templates_url');
const logUrl = getMetaValue('log_url');
@@ -84,8 +85,8 @@ const MappedInstances = ({
</Flex>
),
duration: mi.duration && formatDuration(getDuration(mi.startDate, mi.endDate)),
- startDate: mi.startDate && formatDateTime(mi.startDate),
- endDate: mi.endDate && formatDateTime(mi.endDate),
+ startDate: <Time dateTime={mi.startDate} />,
+ endDate: <Time dateTime={mi.endDate} />,
links: (
<Flex alignItems="center">
<IconLink mr={1} title="Details" aria-label="Details" icon={<MdDetails />} href={detailsLink} />