grafana / grafana-infinity-datasource

CSV, JSON, GraphQL, XML and HTML datasource for grafana.
https://grafana.com/docs/plugins/yesoreyeram-infinity-datasource
Apache License 2.0
765 stars 103 forks source link

Fix showing of correct URL when using query history #884

Closed ivanahuckova closed 4 months ago

ivanahuckova commented 5 months ago

If query.url changes from outside, the input should reflect that and show updated url. This is fixing an issue with query history where if you clicked on query history item, it would not update URL.

Fixed URL behavior on this branch:

https://github.com/grafana/grafana-infinity-datasource/assets/30407135/40e65ebd-5212-4dd9-a358-1ba2858976dd

Broken main:

https://github.com/grafana/grafana-infinity-datasource/assets/30407135/f49fcb69-c155-4735-9e79-6d5b449ec6ab

While working on this, I noticed that sometimes in Explore (only Explore, not Dashboard❗️), the previously run query is passed to QueryEditor which cases flashes of old query. I was able to reproduce this also in Loki/Prom and created issue for it: https://github.com/grafana/grafana/issues/89530

ivanahuckova commented 4 months ago

Oh, I totally forgot about it! Thanks for reminder. Added in https://github.com/grafana/grafana-infinity-datasource/pull/884/commits/aea5c10c9c28d3e58405c4e6884d1cd4ff453be0