From 1547e3063c7ed281de1f172fd24289f364c7412f Mon Sep 17 00:00:00 2001 From: libook Date: Tue, 19 Sep 2023 16:49:57 +0800 Subject: [PATCH] Fix: SMART result of OMV should always from monitored devices --- src/widgets/openmediavault/methods/smart_get_list.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/openmediavault/methods/smart_get_list.jsx b/src/widgets/openmediavault/methods/smart_get_list.jsx index 55a76db6..b8ca33ee 100644 --- a/src/widgets/openmediavault/methods/smart_get_list.jsx +++ b/src/widgets/openmediavault/methods/smart_get_list.jsx @@ -3,13 +3,13 @@ import Container from "components/services/widget/container"; import Block from "components/services/widget/block"; const passedReduce = (acc, e) => { - if (e.overallstatus === "GOOD") { + if (e.monitor && e.overallstatus === "GOOD") { return acc + 1; } return acc; }; const failedReduce = (acc, e) => { - if (e.overallstatus !== "GOOD") { + if (e.monitor && e.overallstatus !== "GOOD") { return acc + 1; } return acc;