]> git.ipfire.org Git - collecty.git/commitdiff
latency: Don't show full packet loss in background
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 26 Oct 2015 13:26:22 +0000 (14:26 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 26 Oct 2015 13:26:22 +0000 (14:26 +0100)
If a system has no connectivity to either IPv6 or IPv4 the background
will turn dark because 100% packet loss is detected.

We will now only paint the background dark for packet loss up to
99% and for 100% packet loss the line will not be continued so that
this is easily readable, too.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/collecty/plugins/latency.py

index a219240fbfd3eb4a955867244d1f7559096ef1e8..127ff809acdcbbe606404e7ed760c873573b6f4c 100644 (file)
@@ -59,7 +59,7 @@ class GraphTemplateLatency(base.GraphTemplate):
                        "CDEF:l010=ploss,5,10,LIMIT,UN,UNKN,INF,IF",
                        "CDEF:l025=ploss,10,25,LIMIT,UN,UNKN,INF,IF",
                        "CDEF:l050=ploss,25,50,LIMIT,UN,UNKN,INF,IF",
-                       "CDEF:l100=ploss,50,100,LIMIT,UN,UNKN,INF,IF",
+                       "CDEF:l099=ploss,50,99,LIMIT,UN,UNKN,INF,IF",
 
                        "VDEF:latency6min=latency6,MINIMUM",
                        "VDEF:latency6max=latency6,MAXIMUM",
@@ -76,7 +76,7 @@ class GraphTemplateLatency(base.GraphTemplate):
                        "AREA:l010#cccccc:%s" % _("5-10%%"),
                        "AREA:l025#999999:%s" % _("10-25%%"),
                        "AREA:l050#666666:%s" % _("25-50%%"),
-                       "AREA:l100#333333:%s" % _("50-100%%") + "\\r",
+                       "AREA:l099#333333:%s" % _("50-99%%") + "\\r",
 
                        "COMMENT: \\n", # empty line