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

LibraryPanel: panels in a collapsed row do not update #66640

Closed
VictorColomb opened this issue Apr 16, 2023 · 0 comments · Fixed by #66643
Closed

LibraryPanel: panels in a collapsed row do not update #66640

VictorColomb opened this issue Apr 16, 2023 · 0 comments · Fixed by #66643
Labels
area/frontend/library-panels triage/needs-confirmation used for OSS triage rotation - reported issue needs to be reproduced

Comments

@VictorColomb
Copy link
Contributor

What happened:

Any library panel placed inside of a collapsed row is hardcoded, version number included, into the dashboard JSON.

dashboard.panels JSON extract
"panels": [
    {
        "collapsed": true,
        "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
        },
        "id": 4,
        "panels": [
            {
                "datasource": {...},
                "description": "",
                "fieldConfig": {...},
                "gridPos": {
                    "h": 9,
                    "w": 12,
                    "x": 0,
                    "y": 1
                },
                "id": 2,
                "libraryPanel": {
                    "description": "",
                    "folderId": 0,
                    "folderUid": "",
                    "id": 1,
                    "kind": 1,
                    "meta": {...},
                    "model": {...},
                    "name": "Example Panel Title",
                    "orgId": 1,
                    "type": "timeseries",
                    "uid": "yo85SNEVk",
                    "version": 1
                },
                "options": {...},
                "targets": [...],
                "title": "Panel Title",
                "type": "timeseries"
            }
        ],
        "title": "Row title",
        "type": "row"
    }
]

Consequences are that if the library panel is updated from another dashboard, the old version of the library panel is displayed when the row is expanded.

What you expected to happen:

A library panel saved in a collapsed row should behave the same as any library panel. Among other things, it should display the latest version of the library panel.

dashboard.panels JSON as it should have been saved
"panels": [
    {
        "collapsed": true,
        "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
        },
        "id": 4,
        "panels": [
            {
                "gridPos": {
                    "h": 9,
                    "w": 12,
                    "x": 0,
                    "y": 1
                },
                "id": 2,
                "libraryPanel": {
                    "name": "Example Panel Title",
                    "uid": "yo85SNEVk"
                },
                "title": "Panel Title"
            }
        ],
        "title": "Row title",
        "type": "row"
    }
]

How to reproduce it (as minimally and precisely as possible):

  • Create a first dashboard (let's call it dashboard A)

    • Create a library panel in dashboard A
    • Save dashboard A
  • Create a second dashboard (let's call it dashboard B)

    • Create a row in dashboard B
    • Add the library panel in dashboard B
    • Collapse the row, making sure the library panel is inside the collapsed row
    • Save dashboard B
  • From dashboard A, update the library panel (e.g. change the title) and save it

  • Go to dashboard B, expand the row. The library panel will not have updated... 💥

Environment:

  • Grafana version: v9.4.7 (4add91f)
  • Data source type & version: N/A
  • OS Grafana is installed on: Ubuntu 22.04.2 (WSL2 on Windows 11 build 22621.1555)
  • User OS & Browser: Windows 11 build 22621.1555 & MS Edge 112.0.1722.48
  • Grafana plugins: None
  • Others:
@zuchka zuchka added area/frontend/library-panels triage/needs-confirmation used for OSS triage rotation - reported issue needs to be reproduced labels Apr 21, 2023
@zuchka zuchka changed the title Library Panel in a collapsed row does not update LibraryPanel: panels in a collapsed row do not update Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend/library-panels triage/needs-confirmation used for OSS triage rotation - reported issue needs to be reproduced
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants