grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
141 stars 21 forks source link

AdHocFiltersVariable/GroupByVariable: Pass time range to getTagKeys calls #665

Closed bfmatei closed 7 months ago

bfmatei commented 7 months ago

Time range is not passed to getTagKeys calls currently but we actually need it to be passed.

📦 Published PR as canary version: 4.1.1--canary.665.8521264218.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes@4.1.1--canary.665.8521264218.0 # or yarn add @grafana/scenes@4.1.1--canary.665.8521264218.0 ```
dprokop commented 7 months ago

Looks good, but given that both DataSourceGetTagKeysOptions and DataSourceGetTagValuesOptions accept time range as an option, can we provide the time range to the getTagKeys calls in group by variable and getTagValues in the ad hoc filter?

bfmatei commented 7 months ago

@ashharrison90 @dprokop - getTagValues already had the time range passed in AdHocFiltersVariable. I added it to getTagKeys in GroupByVariable as well.

The only question is: are we calling getTagValues in GroupByVariable? I can't find any reference to it.

ashharrison90 commented 7 months ago

@bfmatei ah perfect, didn't even notice the timeRange being passed in adhoc filters getTagValues 🥳

and no, i don't think we ever call getTagValues in group by. i'll update my comment now 👍

grafanabot commented 7 months ago

:rocket: PR was released in v4.1.2 :rocket: