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
6 stars 6 forks source link

Shift selector constantly overrides the timerange of a dashboard #8

Open Sulomus opened 1 year ago

Sulomus commented 1 year ago

Info: Version of Grafana: v9.0.3 License: Grafana Cloud Pro Version of Plugin: 0.0.3

Issue: When I use the shiftselector inside a dashboard I am unable to change the timerange with any other means. I can't change it via time picker, via dragging the graph ... nothing.

This plugin is amazing and great job but unfortunately it is unusable if this issue will persist for me (and maybe some other users). I would be more then happy to help fix this unfortunately my skills in this topic are limited ... :c

Attaching a little video showcasing what I mean:

https://user-images.githubusercontent.com/49107150/177196501-a47f78fa-ddaf-4071-89ae-28322230ef7c.mp4

This is the plugin options: image

This is the var_query_map value: { "static": { "shifts": [ { "group": "Směna", "group_uuid": "group_uuid_1", "uuid": "shift_uuid_1", "label": "Ranní směna", "startTime": "06:00:00", "endTime": "14:00:00", "order": 1 }, { "group": "Směna", "group_uuid": "group_uuid_1", "uuid": "shift_uuid_2", "label": "Odpolední směna", "startTime": "14:00:00", "endTime": "22:00:00", "order": 1 }, { "group": "Směna", "group_uuid": "group_uuid_1", "uuid": "shift_uuid_3", "label": "Večerní směna", "startTime": "22:00:00", "endTime": "06:00:00", "order": 2 } ] } }

Any help would be highly appreciated!

isaozler commented 1 year ago

Hi @Sulomus, thanks for your feedback 🙏 will check if I can create a fix on the short term

Sulomus commented 1 year ago

No problem!

This plugin is really awesome - it feels after so many years that Grafana should have implemented this themselves! :D

vincent-gou commented 1 year ago

Facing same issue and discovered that shift plugin won't update time range when not displayed on a dashbaord, manual time range update works. For example if time shift selector is on top of dashboard, if you scroll down dashboard enough to make shift plugin disappear, you can manually select time range on a graph and it will keep that time range. Once you scroll up and time shift plugin reappears, time range is updated to time shift one.

Ogoku commented 1 year ago

I tried to debug this issue.

All I have discovered is, that after you selected any of the shift buttons and you try to use some of the Time Picker stuff, an error is thrown:

image

Hope this helps you.

isaozler commented 1 year ago

With the new release v0.1.0 this should be fixed. The plugin is in review by at Grafana, but you can already try it out by downloading the latest release. Feel free to reopen this issue if it isn't fixed.

Ogoku commented 1 year ago

@isaozler Updated the plugin today to V0.1.1 still have the problem. I'm currently using Grafana V9.2.2 do I have to update Grafana?

KishoreKrishnasamy commented 4 months ago

@isaozler Hi i have the updated version V0.1.5 and Grafana version v9.3.2. I still encounter the same problem, I define the shifts using static maping. could someone help me out here ?

DevKev21 commented 1 week ago

Hi, has anyone been able to solve the problem in the meantime? I am using the current version of the plugin and Grafana and have the same problem.

isaozler commented 1 week ago

Hi, has anyone been able to solve the problem in the meantime? I am using the current version of the plugin and Grafana and have the same problem.

Please provide a screen capture (video, if possible) of the issue.

DevKev21 commented 6 days ago

You can see the error in the following video. As soon as I reload the page after the shift selection with F5, I can also set the Grafana time ranges again. As soon as I select a shift again, it no longer works.

https://github.com/isaozler/grafana-shift-selector/assets/94696747/948584c5-fa76-4cb5-a7f4-6babd31aed55

isaozler commented 5 days ago

@DevKev21 I see your issue. Did you try turning off the "Real-time shift auto-select" within the Behaviour options panel?

image
DevKev21 commented 5 days ago

Yes, the real time Shift Auto Select is already disabled.