]> git.ipfire.org Git - collecty.git/blobdiff - src/collecty/plugins/interface.py
graph templates: Make some atttibutes easier to set
[collecty.git] / src / collecty / plugins / interface.py
index 4ab5f01ac7e198817f2da4f4385e8c9544090252..3ad6e8b0137062afe1008be9471ec18ddbea629f 100644 (file)
@@ -82,11 +82,12 @@ class GraphTemplateInterfaceBits(base.GraphTemplate):
                ]
 
        @property
-       def rrd_graph_args(self):
-               return [
-                       "--title", _("Bandwidth usage on %(interface)s"),
-                       "--vertical-label", _("Bit/s"),
-               ]
+       def graph_title(self):
+               return _("Bandwidth usage on %(interface)s")
+
+       @property
+       def graph_vertical_label(self):
+               return _("Bit/s")
 
 
 class GraphTemplateInterfacePackets(base.GraphTemplate):
@@ -122,11 +123,12 @@ class GraphTemplateInterfacePackets(base.GraphTemplate):
                ]
 
        @property
-       def rrd_graph_args(self):
-               return [
-                       "--title", _("Transferred packets on %(interface)s"),
-                       "--vertical-label", _("Packets/s"),
-               ]
+       def graph_title(self):
+               return _("Transferred packets on %(interface)s")
+
+       @property
+       def graph_vertical_label(self):
+               return _("Packets/s")
 
 
 class GraphTemplateInterfaceErrors(base.GraphTemplate):
@@ -190,11 +192,12 @@ class GraphTemplateInterfaceErrors(base.GraphTemplate):
                ]
 
        @property
-       def rrd_graph_args(self):
-               return [
-                       "--title", _("Errors/dropped packets on %(interface)s"),
-                       "--vertical-label", _("Packets/s"),
-               ]
+       def graph_title(self):
+               return _("Errors/dropped packets on %(interface)s")
+
+       @property
+       def graph_vertical_label(self):
+               return _("Packets/s")
 
 
 class InterfaceObject(base.Object):