Display task execution time
https://redmine.teklia.com/issues/8785
Requires backend#1869 (closed)
A new shortTimedelta(totalSeconds: number): string
helper in method in src/helpers/date.ts
takes a number of seconds and returns a short representation: mm:ss
when it lasted for less than an hour, hh:mm:ss
between 1 and 24 hours, and DD day(s) hh:mm:ss
above that. There should be unit tests for that helper.
On the right half of the task panel in the process status view, before the buttons, the task execution time should be displayed using shortTimedelta
. A title
shows the exact duration using secondsToTimedelta
.
The task execution time is defined as either finished - started
when both are set, or Date.now() - started
when only started
is set. If started
is not set, no time should be displayed.
Make sure that Vue does react to changes in the tasks and updates the execution time on every refresh while a task is running. Since started
and finished
do not change while a task runs until it finishes, I'm not sure Vue might trigger a refresh of a computed property.