e09905df35
* Add library panel repeat options to v2 schema during conversion
* use any instead of interface{}
* change to common.Unstructured instead of byte[] for model field
* Fix the tests and let the library panel behavior fetch repeat options in public and scripted dashboards
* fix library panel differences between backend and frontend conversion
169 lines
4.0 KiB
JSON
169 lines
4.0 KiB
JSON
{
|
|
"kind": "Dashboard",
|
|
"apiVersion": "dashboard.grafana.app/v2alpha1",
|
|
"metadata": {
|
|
"name": "library-panel-repeat-options-test",
|
|
"labels": {
|
|
"test": "library-panel-repeat"
|
|
}
|
|
},
|
|
"spec": {
|
|
"annotations": [],
|
|
"cursorSync": "Off",
|
|
"description": "Testing library panel repeat options migration from v1beta1 to v2alpha1",
|
|
"editable": true,
|
|
"elements": {
|
|
"panel-1": {
|
|
"kind": "LibraryPanel",
|
|
"spec": {
|
|
"id": 1,
|
|
"title": "Library Panel with Horizontal Repeat",
|
|
"libraryPanel": {
|
|
"name": "Library Panel with Horizontal Repeat",
|
|
"uid": "lib-panel-repeat-h"
|
|
}
|
|
}
|
|
},
|
|
"panel-2": {
|
|
"kind": "LibraryPanel",
|
|
"spec": {
|
|
"id": 2,
|
|
"title": "Library Panel with Vertical Repeat",
|
|
"libraryPanel": {
|
|
"name": "Library Panel with Vertical Repeat",
|
|
"uid": "lib-panel-repeat-v"
|
|
}
|
|
}
|
|
},
|
|
"panel-3": {
|
|
"kind": "LibraryPanel",
|
|
"spec": {
|
|
"id": 3,
|
|
"title": "Library Panel Instance Override",
|
|
"libraryPanel": {
|
|
"name": "Library Panel with Horizontal Repeat",
|
|
"uid": "lib-panel-repeat-h"
|
|
}
|
|
}
|
|
},
|
|
"panel-4": {
|
|
"kind": "LibraryPanel",
|
|
"spec": {
|
|
"id": 4,
|
|
"title": "Library Panel without Repeat",
|
|
"libraryPanel": {
|
|
"name": "Library Panel without Repeat",
|
|
"uid": "lib-panel-no-repeat"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"layout": {
|
|
"kind": "GridLayout",
|
|
"spec": {
|
|
"items": [
|
|
{
|
|
"kind": "GridLayoutItem",
|
|
"spec": {
|
|
"x": 0,
|
|
"y": 0,
|
|
"width": 12,
|
|
"height": 8,
|
|
"element": {
|
|
"kind": "ElementReference",
|
|
"name": "panel-1"
|
|
},
|
|
"repeat": {
|
|
"mode": "variable",
|
|
"value": "server",
|
|
"direction": "h",
|
|
"maxPerRow": 3
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"kind": "GridLayoutItem",
|
|
"spec": {
|
|
"x": 0,
|
|
"y": 8,
|
|
"width": 6,
|
|
"height": 4,
|
|
"element": {
|
|
"kind": "ElementReference",
|
|
"name": "panel-2"
|
|
},
|
|
"repeat": {
|
|
"mode": "variable",
|
|
"value": "datacenter",
|
|
"direction": "v"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"kind": "GridLayoutItem",
|
|
"spec": {
|
|
"x": 6,
|
|
"y": 8,
|
|
"width": 12,
|
|
"height": 8,
|
|
"element": {
|
|
"kind": "ElementReference",
|
|
"name": "panel-3"
|
|
},
|
|
"repeat": {
|
|
"mode": "variable",
|
|
"value": "instance-var",
|
|
"direction": "v",
|
|
"maxPerRow": 5
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"kind": "GridLayoutItem",
|
|
"spec": {
|
|
"x": 0,
|
|
"y": 12,
|
|
"width": 6,
|
|
"height": 3,
|
|
"element": {
|
|
"kind": "ElementReference",
|
|
"name": "panel-4"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"links": [],
|
|
"liveNow": false,
|
|
"preload": false,
|
|
"tags": [
|
|
"test",
|
|
"library-panels",
|
|
"repeat"
|
|
],
|
|
"timeSettings": {
|
|
"timezone": "browser",
|
|
"from": "now-1h",
|
|
"to": "now",
|
|
"autoRefresh": "",
|
|
"autoRefreshIntervals": [
|
|
"5s",
|
|
"10s",
|
|
"30s",
|
|
"1m",
|
|
"5m",
|
|
"15m",
|
|
"30m",
|
|
"1h",
|
|
"2h",
|
|
"1d"
|
|
],
|
|
"hideTimepicker": false,
|
|
"fiscalYearStartMonth": 0
|
|
},
|
|
"title": "Library Panel Repeat Options Test Dashboard",
|
|
"variables": []
|
|
},
|
|
"status": {}
|
|
} |