mirror of https://github.com/divan/expvarmon.git
Single UI tweak
This commit is contained in:
parent
9b291c4cba
commit
1118a04707
|
@ -82,15 +82,16 @@ func (t *TermUISingle) Update(data UIData) {
|
||||||
|
|
||||||
// Sparklines
|
// Sparklines
|
||||||
for i, name := range data.Vars {
|
for i, name := range data.Vars {
|
||||||
if name.Kind() == KindString {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
spl := &t.Sparkline.Lines[i]
|
spl := &t.Sparkline.Lines[i]
|
||||||
|
|
||||||
max := formatMax(service.Max(name))
|
max := formatMax(service.Max(name))
|
||||||
spl.Title = fmt.Sprintf("%s: %v%s", name.Long(), service.Value(name), max)
|
spl.Title = fmt.Sprintf("%s: %v%s", name.Long(), service.Value(name), max)
|
||||||
spl.TitleColor = colorByKind(name.Kind())
|
spl.TitleColor = colorByKind(name.Kind())
|
||||||
spl.LineColor = colorByKind(name.Kind())
|
spl.LineColor = colorByKind(name.Kind())
|
||||||
|
|
||||||
|
if name.Kind() == KindString {
|
||||||
|
continue
|
||||||
|
}
|
||||||
spl.Data = service.Values(name)
|
spl.Data = service.Values(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue