build-logs: extract compute_runtime_secs helper; clamp runtime in js
This commit is contained in:
parent
008609d0e7
commit
aa96d76e73
2 changed files with 7 additions and 3 deletions
|
|
@ -1127,7 +1127,7 @@ window.marked = marked;
|
|||
const age = h.started_at
|
||||
? fmtAgeSecs(nowUnix - h.started_at) + ' ago' : '?';
|
||||
const runtimeSpan = h.runtime_secs != null
|
||||
? el('span', { class: 'build-logs-runtime meta' }, fmtDuration(h.runtime_secs))
|
||||
? el('span', { class: 'build-logs-runtime meta' }, fmtDuration(Math.max(0, h.runtime_secs)))
|
||||
: h.started_at && !h.finished_at
|
||||
? el('span', {
|
||||
class: 'build-logs-runtime meta',
|
||||
|
|
|
|||
Loading…
Reference in a new issue