Closed gtk-grafana closed 2 months ago
I'd like to get this rolled out to Explore Logs if/when approved, do we typically include a version bump in the feature PR, or open a separate PR to bump the version?
:rocket: PR was released in v5.6.1
:rocket:
Add optional state to SceneTimeRange allowing invalidation and refresh of time range using percent or absolute interval.
Adds optional
invalidateAfterMs
andinvalidateAfterPercent
state props toSceneTimeRangeState
. If set, on activation we will check to see if enough time has elapsed to meet either criteria. If both values are set in the time range, the shortest duration value will be used.The values can be set together, or independently. Providing both allows the scenes developer to specify a minimum elapsed interval before the time range is refreshed, which would be helpful when users are looking at very long durations (e.g. weeks), but update more often when users are looking at very short durations (minutes).
10% and 5m seem to be reasonable: 5 minute interval will refresh after 30s 15minute interval will refresh after 1.5 minutes 30 minute interval will refresh after 3 minutes 1 hour intervals and greater will refresh after 5 minutes
📦 Published PR as canary version:
5.6.1--canary.835.10040331799.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes-react@5.6.1--canary.835.10040331799.0 npm install @grafana/scenes@5.6.1--canary.835.10040331799.0 # or yarn add @grafana/scenes-react@5.6.1--canary.835.10040331799.0 yarn add @grafana/scenes@5.6.1--canary.835.10040331799.0 ```