]> git.ipfire.org Git - collecty.git/commitdiff
latency: Show "Default Gateway" in headline for gateway
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 21 Oct 2016 21:04:19 +0000 (23:04 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 21 Oct 2016 21:04:19 +0000 (23:04 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/collecty/plugins/latency.py

index 0ef70eb91a11818bb03877cb0de4b588cf2d9eb2..43ae475e51fc0d942b590a0f067486f6d6e9a668 100644 (file)
@@ -107,7 +107,13 @@ class GraphTemplateLatency(base.GraphTemplate):
        @property
        def graph_title(self):
                _ = self.locale.translate
        @property
        def graph_title(self):
                _ = self.locale.translate
-               return _("Latency to %s") % self.object.hostname
+
+               if self.object.hostname == "gateway":
+                       hostname = _("Default Gateway")
+               else:
+                       hostname = self.object.hostname
+
+               return _("Latency to %s") % hostname
 
        @property
        def graph_vertical_label(self):
 
        @property
        def graph_vertical_label(self):