{#if wf}

{wf.name} #{wf.id}

{#if hasH3Hint}

{t('wfMedia.h3Limits')}

{/if} {#if activeJob && activeInfo}
{t('wft.running')} {activeInfo.detail}
{#if stageLog.length}
{#each stageLog as line, i (i)}

{line}

{/each}
{/if}
{:else if finishedJob && finishedJob.status === 'done' && (finishedJob.output_paths?.length ?? 0) > 0}

{t('wft.passed', { n: finishedJob.output_paths.length })}

{#each finishedJob.output_paths as path (path)} {/each}
{:else if finishedJob && finishedJob.status !== 'pending' && finishedJob.status !== 'running'}

{t('wft.failed')}

{finishedJob.error === 'cancelled' ? t('wft.cancelledShort') : errorExpanded || (finishedJob.error ?? '').length <= 160 ? finishedJob.error : (finishedJob.error ?? '').slice(0, 160) + '…'}

{#if finishedJob.error && finishedJob.error !== 'cancelled' && finishedJob.error.length > 160} {/if}
{/if} {#if !queueBusy}
{#each listEntries as entry (entry.nodeId)} {@const kind = kindOf(entry)} mediaAdd(entry, files)} onReplace={(i, file) => mediaReplace(entry, i, file)} onRemove={(i) => mediaRemove(entry, i)} onDismissReject={(i) => setRejects( entry.nodeId, (rejects[entry.nodeId] ?? []).filter((_, j) => j !== i), )} /> {/each} {#if formEntries.length} {/if}
{#if submitError}{submitError}{/if}
{/if}
{t('wft.history', { n: history.length })} {#if history.length} {/if}
{#if history.length === 0}

{t('wft.never')}

{:else}
    {#each history as job (job.id)}
  • #{job.id} {timeOf(job.created_at)} 0} > {resultLine(job)}
  • {/each}
{/if}
{/if}