grafana / iot-sitewise-datasource

IoT Sitewise
Apache License 2.0
19 stars 9 forks source link

Asset Browser selected `assetId` and `modelId` should reset after `region` changes #329

Open chejimmy opened 3 weeks ago

chejimmy commented 3 weeks ago

What happened:

Asset Browser stuck in loading state after region changes

What you expected to happen:

Asset Browser to display assets

How to reproduce it (as minimally and precisely as possible):

Description of the flow under screenshots

  1. select any query type with "Explore" button
  2. select an asset
  3. change region to a different region
  4. click "Explore" button and observe loading state

Screenshots

Spinning

https://github.com/grafana/iot-sitewise-datasource/assets/50635800/ac660e80-cf92-482b-bd2c-d7730261a7c4

Network error

https://github.com/grafana/iot-sitewise-datasource/assets/50635800/1ac0fb07-e018-4075-979d-25b69b41635d

Anything else we need to know?:

The error is "failed to fetch query data: ResourceNotFoundException: Asset with ID xxxx not found", since the assetId set for the previous region does not exist in another region. To fix the problem, Asset Browser selected assetId and modelId should reset after region changes

Environment: