From cc2f2976dd25c7e7aaf2f6811b7e4d8a5a2db85f Mon Sep 17 00:00:00 2001 From: Isabella Siu Date: Fri, 12 Jul 2024 17:08:11 -0400 Subject: [PATCH] Remove ANY option for interpolated property quality --- pkg/sitewise/api/property_interpolated.go | 2 +- src/components/query/QualityAndOrderRow.tsx | 8 ++++++-- src/components/query/QueryEditor.test.tsx | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkg/sitewise/api/property_interpolated.go b/pkg/sitewise/api/property_interpolated.go index 84d8514e..d9d1caec 100644 --- a/pkg/sitewise/api/property_interpolated.go +++ b/pkg/sitewise/api/property_interpolated.go @@ -37,7 +37,7 @@ func interpolatedQueryToInputs(query models.AssetPropertyValueQuery) []*iotsitew endTimeInSeconds := to.Unix() quality := query.Quality - if quality == "" { + if quality == "" || query.Quality == "ANY" { quality = "GOOD" } diff --git a/src/components/query/QualityAndOrderRow.tsx b/src/components/query/QualityAndOrderRow.tsx index 4e3ee2f7..b397bcf0 100644 --- a/src/components/query/QualityAndOrderRow.tsx +++ b/src/components/query/QualityAndOrderRow.tsx @@ -104,14 +104,18 @@ export class QualityAndOrderRow extends PureComponent { render() { const { query } = this.props; + let currQualites = qualities; + if (query.queryType === QueryType.PropertyInterpolated) { + currQualites = qualities.slice(1); + } return ( <>