]> git.ipfire.org Git - collecty.git/blobdiff - src/collecty/plugins/latency.py
graph templates: Make some atttibutes easier to set
[collecty.git] / src / collecty / plugins / latency.py
index 589afa8b81fed234f46f32e80e6b7cf2580ad352..a6db8d0bd29bb9d56132020eb79a691518007b15 100644 (file)
@@ -32,6 +32,8 @@ PING_HOSTS = [
 class GraphTemplateLatency(base.GraphTemplate):
        name = "latency"
 
+       lower_limit = 0
+
        @property
        def rrd_graph(self):
                return [
@@ -73,13 +75,12 @@ class GraphTemplateLatency(base.GraphTemplate):
                ]
 
        @property
-       def rrd_graph_args(self):
-               return [
-                       "--title", _("Latency to %(host)s"),
-                       "--vertical-label", _("Milliseconds"),
+       def graph_title(self):
+               return _("Latency to %(host)s")
 
-                       "--lower-limit", "0", "--rigid",
-               ]
+       @property
+       def graph_vertical_label(self):
+               return _("Milliseconds")
 
 
 class LatencyObject(base.Object):