diff --git a/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte index a3c9f40adb..ac68691c76 100644 --- a/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte @@ -22,6 +22,7 @@ import MobileFilters from '$lib/components/runs/MobileFilters.svelte' import Toggle from '$lib/components/Toggle.svelte' import ConfirmationModal from '$lib/components/common/confirmationModal/ConfirmationModal.svelte' + import { tweened, type Tweened } from 'svelte/motion' let jobs: Job[] | undefined let intervalId: NodeJS.Timer | undefined @@ -44,7 +45,7 @@ let nbOfJobs = 100 - let queue_count: undefined | number = undefined + let queue_count: Tweened | undefined = undefined $: path = $page.params.path $: jobKindsCat = $page.url.searchParams.get('job_kinds') ?? 'runs' @@ -102,7 +103,12 @@ } async function getCount() { - queue_count = (await JobService.getQueueCount({ workspace: $workspaceStore! })).database_length + const qc = (await JobService.getQueueCount({ workspace: $workspaceStore! })).database_length + if (queue_count) { + queue_count.set(qc) + } else { + queue_count = tweened(qc, { duration: 1000 }) + } } async function syncer() { getCount() @@ -372,7 +378,7 @@
Jobs Running or Queued
-
{queue_count ?? '...'}
+
{queue_count ? ($queue_count ?? 0).toFixed(0) : '...'}