Skip to content

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

Open
@a-szegel

Description

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
+

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions