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:
@@ -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)
|
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
|
// The verdict names the newest thing wrong at any horizon — status only, the
|
||||||
// fault first, then the most recent traffic fault with its age, and only a
|
// counts live in the rows: the cable's own fault first, then the most recent
|
||||||
// clean record reads GOOD. While a measure runs the tester is asserting
|
// traffic fault with its age, and only a clean record reads GOOD. While a
|
||||||
// nothing, and says so instead of GOOD.
|
// 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,
|
func (d *display) drawHeader(phy phyDisplay, hv histView, measuring bool,
|
||||||
now time.Time) {
|
now time.Time) {
|
||||||
good := true
|
good := true
|
||||||
word, sub := "GOOD", []seg{{d.text, "no faults", uiInk2}}
|
word, sub := "GOOD", []seg{{d.text, "no faults", uiInk2}}
|
||||||
if i, age, ok := hv.newestFault(now); ok {
|
if i, age, ok := hv.newestFault(now); ok {
|
||||||
good = false
|
good = false
|
||||||
word = scalePanelCount(faultClasses[i].get(v.since)) + " " +
|
word = strings.ToUpper(faultClasses[i].label)
|
||||||
strings.ToUpper(faultClasses[i].label)
|
|
||||||
sub = []seg{
|
sub = []seg{
|
||||||
{d.text, "last " + faultClasses[i].noun + " ", uiInk2},
|
{d.text, "last " + faultClasses[i].noun + " ", uiInk2},
|
||||||
{d.textB, scaleTime(age) + " ago", uiInk},
|
{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 := d.fb
|
||||||
fb.fill(uiBg)
|
fb.fill(uiBg)
|
||||||
|
|
||||||
d.drawHeader(v, phy, hv, measuring, time.Now())
|
d.drawHeader(phy, hv, measuring, time.Now())
|
||||||
d.hairline(d.headerH - 1)
|
d.hairline(d.headerH - 1)
|
||||||
d.drawColHeaders()
|
d.drawColHeaders()
|
||||||
d.drawRows(v, phy, measuring, hv, target)
|
d.drawRows(v, phy, measuring, hv, target)
|
||||||
|
|||||||
Reference in New Issue
Block a user