Dashboard Rows and JSON export/import? (Grafana v12.3.2 (df2547decd))

  • Version: Grafana v12.3.2 (df2547decd)

I’m trying to build a new dashboard with some panels organized in rows. In the running Grafana everything looks fine, but the json version either in the Edit→ Dashboard→ Settings or in the Export → json file does not contain any trace of the rows:-( There is a layout element in the json now, which did not make it into the docs just yet?! That layout element does only contain panels, which were not moved into rows:-(

Panels, which were in rows are essentially ‘invisible’ on the next import?! I did not check, if the import actually keeps the non-referred elements?!

So, how is that supposed to work?

Thanks,

– Marco

Some more digging.

It looks like the ‘Dashboard Edit UI’ will create a grid layout by default and has only very little support for anything else.

I dug through the Grafana sources and test cases and found a way to create json files , which import with rows;-) I did not try to export them again yet!!

    "layout": {
       "kind": "RowsLayout",
       "spec": {
         "rows": [
           {
             "kind": "RowsLayoutRow",
             "spec": {
               "title": "Header",
               "collapse": false,
               "hideHeader": true,
               "fillScreen": false,
               "layout": {
                 "kind": "GridLayout",
                 "spec": {
                   "items": [
                     {
                       "kind": "GridLayoutItem",
                       "spec": {
                         "element": {
                           "kind": "ElementReference",
                            "name": "panel-1"
                         },
                         "height": 2,
                         "width": 4,
                         "x": 0,
                         "y": 0
                       }
                     }
…..

seems to be the needed structure. Maybe, that gives others some idea;-)

Thanks,

– Marco