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

Row panel does not update variables/templating values #15133

Closed
arnaudlemaignen opened this issue Jan 30, 2019 · 11 comments · Fixed by #15183
Closed

Row panel does not update variables/templating values #15133

arnaudlemaignen opened this issue Jan 30, 2019 · 11 comments · Fixed by #15183

Comments

@arnaudlemaignen
Copy link
Contributor

What Grafana version are you using?

5.4.3

What datasource are you using?

prometheus (but here the bug is happening on any datasource)

What OS are you running grafana on?

Linux

What did you do?

create a dashboard with

  • a variable (custom or query)
  • a row panel with the title using the variable

What was the expected result?

when selecting a new variable in the drop down, the row panel should show the new selected value

What happened instead?

the row shows the previous value, not updating the new value

this was tested on firefox and chrome.
THIS IS A REGRESSION it used to work previous grafana version, at least 5.2.4

below a screenshot

row panel bug

and a dashboard to rename to json to test it

Row and var bug-1548844056678.txt

@xlson
Copy link
Contributor

xlson commented Jan 30, 2019

Thanks for posting such a clear repro case with the Dashboard.json!

@xlson
Copy link
Contributor

xlson commented Jan 30, 2019

@marefr could this be related to the work you did in improving template variables and how they trigger changes? Or, is it something different?

@Theoooooo
Copy link

Just to add more informations about this bug, the row name is updated when you open it.
I can also confirm that the bug is also happening on other DataSource. I don't think it's related to that but only to a problem fo updating the row name.

@torkelo
Copy link
Member

torkelo commented Feb 1, 2019

thanks for reporting this, fixed in master now (latest nightly build shortly) and will be fixed in beta2

ryantxu added a commit to ryantxu/grafana that referenced this issue Feb 1, 2019
* grafana/master:
  New solo panel route working in all scenarios I can test
  Removed unused factory and fixed index based mapper lookup
  Fixed dashboard row title not updating when variable changed, fixes grafana#15133
  Removed comment from panel editor
  wip: New react container route for solo panels that supports both angular and react panels
  Fixed another type of fluent reducerFactory
  Removed then clauses, no need to test the test within the test
  Added reducerTester, reducer tests and tests
  Removed ActionTypes and fixed a noPayloadActionCreatorFactory
  Refactored Datasources as POC
  Minor change to Action interfaces
  Simplified inteface for reducerFactory
  Fixed a small bug and added case sensitivity
  Added reducerFactory and tests
  Added actionCreatorFactory and tests
@jorgeallyson
Copy link

This is happening for me on Grafana 6.2. At this moment the only way to update the row is doing it manually. Maybe this is a regression?

@torkelo
Copy link
Member

torkelo commented May 24, 2019

If you use a variable in a row title it does not update ?

@jorgeallyson
Copy link

Yes, the same as the example posted by @arnaudlemaignen . I have to go to the row settings and press the update button. Only then the row title and panels are updated.

@jorgeallyson
Copy link

Since this bug was closed, should I open a new one? I have just upgraded to grafana 6.2.1 and the issue still remains. Due to this problem users with viewer roles cannot properly interact with the dashboards.

@torkelo
Copy link
Member

torkelo commented May 29, 2019

@jorgeallyson
Unable to replicate. The row title updates whenever I change a template variable and have no other reports that this is not fixed.

https://play.grafana.org/d/000000153/repeat-rows?openVizPicker&orgId=1&var-app=backend&var-server=backend_01&var-interval=$__auto_interval_interval

@jorgeallyson
Copy link

OK, I think my issue is actually different. Dashboards with only one variable are indeed working. The problem is with dashboards with more than one variable. Also, in my case the other variables are dependent on the value of the first. Sometimes it creates the extra rows as expected, but the titles are wrong, repeating one value multiple times. I will have to do more tests to try and find out what is really happening.

@baodongli
Copy link

baodongli commented Nov 12, 2020

image
My question is how do I refer to the variables' values on each row? In this case, I have three variables: site, pod, cluster.
For example, if I want to link to another dashboard in each row, with the following:
<a href="/dashboard/db/cluster-detail?var-site=$site&var-pod=$pod&var-cluster=$cluster">Detail dashboard</a>

Clicking the link will lead to the detailed dashboard. However the variables's values are incorrect for site and pod. Did I write the hyperlink correctly? Or this is something not supported yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants