delay the first chart init at the end of the loop to avoid too many animations happening at once
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@
|
|||||||
/* chart inited */
|
/* chart inited */
|
||||||
&:has(.uplot) {
|
&:has(.uplot) {
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 200px; /* fallback for interpolate-size */
|
max-height: 180px; /* fallback for interpolate-size */
|
||||||
}
|
}
|
||||||
.uplot {
|
.uplot {
|
||||||
padding-bottom: var(--smSpacing);
|
padding-bottom: var(--smSpacing);
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ export function logsChart(logsSettings) {
|
|||||||
initChart(el, [timestamps, totals], logsSettings);
|
initChart(el, [timestamps, totals], logsSettings);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (!err?.isAbort) {
|
if (!err?.isAbort) {
|
||||||
|
clearTimeout(placeloderChartTimeoutId);
|
||||||
logsSettings.isChartLoading = false;
|
logsSettings.isChartLoading = false;
|
||||||
// only log to avoid showing multiple errors with the logs listing
|
// only log to avoid showing multiple errors with the logs listing
|
||||||
// app.checkApiError(err)
|
// app.checkApiError(err)
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ export function logsList(logsSettings) {
|
|||||||
logsSettings.hasListItems = data.logs.length > 0;
|
logsSettings.hasListItems = data.logs.length > 0;
|
||||||
|
|
||||||
if (!logsSettings.isFirstLoadReady) {
|
if (!logsSettings.isFirstLoadReady) {
|
||||||
|
await new Promise((r) => setTimeout(r, 0));
|
||||||
logsSettings.isFirstLoadReady = true;
|
logsSettings.isFirstLoadReady = true;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user