a72e02f88a
**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)
466 lines
10 KiB
JSON
466 lines
10 KiB
JSON
{
|
|
"annotations": {
|
|
"list": [
|
|
{
|
|
"builtIn": 1,
|
|
"datasource": {
|
|
"type": "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": {
|
|
"type": "grafana-testdata-datasource"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "continuous-GrYlRd"
|
|
},
|
|
"custom": {
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green"
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 11,
|
|
"w": 9,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"id": 62,
|
|
"options": {
|
|
"basemap": {
|
|
"config": {},
|
|
"name": "Layer 0",
|
|
"type": "default"
|
|
},
|
|
"controls": {
|
|
"mouseWheelZoom": true,
|
|
"showAttribution": true,
|
|
"showDebug": false,
|
|
"showMeasure": false,
|
|
"showScale": false,
|
|
"showZoom": true
|
|
},
|
|
"layers": [
|
|
{
|
|
"config": {
|
|
"color": {
|
|
"field": "Price",
|
|
"fixed": "dark-green"
|
|
},
|
|
"fillOpacity": 0.4,
|
|
"shape": "circle",
|
|
"showLegend": true,
|
|
"size": {
|
|
"field": "Count",
|
|
"fixed": 5,
|
|
"max": 15,
|
|
"min": 2
|
|
}
|
|
},
|
|
"location": {
|
|
"gazetteer": "public/gazetteer/usa-states.json",
|
|
"lookup": "State",
|
|
"mode": "auto"
|
|
},
|
|
"name": "Layer 1",
|
|
"type": "markers"
|
|
}
|
|
],
|
|
"tooltip": {
|
|
"mode": "details"
|
|
},
|
|
"view": {
|
|
"id": "coords",
|
|
"lat": 38.297683,
|
|
"lon": -99.228359,
|
|
"shared": true,
|
|
"zoom": 3.98
|
|
}
|
|
},
|
|
"pluginVersion": "9.2.0-pre",
|
|
"targets": [
|
|
{
|
|
"csvFileName": "flight_info_by_state.csv",
|
|
"refId": "A",
|
|
"scenarioId": "csv_file"
|
|
}
|
|
],
|
|
"title": "Size, color mapped to different fields + share view",
|
|
"type": "geomap"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "grafana-testdata-datasource"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"custom": {
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green"
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
},
|
|
{
|
|
"color": "#EAB839",
|
|
"value": 90
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 11,
|
|
"w": 9,
|
|
"x": 9,
|
|
"y": 0
|
|
},
|
|
"id": 66,
|
|
"options": {
|
|
"basemap": {
|
|
"config": {},
|
|
"name": "Layer 0",
|
|
"type": "default"
|
|
},
|
|
"controls": {
|
|
"mouseWheelZoom": true,
|
|
"showAttribution": true,
|
|
"showDebug": false,
|
|
"showMeasure": false,
|
|
"showScale": false,
|
|
"showZoom": true
|
|
},
|
|
"layers": [
|
|
{
|
|
"config": {
|
|
"color": {
|
|
"field": "Price",
|
|
"fixed": "dark-green"
|
|
},
|
|
"fillOpacity": 0.4,
|
|
"shape": "circle",
|
|
"showLegend": true,
|
|
"size": {
|
|
"field": "Count",
|
|
"fixed": 5,
|
|
"max": 15,
|
|
"min": 2
|
|
}
|
|
},
|
|
"location": {
|
|
"gazetteer": "public/gazetteer/usa-states.json",
|
|
"lookup": "State",
|
|
"mode": "auto"
|
|
},
|
|
"name": "Layer 1",
|
|
"type": "markers"
|
|
}
|
|
],
|
|
"tooltip": {
|
|
"mode": "details"
|
|
},
|
|
"view": {
|
|
"id": "coords",
|
|
"lat": 38.297683,
|
|
"lon": -99.228359,
|
|
"shared": true,
|
|
"zoom": 3.98
|
|
}
|
|
},
|
|
"pluginVersion": "9.2.0-pre",
|
|
"targets": [
|
|
{
|
|
"csvFileName": "flight_info_by_state.csv",
|
|
"refId": "A",
|
|
"scenarioId": "csv_file"
|
|
}
|
|
],
|
|
"title": "Thresholds legend",
|
|
"type": "geomap"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "grafana-testdata-datasource"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "continuous-BlYlRd"
|
|
},
|
|
"custom": {
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green"
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 11,
|
|
"w": 9,
|
|
"x": 0,
|
|
"y": 11
|
|
},
|
|
"id": 63,
|
|
"options": {
|
|
"basemap": {
|
|
"config": {},
|
|
"name": "Layer 0",
|
|
"type": "default"
|
|
},
|
|
"controls": {
|
|
"mouseWheelZoom": true,
|
|
"showAttribution": true,
|
|
"showDebug": false,
|
|
"showMeasure": false,
|
|
"showScale": false,
|
|
"showZoom": true
|
|
},
|
|
"layers": [
|
|
{
|
|
"config": {
|
|
"blur": 27,
|
|
"radius": 25,
|
|
"weight": {
|
|
"field": "Count",
|
|
"fixed": 1,
|
|
"max": 1,
|
|
"min": 0
|
|
}
|
|
},
|
|
"location": {
|
|
"gazetteer": "public/gazetteer/usa-states.json",
|
|
"lookup": "State",
|
|
"mode": "auto"
|
|
},
|
|
"name": "Layer 1",
|
|
"type": "heatmap"
|
|
}
|
|
],
|
|
"tooltip": {
|
|
"mode": "details"
|
|
},
|
|
"view": {
|
|
"id": "coords",
|
|
"lat": 38.251497,
|
|
"lon": -100.932144,
|
|
"shared": false,
|
|
"zoom": 4.15
|
|
}
|
|
},
|
|
"pluginVersion": "9.2.0-pre",
|
|
"targets": [
|
|
{
|
|
"csvFileName": "flight_info_by_state.csv",
|
|
"refId": "A",
|
|
"scenarioId": "csv_file"
|
|
}
|
|
],
|
|
"title": "Heatmap data layer",
|
|
"type": "geomap"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "grafana-testdata-datasource"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "continuous-GrYlRd"
|
|
},
|
|
"custom": {
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green"
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 11,
|
|
"w": 9,
|
|
"x": 9,
|
|
"y": 11
|
|
},
|
|
"id": 65,
|
|
"options": {
|
|
"basemap": {
|
|
"config": {
|
|
"server": "world-imagery"
|
|
},
|
|
"name": "Layer 0",
|
|
"type": "esri-xyz"
|
|
},
|
|
"controls": {
|
|
"mouseWheelZoom": true,
|
|
"showAttribution": true,
|
|
"showDebug": false,
|
|
"showMeasure": false,
|
|
"showScale": false,
|
|
"showZoom": true
|
|
},
|
|
"layers": [
|
|
{
|
|
"config": {
|
|
"color": {
|
|
"fixed": "#ff001e"
|
|
},
|
|
"fillOpacity": 0.4,
|
|
"shape": "star",
|
|
"showLegend": true,
|
|
"size": {
|
|
"field": "Count",
|
|
"fixed": 5,
|
|
"max": 15,
|
|
"min": 2
|
|
}
|
|
},
|
|
"location": {
|
|
"gazetteer": "public/gazetteer/usa-states.json",
|
|
"lookup": "State",
|
|
"mode": "auto"
|
|
},
|
|
"name": "Layer 1",
|
|
"type": "markers"
|
|
}
|
|
],
|
|
"tooltip": {
|
|
"mode": "details"
|
|
},
|
|
"view": {
|
|
"id": "coords",
|
|
"lat": 40.159084,
|
|
"lon": -96.508021,
|
|
"shared": true,
|
|
"zoom": 3.83
|
|
}
|
|
},
|
|
"pluginVersion": "9.2.0-pre",
|
|
"targets": [
|
|
{
|
|
"csvFileName": "flight_info_by_state.csv",
|
|
"refId": "A",
|
|
"scenarioId": "csv_file"
|
|
}
|
|
],
|
|
"title": "Base layer ArcGIS wold imagery + star shape + share view",
|
|
"type": "geomap"
|
|
}
|
|
],
|
|
"refresh": "",
|
|
"schemaVersion": 42,
|
|
"tags": [
|
|
"gdev",
|
|
"panel-tests",
|
|
"geomap"
|
|
],
|
|
"templating": {
|
|
"list": []
|
|
},
|
|
"time": {
|
|
"from": "now-6h",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {
|
|
"refresh_intervals": [
|
|
"10s",
|
|
"30s",
|
|
"1m",
|
|
"5m",
|
|
"15m",
|
|
"30m",
|
|
"1h",
|
|
"2h",
|
|
"1d"
|
|
]
|
|
},
|
|
"timezone": "",
|
|
"title": "Panel Tests - Geomap",
|
|
"uid": "2xuwrgV7z",
|
|
"weekStart": ""
|
|
} |