Button in dashboard

I want to get skill.
if button is clicked in dashboard, data(like gps coordinate) will be sent to somewhere. how can I get this skill?

If my explanation is not enough, ask me again,plz

Using the Text panel in HTML mode, you can add any HTML and JavaScript.

thanks, but I want to use in Graph pannel. How can I use it?

Have you looked at Drill Down links?


<button class="btn navbar-button gf-timepicker-nav-btn" onClick="location.href='insert url here'">A Button</button>

You can also use grafanas css class :smiley:

Where we need to add this code?

Use daniellee post to see where to insert the code.

You create a text widget, select settings, options tab, mode html and insert the html code.

Can’t make it work. JS isn’t allowed now?

It is turned off by default for text panels to improve security. If you want to turn it back on, then change this setting in your config file for Grafana:

1 Like

How to do this on grafana cloud ?

Have you found any answers for your question?

I believe you cannot do this on your own as a Cloud subscriber since you do not have access to the config file.

You might be able to contact Grafana support and ask them if they can make the change to the config file to allow script tags in text panels.