grafana / grafana-kiosk

Kiosk Utility for Grafana
Apache License 2.0
359 stars 58 forks source link

grafana 9 playList id vs uid, unable to find playlist. #80

Open NissesSenap opened 1 year ago

NissesSenap commented 1 year ago

I currently don't hard-code the uid of my playLists, instead I rely on id to know which playlist I want to use.

After upgrading to grafana 9 this is no longer possible. If I define

target:
    URL: http://xxx:3000/playlists/play/1

grafana kiosk will say it's unable to find the playlist. I haven't looked at the code so far but I think it should be rather straight forward to add a translation function that if ID is specified automatically get the UID and use that one instead.

This change should be able to be backwards compatible.

briangann commented 1 year ago

will take a look and see how to handle v8/v9 differences in playlist arguments. thanks!

NissesSenap commented 1 year ago

@briangann I have created a PR that is a PoC that I currently use: https://github.com/grafana/grafana-kiosk/pull/90

The code is horrible and it currently depends on my fork of grafana-api-golang-client: https://github.com/grafana/grafana-api-golang-client/pull/113

Using the grafana API is the only way that I have come up with to solve this issue. Do you think a similar solution could be an option?

Of course with support for other login solutions, a big refactor and hopefully my grafana-api-golang-client getting merged ^^. If you think this is a okay way forward then I can keep on working on it.

NissesSenap commented 1 year ago

It looks like there is work ongoing on the grafana side https://github.com/grafana/grafana/pull/56048.