diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-07-24 14:10:48 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-07-24 14:10:48 +0200 |
commit | cdcc681d43f964120fb5ffac537cec5ef47defe7 (patch) | |
tree | b7ba52ef50c5db14330e8a35679242a87028c2d2 | |
parent | 92f2d44f4277a2690f3990d06971c9ec81ec1a78 (diff) | |
download | qos-cdcc681d43f964120fb5ffac537cec5ef47defe7.tar.gz qos-cdcc681d43f964120fb5ffac537cec5ef47defe7.tar.xz |
Change color of speed to white for 0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | qos.pl | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -60,6 +60,7 @@ my %bwthresh = ( crit => 80, ); my %bwcolors = ( + none => "white", ok => "green", warn => "rgb531", crit => "red", @@ -126,7 +127,9 @@ sub format_rate_color { if ($colored_rates) { $relrate = $bytes/128 * 100.00 / $bandwidth{$direction}; - if ($relrate >= $bwthresh{crit}) { + if ($relrate == 0) { + $color = $bwcolors{none}; + } elsif ($relrate >= $bwthresh{crit}) { $color = $bwcolors{crit}; } elsif ($relrate >= $bwthresh{warn}) { $color = $bwcolors{warn}; |