Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto shift selector not working #16

Closed
tdekoning93 opened this issue Feb 16, 2023 · 28 comments
Closed

Auto shift selector not working #16

tdekoning93 opened this issue Feb 16, 2023 · 28 comments

Comments

@tdekoning93
Copy link

Hey,

We wanted to start using the auto shift plugin, hoping it would help with automatically selecting the right shift. It doesn't seem to do that and I have no clue if thats due to us not using it correctly or something else being wrong. It also doesn't seem to change the timeframe even when having the auto refresh set to 5s.

We are still using Grafana 8.5.20. Any help would be appreciated.

image

@isaozler
Copy link
Owner

Hi Tim,

An ongoing bug in the real-time feature prevents the selector from changing shifts. I will refactor the plugin to solve this issue because a quick fix wasn't doable.

I hope to give updates on this as soon as possible.

@tdekoning93
Copy link
Author

tdekoning93 commented Feb 21, 2023

Thanks for the reply. That would be great. Do you have any ETA on this? Don't want to push you, but I saw the last change to the shift selector was 10 months ago, so just curious if it's actively maintained. Then we can switch from your custom unpublished version to this published official one, haha.

@isaozler
Copy link
Owner

Just published the new version. With the new release v0.1.0 this should be fixed. Once the review of the plugin is done by Grafana you can directly install it from your dashboard, but in the meanwhile you can try it out by downloading and installing the latest release manually.

@isaozler
Copy link
Owner

@tdekoning93 Eventually refactored the whole codebase 🤣 it took a while to update the plugin. Sorry for that.

I hope this update helps everyone using this plugin. I will try to maintain the plugin more actively.

@tdekoning93
Copy link
Author

Thanks a lot! Will try it out. Big kudos from our side to you.

@isaozler
Copy link
Owner

Thanks, Tim! Please let me know if you stumble upon issues. The latest version should be released asap as it is reviewed and approved.

@G3CK0za
Copy link

G3CK0za commented Jul 17, 2023

Hi @isaozler,

I have tested the plug-in and it does auto-select shifts now. However, if I have auto-refresh set for the dashboard, the plug-in turns it off on shift change. Any idea what could be causing this?

@Sourve
Copy link

Sourve commented Aug 2, 2023

/src/module.ts file seems to be missing a reference to the refreshInterval variable that is showcased in the README file. This would be added with code similar to below:

.addTextInput({
      category: ['Behavior'],
      path: 'refreshInterval',
      showIf: (c: any) => c.isAutoSelectShift,
      name: 'Custom refresh interval',
      description:
        'Determine a custom dashboard refresh interval. The global refresh interval will overwrite this value',
      defaultValue: '5s',
    })

Not having this option is causing the panel to set the refresh interval to 'false' instead of a specified value. If i am mistaken on how to set the refresh interval please let me know. I have not worked with grafana plugins or compiling them so I cannot currently test if the code segment would fix this issue, I will try to test this if @isaozler doesn't respond.

@isaozler
Copy link
Owner

isaozler commented Aug 4, 2023

Thanks @Sourve I'll check next week if this resolves the issue.

@fatbasstard
Copy link

Another interesting thing related to this. It appears the Select group is actually mandatory. Leaving it blank results in the panel not working. Adding the value of the single group and it works

image

@isaozler
Copy link
Owner

isaozler commented Aug 9, 2023

Thanks for pointing out Frank @fatbasstard 🙏 I will add a fallback so it won't break 👍

@fatbasstard
Copy link

Any news on the progress @isaozler ? 😄

@isaozler
Copy link
Owner

Following Monday, I will start working again 😅 🏖️

@isaozler
Copy link
Owner

Released an update see changelog v0.1.3

@isaozler
Copy link
Owner

/src/module.ts file seems to be missing a reference to the refreshInterval variable that is showcased in the README file. This would be added with code similar to below:

.addTextInput({
      category: ['Behavior'],
      path: 'refreshInterval',
      showIf: (c: any) => c.isAutoSelectShift,
      name: 'Custom refresh interval',
      description:
        'Determine a custom dashboard refresh interval. The global refresh interval will overwrite this value',
      defaultValue: '5s',
    })

Not having this option is causing the panel to set the refresh interval to 'false' instead of a specified value. If i am mistaken on how to set the refresh interval please let me know. I have not worked with grafana plugins or compiling them so I cannot currently test if the code segment would fix this issue, I will try to test this if @isaozler doesn't respond.

@Sourve :
This is done intentionally by Grafana. The refresh rate is automatically discarded when the dashboard has an absolute date range. See grafana/grafana#12105 (comment)

I created a workaround so that it's possible to have a refresh rate by selecting the refresh rate from the panel property "Behaviour > Custom refresh interval."

image

@DasDepp
Copy link

DasDepp commented Sep 11, 2023

Hi @isaozler,
thank you very much for contributing these nice Grafana Plugin. When there will be the new Grafana Plugin version package available to install it via the Grafana CLI plugin?

@isaozler
Copy link
Owner

It's currently under review by the Grafana Team; as soon as it's approved, it will be available to install. But you could also install it manually (unsigned) for testing. Usually, the review takes little time.

@fatbasstard
Copy link

Takes long, boring 😉

@fatbasstard
Copy link

Any news on the Grafana approval @isaozler ?

@isaozler
Copy link
Owner

image

I will be keeping an eye on this 👍

@fatbasstard
Copy link

image

😛

@G3CK0za
Copy link

G3CK0za commented Nov 6, 2023

Sad-Pablo-Escobar

@fatbasstard
Copy link

Am poking through Grafana support, our contacts at Grafana and everything.. You have a clue what's going on @isaozler ?

@isaozler
Copy link
Owner

I saw it was pending a new release because there was an issue. I have to submit a fixed version for a new review 😞 I will see if I can submit a new version by tomorrow.

@fatbasstard
Copy link

Any updates on the progress @isaozler ?

@isaozler
Copy link
Owner

👋 @fatbasstard Frank and all who are waiting, I just submitted the latest release for review at Grafana, containing all the fixes addressed by the Grafana Team. I know it took some time, but I'm doing my best to help you guys with this plugin.

image

@isaozler
Copy link
Owner

The latest release 0.1.4 is published 🙏

@tdekoning93
Copy link
Author

Thanks a lot for your efforts @isaozler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants