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

Changing templated value from dropdown is causing unsaved changes #11063

Closed
cnicolov opened this issue Mar 2, 2018 · 8 comments · Fixed by #11109
Closed

Changing templated value from dropdown is causing unsaved changes #11063

cnicolov opened this issue Mar 2, 2018 · 8 comments · Fixed by #11109
Assignees
Labels
Milestone

Comments

@cnicolov
Copy link

cnicolov commented Mar 2, 2018

First of all I would like to thank you for your great work!

We are experiencing some strange behavior after upgrading to Version 5 and I am not sure if it's a bug, but:

What Grafana version are you using?

5.0

What datasource are you using?

Prometheus

What OS are you running grafana on?

Ubuntu Linux

What did you do?

Go to a dashboard with a templated datasource/label_value() query and change the template value from the dropdown, then try to select some other dashboard.

What was the expected result?

Not to prompt for unsaved changes when I try to change to different dashboard

What happened instead?

Prompt for unsaved changes when I try to change to different dashboard

The dashboards were automatically migrated from Grafana 4, but the behaviour is the same on newly created dashboard also

@terjesannum
Copy link

I noticed the same and got rid of that prompt by unchecking editable in the dashboard settings

@torkelo
Copy link
Member

torkelo commented Mar 3, 2018

thanks for reporting this, indeed a bug!

@torkelo torkelo added this to the 5.0.1 milestone Mar 3, 2018
@roidelapluie
Copy link
Collaborator

Oh thanks! I have been hit by that but not reporting because I never found the cause.

@bergquist
Copy link
Contributor

bergquist commented Mar 5, 2018

@cnicolov @roidelapluie

When Grafana load an 4.0 dashboard it will perform the migration in the browser. Therefore change parts of the dashboard json and ask you if you want to save the changes. Might that be what you experienced?

Are you able to reproduce this after saving the dashboard once?

@cnicolov
Copy link
Author

cnicolov commented Mar 5, 2018

@bergquist I'm able to reproduce after initial save

Also tried with newly created dashboard and the behaviour is the same

@bergquist bergquist self-assigned this Mar 5, 2018
bergquist added a commit to bergquist/grafana that referenced this issue Mar 5, 2018
@bergquist
Copy link
Contributor

This is due to the dash.iteration property.

Looking into the code I don't understand why its updated. Perhaps it's not cloned properly?
@alexanderzobnin do you have any idea why this property is updated?

@torkelo
Copy link
Member

torkelo commented Mar 6, 2018

That is updated on every repeat process to aid cleanup , should be ignored in unsaved changes diff (it was before in v4 but maybe changed name )

@bergquist
Copy link
Contributor

Ok. PR on its way!

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

Successfully merging a pull request may close this issue.

5 participants