diff --git a/src/components/services/Scrutiny.vue b/src/components/services/Scrutiny.vue index 17721ca..e01bad2 100644 --- a/src/components/services/Scrutiny.vue +++ b/src/components/services/Scrutiny.vue @@ -50,17 +50,22 @@ export default { fetchSummary: function () { this.fetch(`/api/summary`) .then((scrutinyData) => { - const devices = Object.values(scrutinyData.data.summary); + const devices = Object.values(scrutinyData.data.summary); + const availableDevices = devices.filter( + (device) => + device.device.archived === false && + !device.device.DeletedAt + ); this.passed = - devices.filter((device) => device.device.device_status === 0) - ?.length || 0; + availableDevices.filter( + (device) => + device.device.device_status === 0)?.length || 0; this.failed = - devices.filter( + availableDevices.filter( (device) => device.device.device_status > 0 && - device.device.device_status <= 3, - )?.length || 0; - this.unknown = devices.length - (this.passed + this.failed) || 0; + device.device.device_status <= 3)?.length || 0; + this.unknown = availableDevices.length - (this.passed + this.failed) || 0; }) .catch((e) => { console.error(e);