Fix: SMART result of OMV should always from monitored devices (#2025)

pull/2030/head v0.6.34
Daniel Li 1 year ago committed by GitHub
parent ed0527a3da
commit 69ee459e8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,13 +3,13 @@ import Container from "components/services/widget/container";
import Block from "components/services/widget/block"; import Block from "components/services/widget/block";
const passedReduce = (acc, e) => { const passedReduce = (acc, e) => {
if (e.overallstatus === "GOOD") { if (e.monitor && e.overallstatus === "GOOD") {
return acc + 1; return acc + 1;
} }
return acc; return acc;
}; };
const failedReduce = (acc, e) => { const failedReduce = (acc, e) => {
if (e.overallstatus !== "GOOD") { if (e.monitor && e.overallstatus !== "GOOD") {
return acc + 1; return acc + 1;
} }
return acc; return acc;

Loading…
Cancel
Save