fix finished workflows incorrectly being displayed as running (#909)
This commit is contained in:
parent
4428184aea
commit
9707fb55e4
@ -305,6 +305,15 @@ export class WorkflowListItem extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
<div class="desc duration">
|
<div class="desc duration">
|
||||||
${this.safeRender((workflow) => {
|
${this.safeRender((workflow) => {
|
||||||
|
if (workflow.lastCrawlTime && workflow.lastCrawlStartTime) {
|
||||||
|
return msg(
|
||||||
|
str`Finished in ${RelativeDuration.humanize(
|
||||||
|
new Date(`${workflow.lastCrawlTime}Z`).valueOf() -
|
||||||
|
new Date(`${workflow.lastCrawlStartTime}Z`).valueOf(),
|
||||||
|
{ compact: true }
|
||||||
|
)}`
|
||||||
|
);
|
||||||
|
}
|
||||||
if (workflow.lastCrawlStartTime) {
|
if (workflow.lastCrawlStartTime) {
|
||||||
const diff =
|
const diff =
|
||||||
new Date().valueOf() -
|
new Date().valueOf() -
|
||||||
@ -318,15 +327,6 @@ export class WorkflowListItem extends LitElement {
|
|||||||
})}`
|
})}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (workflow.lastCrawlTime) {
|
|
||||||
return msg(
|
|
||||||
str`Finished in ${RelativeDuration.humanize(
|
|
||||||
new Date(`${workflow.lastCrawlTime}Z`).valueOf() -
|
|
||||||
new Date(`${workflow.lastCrawlStartTime}Z`).valueOf(),
|
|
||||||
{ compact: true }
|
|
||||||
)}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return notSpecified;
|
return notSpecified;
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user