Compare commits

..

No commits in common. "324240dd903b29cbfd24c37f2dbc46aac1d78b6f" and "284356228bc478104ee6e166b5fa27c203776937" have entirely different histories.

View File

@ -203,6 +203,7 @@ class SystemMetricPage {
this.points = [];
}
if (loading) loading.hidden = true;
if (this.points.length === 0 && empty) empty.hidden = false;
this._renderChart();
this._renderStats();
this._renderFootMeta();
@ -306,17 +307,7 @@ class SystemMetricPage {
svg.setAttribute('viewBox', `0 0 ${W} ${H}`);
svg.setAttribute('width', W);
svg.setAttribute('height', H);
// Single source of truth for the empty overlay: it tracks whether we
// actually have points. Without this the "no samples" message, shown
// by _loadRange when history came back empty, never cleared once live
// ticks started filling the chart + stats — a confusing contradiction.
const empty = root.querySelector('.sys-detail-empty');
if (!this.points.length) {
svg.innerHTML = '';
if (empty) empty.hidden = false;
return;
}
if (empty) empty.hidden = true;
if (!this.points.length) { svg.innerHTML = ''; return; }
const padL = 64, padR = 24, padT = 18, padB = 36;
const innerW = Math.max(1, W - padL - padR);
const innerH = Math.max(1, H - padT - padB);