Dashboard Migrations: V13 no-op, remove 28 and v24 as they are autoMigrations; and remove dead code from DashboardMigrator (#110008)

* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

* wip

* complete migration

* fix lint issues

* refactor and test with minimal graph config

* update tests

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* add context and fix latest version

* generate snapshots

* v13 should be no-op

* clean up

* remove v28

* remove singlestat migraiton from frontend migrator because this is an automigration

* remove unused function

* Remove v24 table plugin logic

* cleanup

* remove plugin version for automigrate as it was used only in v24 and v28 that have been removed

* cleanup

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
Haris Rozajac
2025-10-09 11:14:02 -06:00
committed by GitHub
parent 5eb295d850
commit 4d3c5d1550
45 changed files with 3555 additions and 6766 deletions
@@ -329,60 +329,12 @@
}
},
{
"autoMigrateFrom": "table-old",
"columns": [],
"datasource": {
"uid": "gdev-mysql"
},
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"type": "auto"
},
"footer": {
"reducers": []
},
"inspect": false
},
"decimals": 2,
"displayName": "",
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Time"
},
"properties": [
{
"id": "displayName",
"value": "Time"
},
{
"id": "unit",
"value": "time: YYYY-MM-DD HH:mm:ss"
},
{
"id": "custom.align"
}
]
}
]
},
"fontSize": "100%",
"gridPos": {
"h": 9,
"w": 24,
@@ -390,11 +342,36 @@
"y": 18
},
"id": 6,
"options": {
"cellHeight": "sm",
"showHeader": true
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"pluginVersion": "12.1.0",
"styles": [
{
"alias": "Time",
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"link": false,
"pattern": "Time",
"type": "date"
},
{
"alias": "",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [
{
"alias": "",
@@ -408,14 +385,7 @@
}
],
"title": "Values",
"transformations": [
{
"id": "merge",
"options": {
"reducers": []
}
}
],
"transform": "table",
"type": "table"
}
],
@@ -77,40 +77,12 @@
"links": [],
"panels": [
{
"autoMigrateFrom": "table-old",
"columns": [],
"datasource": {
"uid": "gdev-mysql-ds-tests"
},
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"type": "auto"
},
"footer": {
"reducers": []
},
"inspect": false
},
"decimals": 2,
"displayName": "",
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"fontSize": "100%",
"gridPos": {
"h": 4,
"w": 24,
@@ -118,11 +90,28 @@
"y": 0
},
"id": 2,
"options": {
"cellHeight": "sm",
"showHeader": true
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"pluginVersion": "12.1.0",
"styles": [
{
"alias": "",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "string",
"unit": "short"
}
],
"targets": [
{
"alias": "",
@@ -135,71 +124,16 @@
}
],
"title": "Data types",
"transformations": [
{
"id": "merge",
"options": {
"reducers": []
}
}
],
"transform": "table",
"type": "table"
},
{
"autoMigrateFrom": "table-old",
"columns": [],
"datasource": {
"uid": "gdev-mysql-ds-tests"
},
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"type": "auto"
},
"footer": {
"reducers": []
},
"inspect": false
},
"decimals": 2,
"displayName": "",
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "time_sec"
},
"properties": [
{
"id": "displayName",
"value": "Time"
},
{
"id": "unit",
"value": "time: YYYY-MM-DD HH:mm:ss"
},
{
"id": "custom.align"
}
]
}
]
},
"fontSize": "100%",
"gridPos": {
"h": 3,
"w": 6,
@@ -207,11 +141,35 @@
"y": 4
},
"id": 32,
"options": {
"cellHeight": "sm",
"showHeader": true
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"pluginVersion": "12.1.0",
"styles": [
{
"alias": "Time",
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "time_sec",
"type": "date"
},
{
"alias": "",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [
{
"alias": "",
@@ -225,71 +183,16 @@
}
],
"title": "cast(null as unsigned integer) as time",
"transformations": [
{
"id": "merge",
"options": {
"reducers": []
}
}
],
"transform": "table",
"type": "table"
},
{
"autoMigrateFrom": "table-old",
"columns": [],
"datasource": {
"uid": "gdev-mysql-ds-tests"
},
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"type": "auto"
},
"footer": {
"reducers": []
},
"inspect": false
},
"decimals": 2,
"displayName": "",
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "time_sec"
},
"properties": [
{
"id": "displayName",
"value": "Time"
},
{
"id": "unit",
"value": "time: YYYY-MM-DD HH:mm:ss"
},
{
"id": "custom.align"
}
]
}
]
},
"fontSize": "100%",
"gridPos": {
"h": 3,
"w": 6,
@@ -297,11 +200,35 @@
"y": 4
},
"id": 33,
"options": {
"cellHeight": "sm",
"showHeader": true
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"pluginVersion": "12.1.0",
"styles": [
{
"alias": "Time",
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "time_sec",
"type": "date"
},
{
"alias": "",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [
{
"alias": "",
@@ -315,71 +242,16 @@
}
],
"title": "cast(null as datetime) as time",
"transformations": [
{
"id": "merge",
"options": {
"reducers": []
}
}
],
"transform": "table",
"type": "table"
},
{
"autoMigrateFrom": "table-old",
"columns": [],
"datasource": {
"uid": "gdev-mysql-ds-tests"
},
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"type": "auto"
},
"footer": {
"reducers": []
},
"inspect": false
},
"decimals": 2,
"displayName": "",
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "time_sec"
},
"properties": [
{
"id": "displayName",
"value": "Time"
},
{
"id": "unit",
"value": "time: YYYY-MM-DD HH:mm:ss"
},
{
"id": "custom.align"
}
]
}
]
},
"fontSize": "100%",
"gridPos": {
"h": 3,
"w": 6,
@@ -387,11 +259,35 @@
"y": 4
},
"id": 34,
"options": {
"cellHeight": "sm",
"showHeader": true
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"pluginVersion": "12.1.0",
"styles": [
{
"alias": "Time",
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "time_sec",
"type": "date"
},
{
"alias": "",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [
{
"alias": "",
@@ -405,71 +301,16 @@
}
],
"title": "cast()NOW() as datetime) as time",
"transformations": [
{
"id": "merge",
"options": {
"reducers": []
}
}
],
"transform": "table",
"type": "table"
},
{
"autoMigrateFrom": "table-old",
"columns": [],
"datasource": {
"uid": "gdev-mysql-ds-tests"
},
"fieldConfig": {
"defaults": {
"custom": {
"cellOptions": {
"type": "auto"
},
"footer": {
"reducers": []
},
"inspect": false
},
"decimals": 2,
"displayName": "",
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "time"
},
"properties": [
{
"id": "displayName",
"value": "Time"
},
{
"id": "unit",
"value": "time: YYYY-MM-DD HH:mm:ss"
},
{
"id": "custom.align"
}
]
}
]
},
"fontSize": "100%",
"gridPos": {
"h": 3,
"w": 6,
@@ -477,11 +318,35 @@
"y": 4
},
"id": 35,
"options": {
"cellHeight": "sm",
"showHeader": true
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"pluginVersion": "12.1.0",
"styles": [
{
"alias": "Time",
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "time",
"type": "date"
},
{
"alias": "",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [
{
"alias": "",
@@ -495,14 +360,7 @@
}
],
"title": "NOW() as time",
"transformations": [
{
"id": "merge",
"options": {
"reducers": []
}
}
],
"transform": "table",
"type": "table"
},
{