-
Notifications
You must be signed in to change notification settings - Fork 68
Updating dashboards will cause them to move to the "General" folder #82
Updating dashboards will cause them to move to the "General" folder #82
Comments
Hi again, finally, I have been able to dedicate some time to this. I have been able to whip together a reproduction [1] which can be invoked idempotently and I am able to confirm that it happens with all of the most recent Grafana releases of 5.x, 6.x, 7.x. With kind regards, [1] https://gist.github.com/amotl/43bb89107227431802556b7bcb135578 |
The solution is to say: def update_dashboard(self, dashboard):
"""
:param dashboard:
:return:
"""
put_dashboard_path = "/dashboards/db"
if "meta" in dashboard and "folderId" in dashboard["meta"]:
dashboard = dashboard.copy()
dashboard["folderId"] = dashboard["meta"]["folderId"]
r = self.api.POST(put_dashboard_path, json=dashboard)
return r I will submit a corresponding pull request. |
Dear Andrew, I wish you a happy new year! As we are currently preparing a new release of grafana-wtf, may I humbly ask you to take a look at #85, where we tried to mitigate this problem which manifests when roundtripping dashboard payloads through I tried to supplement the mitigation with appropriate tests and will be happy about any advises from your end. With kind regards, |
+1 |
Dear Jack, see #85 (comment) for a workaround. With kind regards, |
Hi again, we integrated this patch into the With kind regards, |
Dear Andrew,
first things first: Thank you so much for conceiving and maintaining this library. We are using it in grafana-wtf, which you also might like.
Now, I just found @vinnyfuria reported about Grafana Dashboards being moved to the "General" folder when updating them within grafana-toolbox/grafana-wtf#5.
Have you also been able to observe this behavior? Maybe it is only happening with Grafana 7? Sorry that I am currently not able to verify this as I don't have access to any Grafana 7 instance yet. I know I could rig up a Docker container for that, but nevertheless I wanted to report this to you in the hope you will be quicker than me.
Thanks already for looking into this and with kind regards,
Andreas.
The text was updated successfully, but these errors were encountered: