mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
cpu color: make threshold upper: > 70% warn and > 90% is danger
This commit is contained in:
@@ -100,10 +100,10 @@ func (w *GaugeCol) UnHighlight() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func colorScale(n int) ui.Attribute {
|
func colorScale(n int) ui.Attribute {
|
||||||
if n <= 30 {
|
if n <= 70 {
|
||||||
return ui.ThemeAttr("status.ok")
|
return ui.ThemeAttr("status.ok")
|
||||||
}
|
}
|
||||||
if n <= 70 {
|
if n <= 90 {
|
||||||
return ui.ThemeAttr("status.warn")
|
return ui.ThemeAttr("status.warn")
|
||||||
}
|
}
|
||||||
return ui.ThemeAttr("status.danger")
|
return ui.ThemeAttr("status.danger")
|
||||||
|
|||||||
Reference in New Issue
Block a user