Merge pull request #239 from stokito/cpu_color

CPU upper: > 70% yellow/warn and > 90% is red/danger
This commit is contained in:
bradley 2021-06-10 22:04:54 -04:00 committed by GitHub
commit 82e731e577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -100,11 +100,11 @@ func (w *GaugeCol) UnHighlight() {
} }
func colorScale(n int) ui.Attribute { func colorScale(n int) ui.Attribute {
if n > 70 { if n <= 70 {
return ui.ThemeAttr("status.danger") return ui.ThemeAttr("status.ok")
} }
if n > 30 { if n <= 90 {
return ui.ThemeAttr("status.warn") return ui.ThemeAttr("status.warn")
} }
return ui.ThemeAttr("status.ok") return ui.ThemeAttr("status.danger")
} }