From f7a51d107753f315294dd5fc8c7745801ee49a1a Mon Sep 17 00:00:00 2001 From: Rune Harlyk Date: Thu, 2 May 2024 18:31:15 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=88=20Updates=20cpu=20chart=20scale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/metrics/SystemMetrics.svelte | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/app/src/routes/system/metrics/SystemMetrics.svelte b/app/src/routes/system/metrics/SystemMetrics.svelte index 1a5b85c..e819964 100644 --- a/app/src/routes/system/metrics/SystemMetrics.svelte +++ b/app/src/routes/system/metrics/SystemMetrics.svelte @@ -95,7 +95,7 @@ }, position: 'left', min: 0, - max: Math.round($analytics.total_heap[0]), + max: 100, grid: { color: daisyColor('--bc', 10) }, ticks: { color: daisyColor('--bc') @@ -333,33 +333,6 @@ temperatureChart.data.datasets[0].data = $analytics.core_temp; temperatureChart.update('none'); } - - function convertSeconds(seconds: number) { - // Calculate the number of seconds, minutes, hours, and days - let minutes = Math.floor(seconds / 60); - let hours = Math.floor(minutes / 60); - let days = Math.floor(hours / 24); - - // Calculate the remaining hours, minutes, and seconds - hours = hours % 24; - minutes = minutes % 60; - seconds = seconds % 60; - - // Create the formatted string - let result = ''; - if (days > 0) { - result += days + ' day' + (days > 1 ? 's' : '') + ' '; - } - if (hours > 0) { - result += hours + ' hour' + (hours > 1 ? 's' : '') + ' '; - } - if (minutes > 0) { - result += minutes + ' minute' + (minutes > 1 ? 's' : '') + ' '; - } - result += seconds + ' second' + (seconds > 1 ? 's' : ''); - - return result; - }