mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 16:02:19 +00:00
Fix inline preview reload (#477)
* fix(front): Fix inline preview * fix(front): Fix inline preview reload * fix(front): Fix inline preview reload
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
{/if}
|
||||
|
||||
<div class="h-full overflow-y-auto mb-16 grow">
|
||||
{#if job}
|
||||
{#if job?.id}
|
||||
<FlowStatusViewer
|
||||
jobId={job.id}
|
||||
on:jobsLoaded={(e) => mapJobResultsToFlowState(e.detail, 'upto', steps - 1)}
|
||||
|
||||
@@ -27,6 +27,22 @@
|
||||
let forloop_selected = ''
|
||||
let isReadyIndex = $arePreviewsReady.push(false)
|
||||
|
||||
function shouldReset() {
|
||||
if (jobId != lastJobid) {
|
||||
lastJobid = jobId
|
||||
jobResult = {
|
||||
job: undefined,
|
||||
innerJobs: [],
|
||||
loopJobs: []
|
||||
}
|
||||
loadJobInProgress()
|
||||
}
|
||||
}
|
||||
|
||||
let lastJobid = jobId
|
||||
|
||||
$: jobId && shouldReset()
|
||||
|
||||
async function loadJobInProgress() {
|
||||
const job = await JobService.getJob({
|
||||
workspace: $workspaceStore ?? '',
|
||||
@@ -124,5 +140,5 @@
|
||||
{/if}
|
||||
</div>
|
||||
{:else}
|
||||
Loading
|
||||
No script selected
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user