isaozler / grafana-shift-selector

The shift selector allows you to adjust the time range of your grafana dashboard to one specific shift or a range of shifts.
Apache License 2.0
8 stars 6 forks source link

Custom refresh interval only refreshes the Shift Selector panel, not the entire dashboard #28

Closed G3CK0za closed 11 months ago

G3CK0za commented 11 months ago

Hi @isaozler,

Thank you for your efforts and the latest version!

There is an issue with the custom refresh interval under the panel options though. The custom refresh interval is only refreshing the Shift Selector panel, not the entire dashboard. So the shift selector will always select the correct shift even if the dashboard is not refreshed. And after auto-selecting the correct shift and changing the absolute time range the dashboard refreshes once due to the change in time range...but that is where it ends. No more dashboard refreshes after that until the shift changes again.

isaozler commented 11 months ago

Hi @G3CK0za, we had issues when manipulating the general refresh interval. That's why I detached the refresh from the panel refresh. I have looked at the problem you mentioned, and indeed, the refresh parameter is not passed through once the shift is updated. Creating a hotfix for it!

isaozler commented 11 months ago

The cause of the issue was the TimeSrv service resetting the refresh parameter after the shift was updated, although I was passing the parameter.

image

Grafana Service -> TimeSrv.ts

image

Solution

The issue is now fixed by resetting the refresh rate if it was set before.

isaozler commented 11 months ago

Released a new version (0.1.5) and submitted it to Grafana. Closing this issue once the plugin is updated.

G3CK0za commented 11 months ago

Awesome, thanks again for your efforts @isaozler! Will test and provide feedback