You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2022/07/19 08:16:23 UTC
[incubator-devlake] branch main updated: fix: fix start_at/end_at display bug (#2526)
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 9a352c0e fix: fix start_at/end_at display bug (#2526)
9a352c0e is described below
commit 9a352c0ef504a27189d595e81d994b1f000009ec
Author: likyh <l...@likyh.com>
AuthorDate: Tue Jul 19 16:16:20 2022 +0800
fix: fix start_at/end_at display bug (#2526)
Co-authored-by: linyh <ya...@meri.co>
---
config-ui/src/pages/blueprints/blueprint-detail.jsx | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/config-ui/src/pages/blueprints/blueprint-detail.jsx b/config-ui/src/pages/blueprints/blueprint-detail.jsx
index 45dc1466..ea28b7a3 100644
--- a/config-ui/src/pages/blueprints/blueprint-detail.jsx
+++ b/config-ui/src/pages/blueprints/blueprint-detail.jsx
@@ -664,15 +664,12 @@ const BlueprintDetail = (props) => {
status: p.status,
statusLabel: TaskStatusLabels[p.status],
statusIcon: getTaskStatusIcon(p.status),
- startedAt: dayjs(p.beganAt).format('L LTS'),
- completedAt:
- p.status === 'TASK_RUNNING'
- ? ' - '
- : dayjs(p.finishedAt || p.updatedAt).format('L LTS'),
+ startedAt: p.beganAt ? dayjs(p.beganAt).format('L LTS') : '-',
+ completedAt: p.finishedAt ? dayjs(p.updatedAt).format('L LTS') : ' - ',
duration:
- p.status === 'TASK_RUNNING'
- ? dayjs(p.beganAt).toNow(true)
- : dayjs(p.beganAt).from(p.finishedAt || p.updatedAt, true),
+ p.beganAt && p.finishedAt
+ ? dayjs(p.beganAt).from(p.finishedAt, true)
+ : (p.beganAt ? dayjs(p.beganAt).toNow(true) : ' - '),
}))
)
}, [blueprintPipelines])