diff --git a/js-packages/web-console/src/lib/components/pipelines/editor/performance/TransactionStatus.svelte b/js-packages/web-console/src/lib/components/pipelines/editor/performance/TransactionStatus.svelte index ed8e295269..44afb22497 100644 --- a/js-packages/web-console/src/lib/components/pipelines/editor/performance/TransactionStatus.svelte +++ b/js-packages/web-console/src/lib/components/pipelines/editor/performance/TransactionStatus.svelte @@ -10,6 +10,7 @@ const global = $derived(metrics.current.global) const transactionStatus = $derived(global.transaction_status) const commitProgress = $derived(global.commit_progress) + const transactionId = $derived(global.transaction_id) const total = $derived( commitProgress @@ -32,18 +33,36 @@ ? ((commitProgress.completed + commitProgress.in_progress * inProgressFraction) / total) * 100 : null ) + + // Disable the smooth progress bar transition when the transaction changes so + // the bar jumps immediately to the new value rather than animating. + let disableTransition = $state(false) + let prevTransactionId = transactionId + + $effect(() => { + const currentId = transactionId + if (currentId !== prevTransactionId) { + prevTransactionId = currentId + disableTransition = true + requestAnimationFrame(() => { + disableTransition = false + }) + } + }) {#if transactionStatus !== 'NoTransaction'}
-
+
Transaction status
-
+
+
{#if transactionStatus === 'TransactionInProgress'}
Started
{:else if transactionStatus === 'CommitInProgress'}
Committing
{/if} +
ID:{transactionId}
@@ -66,13 +85,17 @@
- +