Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with /variable with different text and value #287

Closed
umyio opened this issue May 23, 2022 · 4 comments
Closed

Issues with /variable with different text and value #287

umyio opened this issue May 23, 2022 · 4 comments

Comments

@umyio
Copy link
Contributor

umyio commented May 23, 2022

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

@simPod
Copy link
Owner

simPod commented May 23, 2022 via email

@umyio
Copy link
Contributor Author

umyio commented May 23, 2022

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?

@simPod
Copy link
Owner

simPod commented May 24, 2022 via email

@umyio
Copy link
Contributor Author

umyio commented May 26, 2022

Done

@umyio umyio closed this as completed May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants