From 69ee459e8acc1eca05c1ae05eb0e505be18e9dd7 Mon Sep 17 00:00:00 2001 From: Daniel Li Date: Tue, 19 Sep 2023 23:46:16 +0800 Subject: [PATCH] Fix: SMART result of OMV should always from monitored devices (#2025) --- 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 55a76db67..b8ca33ee5 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;