From 18cac8ba5d916c57de0f7121902371d7a18a2bf4 Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:31:06 +0000 Subject: [PATCH] show more detail in checks tab #2014 --- api/tacticalrmm/checks/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/tacticalrmm/checks/models.py b/api/tacticalrmm/checks/models.py index e6fe3bd6..a74187dd 100644 --- a/api/tacticalrmm/checks/models.py +++ b/api/tacticalrmm/checks/models.py @@ -365,9 +365,11 @@ class CheckResult(models.Model): if len(self.history) > 15: self.history = self.history[-15:] - update_fields.extend(["history"]) + update_fields.extend(["history", "more_info"]) avg = int(mean(self.history)) + txt = "Memory Usage" if check.check_type == CheckType.MEMORY else "CPU Load" + self.more_info = f"Average {txt}: {avg}%" if check.error_threshold and avg > check.error_threshold: self.status = CheckStatus.FAILING