From 0ce5311b5fb7f64d69d55894da345163175f8d6b Mon Sep 17 00:00:00 2001 From: Niklas Date: Mon, 5 Dec 2022 08:13:41 +0100 Subject: [PATCH] fix lint errors --- src/widgets/scrutiny/component.jsx | 39 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/widgets/scrutiny/component.jsx b/src/widgets/scrutiny/component.jsx index 707a991fb..0f769d9fd 100644 --- a/src/widgets/scrutiny/component.jsx +++ b/src/widgets/scrutiny/component.jsx @@ -2,26 +2,26 @@ import Container from "components/services/widget/container"; import Block from "components/services/widget/block"; import useWidgetAPI from "utils/proxy/use-widget-api"; -export default function Component({ service }) { - // @see https://github.com/AnalogJ/scrutiny/blob/d8d56f77f9e868127c4849dac74d65512db658e8/webapp/frontend/src/app/shared/device-status.pipe.ts - const DeviceStatus = { - passed: 0, - failed_smart: 1, - failed_scrutiny: 2, - failed_both: 3, +// @see https://github.com/AnalogJ/scrutiny/blob/d8d56f77f9e868127c4849dac74d65512db658e8/webapp/frontend/src/app/shared/device-status.pipe.ts +const DeviceStatus = { + passed: 0, + failed_smart: 1, + failed_scrutiny: 2, + failed_both: 3, - isFailed: function ( s ) { return s > this.passed && s <= this.failed_both}, - isUnknown: function ( s ) { return s < this.passed || s > this.failed_both} - } - - // @see https://github.com/AnalogJ/scrutiny/blob/d8d56f77f9e868127c4849dac74d65512db658e8/webapp/frontend/src/app/core/config/app.config.ts - const DeviceStatusThreshold = { - smart: 1, - scrutiny: 2, - both: 3 - } - + isFailed(s){ return s > this.passed && s <= this.failed_both}, + isUnknown(s){ return s < this.passed || s > this.failed_both} +} + +// @see https://github.com/AnalogJ/scrutiny/blob/d8d56f77f9e868127c4849dac74d65512db658e8/webapp/frontend/src/app/core/config/app.config.ts +const DeviceStatusThreshold = { + smart: 1, + scrutiny: 2, + both: 3 +} + +export default function Component({ service }) { const { widget } = service; const { data: scrutinySettings, error: scrutinySettingsError } = useWidgetAPI(widget, "settings"); @@ -58,4 +58,5 @@ export default function Component({ service }) { ); -} \ No newline at end of file +} +