]> git.ipfire.org Git - collecty.git/blobdiff - src/collecty/plugins/latency.py
latency: Show "Default Gateway" in headline for gateway
[collecty.git] / 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
-               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):