|
27 | 27 | /** @type {Modal} */ |
28 | 28 | let modal; |
29 | 29 |
|
| 30 | + /** @type {DatasetImagesTable|undefined} */ |
| 31 | + let datasetImagesTable; |
| 32 | +
|
30 | 33 | let applyingWorkflow = false; |
31 | 34 | let checkingConfiguration = false; |
32 | 35 | let setSlurmAccount = true; |
|
209 | 212 | let appliedTypeFilters = {}; |
210 | 213 |
|
211 | 214 | function showConfirmRun() { |
212 | | - checkingConfiguration = true; |
213 | 215 | const wft = workflow.task_list[firstTaskIndex || 0]; |
214 | 216 | if (mode === 'restart') { |
215 | 217 | appliedAttributeFilters = { ...selectedDataset?.attribute_filters }; |
|
218 | 220 | const dataset = /** @type {import('fractal-components/types/api').DatasetV2} */ ( |
219 | 221 | selectedDataset |
220 | 222 | ); |
221 | | - appliedAttributeFilters = { ...dataset.attribute_filters }; |
| 223 | + if (datasetImagesTable) { |
| 224 | + appliedAttributeFilters = datasetImagesTable.getAttributeFilters(); |
| 225 | + } else { |
| 226 | + appliedAttributeFilters = { ...dataset.attribute_filters }; |
| 227 | + } |
222 | 228 | appliedTypeFilters = { ...dataset.type_filters, ...wft.type_filters }; |
223 | 229 | } |
| 230 | + checkingConfiguration = true; |
224 | 231 | } |
225 | 232 |
|
226 | 233 | function computeNewDatasetName() { |
|
478 | 485 | </div> |
479 | 486 | </div> |
480 | 487 | </div> |
481 | | - {#if selectedDataset && imagePage && imagePage.images.length > 0 && firstTaskIndex !== undefined} |
| 488 | + {#if selectedDataset && imagePage && imagePage.images.length > 0 && firstTaskIndex !== undefined && mode !== 'restart'} |
482 | 489 | <div class="accordion-item"> |
483 | 490 | <h2 class="accordion-header"> |
484 | 491 | <button |
|
498 | 505 | data-bs-parent="#accordion-run-workflow" |
499 | 506 | > |
500 | 507 | <div class="accordion-body"> |
501 | | - <DatasetImagesTable |
502 | | - dataset={selectedDataset} |
503 | | - {imagePage} |
504 | | - {initialFilterValues} |
505 | | - {attributeFiltersEnabled} |
506 | | - useDatasetFilters={false} |
507 | | - vizarrViewerUrl={null} |
508 | | - runWorkflowModal={true} |
509 | | - /> |
| 508 | + {#if checkingConfiguration} |
| 509 | + This job will process {imagePage.total_count} |
| 510 | + {imagePage.total_count === 1 ? 'image' : 'images'}. |
| 511 | + {:else} |
| 512 | + <DatasetImagesTable |
| 513 | + bind:this={datasetImagesTable} |
| 514 | + dataset={selectedDataset} |
| 515 | + bind:imagePage |
| 516 | + {initialFilterValues} |
| 517 | + {attributeFiltersEnabled} |
| 518 | + useDatasetFilters={false} |
| 519 | + vizarrViewerUrl={null} |
| 520 | + runWorkflowModal={true} |
| 521 | + /> |
| 522 | + {/if} |
510 | 523 | </div> |
511 | 524 | </div> |
512 | 525 | </div> |
|
0 commit comments