Static alarm thresholds were being filtered when a viewport was provided. This change updates the logic to always prioritze static alarm threshold values. Thresholds were being filtered to use anything within viewport.
Changes:
prioritize static thresholds
always create mostRecentBeforeEndValueQueries as long as queryMode !== latest
filter all thresholdData that is after the viewport end
test cases + outcomes
Alarm(s)
Viewport
Outcome
custom alarm property with a static threshold
last 10 minutes
static threshold is used
custom alarm property with a static threshold
none
static threshold is used
demo alarm with ingested threshold
last 10 minutes
will fetch and use last threshold before end of viewport
demo alarm with ingested threshold
none
will fetch and use last threshold before end of viewport
custom alarm property with a static threshold value + demo alarm with ingested threshold
last 10 minutes
will use static value for custom alarm and use last threshold before end of viewport
custom alarm property with a static threshold value + demo alarm with ingested threshold
none
will use static value for custom alarm and use last threshold before end of viewport
example: fetching custom alarm with defined viewport
Overview
Static alarm thresholds were being filtered when a viewport was provided. This change updates the logic to always prioritze static alarm threshold values. Thresholds were being filtered to use anything within viewport.
Changes:
mostRecentBeforeEndValueQueries
as long as queryMode !== latesttest cases + outcomes
example: fetching custom alarm with defined viewport
example: fetching demo data alarm with defined viewport
Legal
This project is available under the Apache 2.0 License.