Compare commits
No commits in common. "324240dd903b29cbfd24c37f2dbc46aac1d78b6f" and "284356228bc478104ee6e166b5fa27c203776937" have entirely different histories.
324240dd90
...
284356228b
@ -203,6 +203,7 @@ class SystemMetricPage {
|
|||||||
this.points = [];
|
this.points = [];
|
||||||
}
|
}
|
||||||
if (loading) loading.hidden = true;
|
if (loading) loading.hidden = true;
|
||||||
|
if (this.points.length === 0 && empty) empty.hidden = false;
|
||||||
this._renderChart();
|
this._renderChart();
|
||||||
this._renderStats();
|
this._renderStats();
|
||||||
this._renderFootMeta();
|
this._renderFootMeta();
|
||||||
@ -306,17 +307,7 @@ class SystemMetricPage {
|
|||||||
svg.setAttribute('viewBox', `0 0 ${W} ${H}`);
|
svg.setAttribute('viewBox', `0 0 ${W} ${H}`);
|
||||||
svg.setAttribute('width', W);
|
svg.setAttribute('width', W);
|
||||||
svg.setAttribute('height', H);
|
svg.setAttribute('height', H);
|
||||||
// Single source of truth for the empty overlay: it tracks whether we
|
if (!this.points.length) { svg.innerHTML = ''; return; }
|
||||||
// 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;
|
|
||||||
const padL = 64, padR = 24, padT = 18, padB = 36;
|
const padL = 64, padR = 24, padT = 18, padB = 36;
|
||||||
const innerW = Math.max(1, W - padL - padR);
|
const innerW = Math.max(1, W - padL - padR);
|
||||||
const innerH = Math.max(1, H - padT - padB);
|
const innerH = Math.max(1, H - padT - padB);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user