ping/package loss is white if not in warning or crit range

This commit is contained in:
2023-04-14 20:05:15 +02:00
parent eb8766fd00
commit 2223b77461

View File

@@ -25,7 +25,7 @@ func formatLine(stats *probing.Statistics) {
switch { switch {
case stats.AvgRtt.Milliseconds() < 50: case stats.AvgRtt.Milliseconds() < 50:
rttColor = "%{F#3cb703}" rttColor = "%{F-}"
case stats.AvgRtt.Milliseconds() < 100: case stats.AvgRtt.Milliseconds() < 100:
rttColor = "%{F#e87205}" rttColor = "%{F#e87205}"
default: default:
@@ -34,7 +34,7 @@ func formatLine(stats *probing.Statistics) {
switch { switch {
case stats.PacketLoss == 0: case stats.PacketLoss == 0:
packetColor = "%{F#3cb703}" packetColor = "%{F-}"
case stats.PacketLoss < 10: case stats.PacketLoss < 10:
packetColor = "%{F#f9dd04}" packetColor = "%{F#f9dd04}"
case stats.PacketLoss < 25: case stats.PacketLoss < 25: