File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
src/routes/v2/projects/[projectId]/workflows/[workflowId] Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 430430 /**
431431 * @param {'run'|'restart'|'continue'} action
432432 */
433- function openRunWorkflowModal (action ) {
433+ async function openRunWorkflowModal (action ) {
434434 if (argsSchemaForm? .hasUnsavedChanges ()) {
435435 toggleArgsUnsavedChangesModal ();
436436 } else if (inputFiltersTab? .hasUnsavedChanges ()) {
437437 toggleFiltersUnsavedChangesModal ();
438438 } else {
439439 runWorkflowModal .open (action);
440+ await reloadSelectedDataset ();
440441 }
441442 }
442443
557558 clearTimeout (statusWatcherTimer);
558559 statusWatcherTimer = setTimeout (loadJobsStatus, updateJobsInterval);
559560 } else {
561+ await reloadSelectedDataset ();
560562 selectedSubmittedJob = undefined ;
561563 }
562- loadJobError ();
564+ await loadJobError ();
565+ }
566+
567+ async function reloadSelectedDataset () {
568+ if (selectedDatasetId === undefined ) {
569+ return ;
570+ }
571+ const response = await fetch (` /api/v2/project/${ project .id } /dataset/${ selectedDatasetId} ` , {
572+ method: ' GET' ,
573+ credentials: ' include'
574+ });
575+ const result = await response .json ();
576+ if (! response .ok ) {
577+ console .error (result);
578+ return ;
579+ }
580+ datasets = datasets .map ((d ) => (d .id === selectedDatasetId ? result : d));
563581 }
564582
565583 async function loadJobError () {
You can’t perform that action at this time.
0 commit comments