From 17628e554c8e7b42c984c291e8afef2c36ecdf3e Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Wed, 29 Jul 2026 21:55:39 +0300 Subject: [PATCH] delay the first chart init at the end of the loop to avoid too many animations happening at once --- ui/src/css/logs.css | 2 +- ui/src/logs/logsChart.js | 1 + ui/src/logs/logsList.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/css/logs.css b/ui/src/css/logs.css index 0879eb79..c78596ff 100644 --- a/ui/src/css/logs.css +++ b/ui/src/css/logs.css @@ -42,7 +42,7 @@ /* chart inited */ &:has(.uplot) { height: auto; - max-height: 200px; /* fallback for interpolate-size */ + max-height: 180px; /* fallback for interpolate-size */ } .uplot { padding-bottom: var(--smSpacing); diff --git a/ui/src/logs/logsChart.js b/ui/src/logs/logsChart.js index bd46f7bd..bf89b70f 100644 --- a/ui/src/logs/logsChart.js +++ b/ui/src/logs/logsChart.js @@ -71,6 +71,7 @@ export function logsChart(logsSettings) { initChart(el, [timestamps, totals], logsSettings); } catch (err) { if (!err?.isAbort) { + clearTimeout(placeloderChartTimeoutId); logsSettings.isChartLoading = false; // only log to avoid showing multiple errors with the logs listing // app.checkApiError(err) diff --git a/ui/src/logs/logsList.js b/ui/src/logs/logsList.js index 0e935906..742277f8 100644 --- a/ui/src/logs/logsList.js +++ b/ui/src/logs/logsList.js @@ -92,6 +92,7 @@ export function logsList(logsSettings) { logsSettings.hasListItems = data.logs.length > 0; if (!logsSettings.isFirstLoadReady) { + await new Promise((r) => setTimeout(r, 0)); logsSettings.isFirstLoadReady = true; } } catch (err) {