- Implement full conversion pipeline from v1beta1 → v2beta1 - Ensure frontend–backend parity for all dashboard serialization paths - Add automatic data loss detection for conversions (panels, queries, annotations, links, variables) - Extract atomic conversion functions for v0 → v1beta1 → v2alpha1 → v2beta1 - Introduce conversion metrics and detailed logging for loss tracking - Normalize datasource resolution, defaults, and annotation processing - Improve panel layout serialization and y-coordinate normalization - Fix inconsistencies in nested panels and collapsed row behavior - Refine variable handling: - Filter refId from variable query specs - Default variable refresh to 'never' (matches frontend) - Fix constant and interval variable handling for missing queries - Unify schema defaults (enable, hide, iconColor, editable, liveNow) - Fix pluginId usage (UID vs type) and datasource references - Fix metrics.go bug swallowing errors (return nil → return err) - Add tests for version-specific conversion error handling - Add data loss detection tests using source/target version comparison - Clean up lint issues, legacy code, and redundant files - Update OpenAPI snapshots and migrated dashboards - Improve backend migrator to reuse datasource provider and match frontend logic Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com> Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com> Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
115 lines
2.3 KiB
JSON
115 lines
2.3 KiB
JSON
{
|
|
"title": "V6 Pulldowns and Template Variables Migration Test",
|
|
"schemaVersion": 5,
|
|
"pulldowns": [
|
|
{
|
|
"type": "filtering",
|
|
"enable": true
|
|
},
|
|
{
|
|
"type": "annotations",
|
|
"enable": true,
|
|
"annotations": [
|
|
{
|
|
"name": "deployment",
|
|
"datasource": {
|
|
"uid": "default-ds-uid",
|
|
"type": "prometheus"
|
|
},
|
|
"enable": true,
|
|
"iconColor": "red",
|
|
"query": "ALERTS{alertname=\"DeploymentStarted\"}"
|
|
},
|
|
{
|
|
"name": "alerts",
|
|
"datasource": {
|
|
"uid": "loki-uid",
|
|
"type": "loki"
|
|
},
|
|
"enable": false,
|
|
"iconColor": "yellow",
|
|
"query": "{job=\"alertmanager\"}"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"name": "environment",
|
|
"type": "filter",
|
|
"allFormat": null,
|
|
"query": "label_values(up, instance)"
|
|
},
|
|
{
|
|
"name": "service",
|
|
"datasource": "prometheus",
|
|
"allFormat": "glob",
|
|
"query": "label_values(up, instance)"
|
|
},
|
|
{
|
|
"name": "region",
|
|
"type": "custom",
|
|
"options": [
|
|
{
|
|
"text": "us-east-1",
|
|
"value": "us-east-1"
|
|
},
|
|
{
|
|
"text": "us-west-2",
|
|
"value": "us-west-2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "instance",
|
|
"type": "query",
|
|
"datasource": "prometheus",
|
|
"query": "label_values(up, instance)",
|
|
"refresh": 1
|
|
}
|
|
]
|
|
},
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"title": "CPU Usage",
|
|
"type": "graph",
|
|
"targets": [
|
|
{
|
|
"expr": "cpu_usage{environment=\"$environment\", service=\"$service\"}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 12,
|
|
"x": 0,
|
|
"y": 0
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "Memory Usage",
|
|
"type": "singlestat",
|
|
"targets": [
|
|
{
|
|
"expr": "memory_usage{region=\"$region\"}",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 12,
|
|
"x": 12,
|
|
"y": 0
|
|
}
|
|
}
|
|
],
|
|
"time": {
|
|
"from": "now-1h",
|
|
"to": "now"
|
|
},
|
|
"refresh": "30s"
|
|
}
|