-
Notifications
You must be signed in to change notification settings - Fork 66
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
Template variable not updating #95
Comments
Thank you for the excellent bug report. Much appreciated! This seems to be a duplicate of #93. Could you confirm? |
From user perspective, this issue is related to usage of variables inside the "Field" configuration, not to the cache. But I don't know the internals of this plugin, maybe it's the same root cause. If this issue disappears after #93 is fixed, then yes - it is a duplicate, otherwise not 😏 |
I've just published v1.1.0 to the marketplace. While I haven't worked on this specifically. I've fixed a couple of related issues. Would you mind letting me know if this issue is still there in 1.1.0? |
Unfortunately, I can still reproduce the issue with v1.1.0 😟 One further thing which might help to find the root cause: Inside the Settings menu of the Template variable |
Thank you for confirming. I'll do some more digging! |
I've been experimenting with this, and while I'm able to reproduce this, I'm not sure this is something I can control in the plugin. Grafana isn't calling the function ( Are you able to do this with any other data source? |
So to clarify, if you've set Could you give me some hope that this is actually supported? |
A rather common use case for me is to have a chain of depending dashboard variables like this:
The variables are defined using MySQL as datasource. If |
Thanks for confirming. I've also received confirmation from the team that this should indeed work. I'll do some more troubleshooting to see why it's not triggering. |
@marcusolsson #216 (comment) When I look at the dependency tree, the $name var is not used by $child If I refer $name variable in the Path tab : This time, the dependency tree is well seeing the relation. By doing this little change, my child var is now updated on the fly when I modify the $name. I hope this will help you to correct this issue :) Regards |
Hi all, Hope it helps |
@ugoleleux: not all heroes wear capes. Thank you for the workaround, it works great! |
I'm glad it helped you, I spent so much time discovering this workaround. :) |
I stumbled upon this issue with troubleshooting this same problem. In my case, it turned out the root cause was that my nginx server was configured to add the I'm not sure if the plugin should obey or ignore the Cache-Control header or not, but I thought I would post this here in case it helps anyone else. |
Hello @marcusolsson, first of all: Useful plugin, thanks!
I encountered an issue.
Scenario
The JSON plugin is used to define a template variable
json-var
. Inside the "Fields" tab, another template variablevar
(e.g. of type"Custom") is used:
$.mapping[?(@.attr == '$var')].something
.Expected behavior
json-var
is always updated whenvar
is updated.Actual behavior
json-var
isn't updated whenvar
is updated.Only once during creation of
json-var
it is initialized correctly according tovar
.Environment
Grafana 7.5
Neither changing "Refresh" option nor "Cache Time" solves the issue.
Basically, I would like to use a template variable inside the "Field" configuration of the "Fields" tab. How can I get it working?
The text was updated successfully, but these errors were encountered: