From: Michael Tremer Date: Mon, 21 Sep 2020 14:42:50 +0000 (+0000) Subject: interrupts: Fix graph title when showing a specific interrupt X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7c9f74ac929bad6a23506c0e05af8faf6d99d025;p=collecty.git interrupts: Fix graph title when showing a specific interrupt Signed-off-by: Michael Tremer --- diff --git a/src/collecty/plugins/interrupts.py b/src/collecty/plugins/interrupts.py index bff704d..cc1ae50 100644 --- a/src/collecty/plugins/interrupts.py +++ b/src/collecty/plugins/interrupts.py @@ -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):