Skip to content

Commit

Permalink
fix: show duration based on current time if endTime is not there (#18799
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Kenil27 authored Nov 26, 2024
1 parent c517113 commit b3e52e8
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,9 @@ const AppRunsHistory = forwardRef(
dataIndex: 'executionTime',
key: 'executionTime',
render: (_, record: AppRunRecordWithId) => {
if (record.startTime && record.endTime) {
const ms = getIntervalInMilliseconds(
record.startTime,
record.endTime
);
if (record.startTime) {
const endTime = record.endTime || Date.now(); // Use current time in epoch milliseconds if endTime is not present
const ms = getIntervalInMilliseconds(record.startTime, endTime);

return formatDuration(ms);
} else {
Expand Down

0 comments on commit b3e52e8

Please sign in to comment.