diff --git a/src/lib/components/schedule/schedule-form-view.svelte b/src/lib/components/schedule/schedule-form-view.svelte index 6a8d3eeb7..bbac0b78b 100644 --- a/src/lib/components/schedule/schedule-form-view.svelte +++ b/src/lib/components/schedule/schedule-form-view.svelte @@ -116,7 +116,7 @@ {#if $loading} {:else} - + {backTitle} diff --git a/src/lib/components/schedule/schedule-recent-runs.svelte b/src/lib/components/schedule/schedule-recent-runs.svelte index 9cd8404fc..ccaa540f1 100644 --- a/src/lib/components/schedule/schedule-recent-runs.svelte +++ b/src/lib/components/schedule/schedule-recent-runs.svelte @@ -1,4 +1,6 @@ - {translate('schedules.recent-runs')} + + {translate('schedules.recent-runs')} + { + goto( + routeForWorkflowsWithQuery({ + namespace, + query: workflowQuery, + }), + ); + }} + > + {translate('common.view-all-runs')} + + {#each sortRecentRuns(recentRuns) as run (run?.startWorkflowResult?.workflowId)} {#await fetchWorkflowForSchedule({ namespace, workflowId: decodeURIForSvelte(run.startWorkflowResult.workflowId), runId: run.startWorkflowResult.runId }, fetch) then workflow} diff --git a/src/lib/components/workflow/workflow-count-status.svelte b/src/lib/components/workflow/workflow-count-status.svelte index 79c662a32..9485f5065 100644 --- a/src/lib/components/workflow/workflow-count-status.svelte +++ b/src/lib/components/workflow/workflow-count-status.svelte @@ -1,5 +1,4 @@ ; let attempt = 1; + let loading = false; const initialIntervalSeconds = 5; const maxAttempts = 100; @@ -51,6 +48,7 @@ newStatusGroups = []; $workflowCount.newCount = 0; attempt = 1; + loading = true; }; const getStatusAndCountOfGroup = (groups = []) => { @@ -77,6 +75,8 @@ newStatusGroups = getStatusAndCountOfGroup(groups); } catch (e) { console.error('Fetching workflow counts failed: ', e?.message); + } finally { + loading = false; } }; @@ -98,6 +98,8 @@ statusGroups = getStatusAndCountOfGroup(groups); } catch (e) { console.error('Fetching workflow counts failed: ', e?.message); + } finally { + loading = false; } }; @@ -106,7 +108,7 @@ {#each statusGroups as { count, status } (status)} - {#if !$loading && !$updating} + {#if !loading} { - scheduleFetch = fetchSchedule(parameters, fetch); + scheduleFetch = fetchSchedule(parameters); triggerConfirmationModalOpen = false; triggerLoading = false; }, 1000); @@ -154,7 +160,7 @@ {#await scheduleFetch} - + { goto(routeForSchedules({ namespace })); @@ -163,10 +169,7 @@ > {translate('schedules.back-to-schedules')} - + {scheduleId} @@ -189,7 +192,7 @@ > {translate('schedules.back-to-schedules')} - + {scheduleId} @@ -260,11 +263,39 @@ {/if} + {#if $groupByCountEnabled} + + + {$workflowCount.count.toLocaleString()} + + + { + scheduleFetch = fetchSchedule(parameters); + $refresh = Date.now(); + }} + > + {#if $workflowCount.newCount > 0} + +{$workflowCount.newCount.toLocaleString()} + {/if} + + + + + {/if} {$workflowCount.count.toLocaleString()} - + {:else} {/if}
@@ -189,7 +192,7 @@ > {translate('schedules.back-to-schedules')} -