Header verdict is status only (LOST/CORRUPT/LINK/INTERNAL, no count — counts live in the rows); drawHeader drops the view param

This commit is contained in:
flamingcow
2026-08-17 21:50:43 -07:00
parent 4df30912b1
commit 8eab224472
+7 -8
View File
@@ -353,18 +353,17 @@ func (d *display) heatCell(rowY, k int, c rgb) {
d.fb.roundRect(x, rowY+(d.rowH-d.cellH)/2, d.cellW, d.cellH, d.cellR, c)
}
// The verdict names the newest thing wrong at any horizon: the cable's own
// fault first, then the most recent traffic fault with its age, and only a
// clean record reads GOOD. While a measure runs the tester is asserting
// nothing, and says so instead of GOOD.
func (d *display) drawHeader(v view, phy phyDisplay, hv histView, measuring bool,
// The verdict names the newest thing wrong at any horizon — status only, the
// counts live in the rows: the cable's own fault first, then the most recent
// traffic fault with its age, and only a clean record reads GOOD. While a
// measure runs the tester is asserting nothing, and says so instead of GOOD.
func (d *display) drawHeader(phy phyDisplay, hv histView, measuring bool,
now time.Time) {
good := true
word, sub := "GOOD", []seg{{d.text, "no faults", uiInk2}}
if i, age, ok := hv.newestFault(now); ok {
good = false
word = scalePanelCount(faultClasses[i].get(v.since)) + " " +
strings.ToUpper(faultClasses[i].label)
word = strings.ToUpper(faultClasses[i].label)
sub = []seg{
{d.text, "last " + faultClasses[i].noun + " ", uiInk2},
{d.textB, scaleTime(age) + " ago", uiInk},
@@ -559,7 +558,7 @@ func (d *display) render(v view, elapsed time.Duration, phy phyDisplay,
fb := d.fb
fb.fill(uiBg)
d.drawHeader(v, phy, hv, measuring, time.Now())
d.drawHeader(phy, hv, measuring, time.Now())
d.hairline(d.headerH - 1)
d.drawColHeaders()
d.drawRows(v, phy, measuring, hv, target)