Url redirect plugin

Hello, I am trying to develop a plugin, the function I want to have is that every time a user logs in, automatically start the only playlist that will have, to try to achieve this, I saw that there is a url that you provide within the playlist panel that if you paste that url in your browser, automatically you start the playlist, then I thought to try to develop it in such a way that every time that you initiate session redirects me to the url that gives me grafana to initiate the playlist, for it I have made an import of the variables of PlayList for this way to be able to have the playlist. uid that is the code that goes after the ‘/’, I leave here what I have developed to see if someone can help, I use the latest version of grafana and I downloaded it in source code

Could this be accomplished via a proxy server such as ngninx?

I would take another approach to accomplish this:

  1. Define or provision home dashboard for the organization.
  2. Add Dynamic Text panel with JS code to use locationService.replace to redirect to the playlist.

You don’t really need to create and support a new plugin for this.

1 Like

Hello thank you very much for your answer, how could I implement that, and where ?

Start with documentation and YouTube tutorials:

Hi, I have a problem and is that to redirect to the url I need a uid that is in a local file of grafana /public/app/features/playlist/type.ts I need the variable playlist.uid so then I can do a locationService.replace(newURL); or a locationService.replace as you told me, then I have not found the way to collect the data correctly, help me thanks.