1
0
forked from wrenn/wrenn

fix: fetch sandbox metrics immediately on page load

Metrics data was only fetched after Chart.js dynamic import completed,
leaving graphs empty until the first poll interval fired. Now
loadMetrics() runs in parallel with the Chart.js import, and
initCharts() resets the dedup key so pre-fetched data populates
newly created chart instances.
This commit is contained in:
2026-05-03 16:43:26 +06:00
parent 021d709de2
commit 1244c08e42
2 changed files with 4 additions and 0 deletions

View File

@ -333,6 +333,7 @@
},
});
lastDataKey = '';
updateCharts();
}
@ -376,6 +377,7 @@
if (!metricsAvailable) return;
loadMetrics();
const mod = await import('chart.js/auto');
ChartJS = mod.Chart;