simPod/GrafanaJsonDatasource

Issues with /variable with different text and value

umyio opened this issue · 4 comments

umyio commented

Hi,
I'm using Grafana 8.5.3 and the current version of the plugin.

I've implemented the POST /variable endpoint and it returns the following:

[
   {
      "__text":"None",
      "value":"0"
   },
   {
      "__text":"TimedOut",
      "value":"1"
   },
   {
      "__text":"OkPassed",
      "value":"2"
   },
   {
      "__text":"Ok",
      "value":"3"
   },
   {
      "__text":"Warning",
      "value":"4"
   },
   {
      "__text":"Error",
      "value":"5"
   }
]

In Grafana though I see that the text and the value are used as separate values for a variable, so the variable values consist of all values and all texts.

Any idea what the issue could be?

Thank you for your help.

Best wishes, Anton

umyio commented

Hi,
thank you. That modification worked:

[
   {
      "__text":"None",
      "__value":"0"
   },
   {
      "__text":"TimedOut",
      "__value":"1"
   },
   {
      "__text":"OkPassed",
      "__value":"2"
   },
   {
      "__text":"Ok",
      "__value":"3"
   },
   {
      "__text":"Warning",
      "__value":"4"
   },
   {
      "__text":"Error",
      "__value":"5"
   }
]

Would you mind to update the ReadMe.md when you have time to reflect that?

umyio commented

Done