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

BUG: Panel ID's are being left as null which is making grafanalib dashboards un-editable #598

Open
a-szegel opened this issue May 26, 2023 · 0 comments

Comments

@a-szegel
Copy link

a-szegel commented May 26, 2023

I saw an issue where panel.id for Row objects, the nested panel's panel.id is not being properly updated via auto_panel_ids(). They were being left as null. This diff is what fixed me, but I am not sure why it wasn't working as is.

The behavior that I was seeing was that I would click edit on a panel and nothing would happen. I have confirmed that this fix fixes me, and allows panels to be used like normal dashboards (created with the GUI).

         def set_id(panel):
-            return panel if panel.id else attr.evolve(panel, id=next(auto_ids))
+            if panel.id:
+                return panel
+            else:
+                panel.id = next(auto_ids)
+                return panel
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant