**Highlights**
* **Single-version migrations**: add `targetVersion` to migrator & model, separate outputs, enforce exact version.
* **Datasource fixes**: include `apiVersion` in tests, empty-string → `{}`, preserve `{}` refs, drop unwanted defaults.
* **Panel defaults & nesting**: only top-level panels get defaults; preserve empty `transformations` context-aware; filter repeated panels.
* **Migration parity**
* V16: collapsed rows, grid height parsing (`px`).
* V17: omit `maxPerRow` when `minSpan=1`.
* V19–V20: cleanup defaults (`targetBlank`, style).
* V23–V24: template vars + table panel consistency.
* V28: full singlestat/stat parity, mappings & color.
* V30–V36: threshold logic, empty refs, nested targets.
* **Save-model cleanup**: replicate frontend defaults/filtering, drop null IDs, metadata, unused props.
* **Testing**: unified suites, dev dashboards (v42), full unit coverage for major migrations.
Co-authored-by: Ivan Ortega [ivanortegaalba@gmail.com](mailto:ivanortegaalba@gmail.com)
Co-authored-by: Dominik Prokop [dominik.prokop@grafana.com](mailto:dominik.prokop@grafana.com)
138 lines
2.9 KiB
JSON
138 lines
2.9 KiB
JSON
{
|
|
"annotations": {
|
|
"list": [
|
|
{
|
|
"builtIn": 1,
|
|
"datasource": {
|
|
"uid": "-- Grafana --"
|
|
},
|
|
"enable": true,
|
|
"hide": true,
|
|
"iconColor": "rgba(0, 211, 255, 1)",
|
|
"name": "Annotations \u0026 Alerts",
|
|
"target": {
|
|
"limit": 100,
|
|
"matchAny": false,
|
|
"tags": [],
|
|
"type": "dashboard"
|
|
},
|
|
"type": "dashboard"
|
|
}
|
|
]
|
|
},
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 0,
|
|
"links": [],
|
|
"liveNow": false,
|
|
"panels": [
|
|
{
|
|
"datasource": {
|
|
"apiVersion": "v1",
|
|
"type": "grafana-testdata-datasource",
|
|
"uid": "testdata-type-uid"
|
|
},
|
|
"gridPos": {
|
|
"h": 9,
|
|
"w": 12,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"id": 2,
|
|
"options": {
|
|
"content": "VariableUnderTest: $VariableUnderTest",
|
|
"mode": "markdown"
|
|
},
|
|
"pluginVersion": "8.4.0-pre",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"apiVersion": "v1",
|
|
"type": "grafana-testdata-datasource",
|
|
"uid": "testdata-type-uid"
|
|
},
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Panel Title",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"apiVersion": "v1",
|
|
"type": "grafana-testdata-datasource",
|
|
"uid": "testdata-type-uid"
|
|
},
|
|
"gridPos": {
|
|
"h": 9,
|
|
"w": 12,
|
|
"x": 0,
|
|
"y": 9
|
|
},
|
|
"id": 3,
|
|
"options": {
|
|
"content": "VariableUnderTestText: ${VariableUnderTest:text}",
|
|
"mode": "markdown"
|
|
},
|
|
"pluginVersion": "8.4.0-pre",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"apiVersion": "v1",
|
|
"type": "grafana-testdata-datasource",
|
|
"uid": "testdata-type-uid"
|
|
},
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Panel Title",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"apiVersion": "v1",
|
|
"type": "grafana-testdata-datasource",
|
|
"uid": "testdata-type-uid"
|
|
},
|
|
"gridPos": {
|
|
"h": 9,
|
|
"w": 12,
|
|
"x": 0,
|
|
"y": 18
|
|
},
|
|
"id": 4,
|
|
"options": {
|
|
"content": "VariableUnderTestRaw: ${VariableUnderTest:raw}",
|
|
"mode": "markdown"
|
|
},
|
|
"pluginVersion": "8.4.0-pre",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"apiVersion": "v1",
|
|
"type": "grafana-testdata-datasource",
|
|
"uid": "testdata-type-uid"
|
|
},
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Panel Title",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"refresh": "",
|
|
"schemaVersion": 42,
|
|
"tags": [],
|
|
"templating": {
|
|
"list": []
|
|
},
|
|
"time": {
|
|
"from": "now-6h",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {},
|
|
"timezone": "",
|
|
"title": "Test variable output",
|
|
"uid": "kVi2Gex7z",
|
|
"weekStart": ""
|
|
} |