Variable, HTML code, Button

Hello, I am trying to make a button which will save value to one of my variable. I tried many things but does not work.

Can somebody help how to add function to button to set the variable ? Few examples:

  • Write number 50 to variable $machine
  • Write regex to variable $machine

This is my button code in text panel in HTML mode
<button class="btn navbar-button gf-timepicker-nav-btn" style="width: 100%" onClick="????">Execute</button>

This is the button
image

Variable list
image

Hello,

I’m afraid I can’t help you here either. However, could you help me?

I try to display a button, I do this in a text field and change the option to html.


unfortunately it only shows me the source code in the output.
Can you tell me what I do wrong?

Check your settings in grafana.ini and change to true, see below

[panels]
# If set to true Grafana will allow script tags in text panels. Not recommended as it enable XSS vulnerabilities.
disable_sanitize_html = true