Skip to content

Commit d2e965c

Browse files
committed
Renamed "Restart workflow" to "Reset workflow"
1 parent 362a9c9 commit d2e965c

File tree

3 files changed

+30
-26
lines changed

3 files changed

+30
-26
lines changed

src/lib/components/v2/workflow/RunWorkflowModal.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@
526526
{:else if mode === 'continue'}
527527
Continue workflow
528528
{:else}
529-
Restart workflow
529+
Reset workflow
530530
{/if}
531531
</h5>
532532
{/snippet}
@@ -535,10 +535,10 @@
535535
<form id="runWorkflowForm">
536536
{#if mode === 'restart'}
537537
<div class="alert alert-warning">
538-
<strong>WARNING</strong>: Restarting a workflow will create a new dataset and optionally
539-
delete the old dataset with its image list, filters & history. It does not remove the
540-
existing Zarr data though. Either remove it yourself before rerunning or set the overwrite
541-
option to True in the corresponding tasks.
538+
<strong>WARNING</strong>: Restarting a workflow will reset your dataset and its processing
539+
history. It deletes the existing dataset and creates a new one. Thus, you should only
540+
restart a workflow if you don't need access anymore to the dataset and its processing
541+
history. Be aware that resetting the dataset will not remove the on-disk Zarr data though.
542542
</div>
543543
{/if}
544544
{#if mode === 'restart'}
@@ -600,7 +600,7 @@
600600
name="firstTaskIndex"
601601
id="firstTaskIndex"
602602
class="form-select"
603-
disabled={checkingConfiguration}
603+
disabled={checkingConfiguration || mode === 'restart'}
604604
bind:value={firstTaskIndex}
605605
onchange={firstTaskIndexChanged}
606606
class:is-invalid={mode === 'continue' && firstTaskIndex === undefined}

src/routes/v2/projects/[projectId]/workflows/[workflowId]/+page.svelte

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -742,22 +742,26 @@
742742
<i class="bi-play-fill"></i> Run workflow
743743
</button>
744744
{:else}
745-
<button
746-
class="btn btn-success"
747-
onclick={() => openRunWorkflowModal('continue')}
748-
type="button"
749-
disabled={workflow.task_list.length === 0}
750-
>
751-
<i class="bi-play-fill"></i> Continue workflow
752-
</button>
753-
<button
754-
class="btn btn-primary"
755-
onclick={() => openRunWorkflowModal('restart')}
756-
type="button"
757-
disabled={workflow.task_list.length === 0}
758-
>
759-
<i class="bi bi-arrow-clockwise"></i> Restart workflow
760-
</button>
745+
<div class="d-flex mb-2">
746+
<div>
747+
<button
748+
class="btn btn-success mb-1"
749+
onclick={() => openRunWorkflowModal('continue')}
750+
type="button"
751+
disabled={workflow.task_list.length === 0}
752+
>
753+
<i class="bi-play-fill"></i> Continue workflow
754+
</button>
755+
<button
756+
class="btn btn-warning ms-1 mb-1"
757+
onclick={() => openRunWorkflowModal('restart')}
758+
type="button"
759+
disabled={workflow.task_list.length === 0}
760+
>
761+
<i class="bi bi-exclamation-diamond"></i> Reset workflow
762+
</button>
763+
</div>
764+
</div>
761765
{/if}
762766
</div>
763767
</div>

tests/v2/run_mock_tasks.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ test('Run mock tasks [v2]', async ({ page, workflow }) => {
191191
fs.rmSync(`/tmp/playwright/datasets/${datasetName2}`, { recursive: true });
192192
});
193193

194-
await test.step('Restart the workflow replacing dataset', async () => {
195-
await page.getByRole('button', { name: 'Restart workflow' }).click();
194+
await test.step('Reset the workflow replacing dataset', async () => {
195+
await page.getByRole('button', { name: 'Reset workflow' }).click();
196196
const modal = page.locator('.modal.show');
197197
await modal.waitFor();
198198
await expect(
@@ -223,8 +223,8 @@ test('Run mock tasks [v2]', async ({ page, workflow }) => {
223223
fs.rmSync(`/tmp/playwright/datasets/${datasetName2}`, { recursive: true });
224224
});
225225

226-
await test.step('Restart the workflow creating a new dataset', async () => {
227-
await page.getByRole('button', { name: 'Restart workflow' }).click();
226+
await test.step('Reset the workflow creating a new dataset', async () => {
227+
await page.getByRole('button', { name: 'Reset workflow' }).click();
228228
const modal = page.locator('.modal.show');
229229
await modal.waitFor();
230230
await modal.getByRole('checkbox', { name: 'Replace existing dataset' }).uncheck();

0 commit comments

Comments
 (0)