grafana / iot-sitewise-datasource

IoT Sitewise
Apache License 2.0
18 stars 10 forks source link

Selected child assets not visible on queries "Get property value aggregates" "Get interpolated property value" "Get property value history" #294

Open chejimmy opened 7 months ago

chejimmy commented 7 months ago

What happened:

  1. Select any of the queries aforementioned in the title
  2. to add an "Asset", click "Explore" button
  3. drill down into an child asset
  4. click "SELECT" on the child asset
  5. notice the child asset is not visible under the "Asset" input (see screenshot)

Screenshots

Screenshot 2024-03-21 at 1 09 44 PM

Anything else we need to know?:

Environment:

kevinwcyu commented 7 months ago

Hi @chejimmy, this is an issue with the <Select /> component in Grafana version <9.5.0. It's not able to handle arbitrary values correctly if the selected value isn't part of the available options passed to the <Select /> component.

Right now, if you click Explore and then select the By Model tab in the Asset Browser and then select a child asset, it will show up in the asset selector. But that has its own issues as mentioned here https://github.com/grafana/iot-sitewise-datasource/issues/284. I think the best course of action would be to fix how we're selecting assets so that it's consistent whether you select it from the Asset selector or from the Asset Browser.