Template variable not updating
See original GitHub issueHello @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 variable var
(e.g. of type
“Custom”) is used: $.mapping[?(@.attr == '$var')].something
.
Expected behavior
json-var
is always updated when var
is updated.
Actual behavior
json-var
isn’t updated when var
is updated.
Only once during creation of json-var
it is initialized correctly according to var
.
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?
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Component template variable not updating when service ...
Because the variable isSignedIn in HomeComponent is assigned once in it's constructor and never re-assigned. And you are on the right path ...
Read more >Template variable not updating · Issue #95 - GitHub
Basically, I would like to use a template variable inside the "Field" configuration of the "Fields" tab. How can I get it working?...
Read more >Angular - Not Detecting Change, Updating Variable When ...
In the Angular app, we need to make changes in local variables which are getting used and defined as global. These variable or...
Read more >Component template variable not updating when service ...
Coding example for the question Component template variable not updating when service emits a change (angular)-rx.js.
Read more >HTML won't update after variable change : r/Angular2 - Reddit
HTML won't update after variable change. Hi there. I'm pretty new to angular and I'm stuck at something that could be really simple...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mlcdf
I’m glad it helped you, I spent so much time discovering this workaround. 😃
@marcusolsson https://github.com/marcusolsson/grafana-json-datasource/issues/216#issuecomment-992540623 I just updated the closed issue, but here is my entry again on this case : I found a new behavior that will help you in your analysis. I have a variable $name that contains a list of choices. This variable is used inside a child variable on the Params tab :
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 Ugo