From 7c9f74ac929bad6a23506c0e05af8faf6d99d025 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 21 Sep 2020 14:42:50 +0000 Subject: [PATCH] interrupts: Fix graph title when showing a specific interrupt Signed-off-by: Michael Tremer --- src/collecty/plugins/interrupts.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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): -- 2.47.2