From a0c6d47a60b44a1dfc647a6fa12877063a1ea11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Bj=C3=B8rnstad?= Date: Thu, 12 Dec 2024 13:49:11 +0100 Subject: [PATCH] Refactor overage table calculation to use $effect and untrack for improved reactivity in utilization page Co-authored-by: frodesundby --- src/routes/utilization/+page.svelte | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/routes/utilization/+page.svelte b/src/routes/utilization/+page.svelte index 4e6e578b..fbfc2f6a 100644 --- a/src/routes/utilization/+page.svelte +++ b/src/routes/utilization/+page.svelte @@ -1,6 +1,4 @@ @@ -404,19 +405,21 @@ {overage.team} - {overage.unusedCpu.toLocaleString('en-GB', { + + {overage.unusedCpu.toLocaleString('en-GB', { minimumFractionDigits: 2, maximumFractionDigits: 2 - })} + })} + {prettyBytes(overage.unusedMem)} {:else} -

No overage data for tenant.

+ + No overage data for tenant. + {/each}