You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/07/18 12:35:34 UTC
[GitHub] [incubator-devlake] likyh commented on a diff in pull request #2526: fix: fix start_at/end_at display bug
likyh commented on code in PR #2526:
URL: https://github.com/apache/incubator-devlake/pull/2526#discussion_r923322242
##########
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'
Review Comment:
because only check running is not enough. so to avoid complex logic and changes in future, just check if time is null.
--
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: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org