]> git.ipfire.org Git - oddments/collecty.git/commitdiff
interrupts: Fix graph title when showing a specific interrupt
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Sep 2020 14:42:50 +0000 (14:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Sep 2020 14:42:50 +0000 (14:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/collecty/plugins/interrupts.py

index bff704d0a45d8c181932f31a10cdd5233f9cec74..cc1ae50fc24c4b2ec526111916daeb3f22479316 100644 (file)
@@ -48,12 +48,17 @@ class GraphTemplateSystemInterrupts(base.GraphTemplate):
        @property
        def graph_title(self):
                _ = self.locale.translate
-               return _("System Interrupts")
+
+               if self.object.irq is None:
+                       return _("System Interrupts")
+
+               return _("Interrupt %s") % self.object.irq
 
        @property
        def graph_vertical_label(self):
                _ = self.locale.translate
-               return _("System Interrupts/s")
+
+               return _("Interrupts/s")
 
 
 class SystemInterruptObject(base.Object):