Dashboard Migrations: V6 pulldowns to annotations; variables (#112221)

* 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

* migrate to v12

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* migrate to v11

* migrate to v10

* add test files

* update

* migrate to v9

* migrate to v8

* add context and fix latest version

* add context

* add context

* generate snapshots

* v13 should be no-op

* clean up

* fix tests

* add context

* snapshots

* generate snapshots

* update

* snapshots

* wip

* fix test

* remove nav when cleaning up defaults

* migrate to v6

* update comments

* 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

* update snapshot

* update snapshot

* update snapshot

* update snapshot

* remove test

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
Haris Rozajac
2025-10-14 07:16:34 -06:00
committed by GitHub
parent 8a827b5b05
commit 394922c4c8
9 changed files with 1033 additions and 21 deletions
@@ -0,0 +1,123 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": "prometheus",
"enable": true,
"iconColor": "red",
"name": "deployment",
"query": "ALERTS{alertname=\"DeploymentStarted\"}"
},
{
"datasource": "loki",
"enable": false,
"iconColor": "yellow",
"name": "alerts",
"query": "{job=\"alertmanager\"}"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"autoMigrateFrom": "graph",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"targets": [
{
"expr": "cpu_usage{environment=\"$environment\", service=\"$service\"}",
"refId": "A"
}
],
"title": "CPU Usage",
"type": "timeseries"
},
{
"autoMigrateFrom": "singlestat",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"targets": [
{
"expr": "memory_usage{region=\"$region\"}",
"refId": "B"
}
],
"title": "Memory Usage",
"type": "stat"
}
],
"refresh": "30s",
"schemaVersion": 6,
"tags": [],
"templating": {
"list": [
{
"name": "environment",
"options": [],
"type": "query"
},
{
"allFormat": "glob",
"datasource": "prometheus",
"name": "service",
"options": [],
"type": "query"
},
{
"name": "region",
"options": [
{
"text": "us-east-1",
"value": "us-east-1"
},
{
"text": "us-west-2",
"value": "us-west-2"
}
],
"type": "custom"
},
{
"datasource": "prometheus",
"name": "instance",
"options": [],
"query": "label_values(up, instance)",
"refresh": 1,
"type": "query"
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "V6 Pulldowns and Template Variables Migration Test",
"weekStart": ""
}