Closed chejimmy closed 3 months ago
Overall looks good! I had a couple questions about fetching the diagnostic names, and would it be possible to add frontend tests for the new toggle?
Applied changes regarding the comments; Regarding the frontend tests, I've added sanity tests under src/components/query/QueryEditor.test.tsx; I will I need to look into e2e 🙏 Do you think we can do a quick followup for the tests addition or should block this PR on it?
What this PR does / why we need it:
This PR allow users to use the Grafana query builder to extract and parse L4E predictions for visualization purpose.
The video shows get property value query in action - with(out) flattening L4E anomaly result:
https://github.com/grafana/iot-sitewise-datasource/assets/50635800/f8c44e39-a4ef-4c9a-86e5-924ca4b6afe6
The video shows get property value history query in action - with(out) flattening L4E anomaly result:
https://github.com/grafana/iot-sitewise-datasource/assets/50635800/7efa9ab1-563b-451a-98c5-9ac1883c839f
The AWS/L4E_ANOMALY_RESULT asset property value is a complex data type. The key anomaly data needed from the query is stored as a complex data type, which is a JSON string with the following shape:
The response is a flattened version of the L4E complex data type asset property value:
The above query response will create a table of time-series data with the following shape:
Which issue(s) this PR fixes:
Query for https://github.com/grafana/iot-sitewise-datasource/issues/219 without the visualization
Special notes for your reviewer: