Migrations: Compare backend and frontend outputs to ensure feature parity (#106851)

* wip: trying to understand how to get the ds info from migrator

* add datasource info provider

* Use DS service to fetch DS data

* add more tests cases to match with migrator cases

* Add snapshots

* Non-existing DS

* Add different DS for snapshots

* fix import

* Fix tests: guard against double initialization

* don't use full datasource package in test

* min version should be 35

* fix test

* fix conversion test

* Dashboards: Support schemaVersion v35 migration in backend

* Dashboards: Support schemaVersion v34 migration in backend

* Dashboards: Support schemaVersion v33 migration in backend

* Apply suggestions from code review

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* Apply feedback

* Remove unused parameters

* Refactor to follow Go patterns

* Update logic

* Only write final migration result as output

* Compare backend and frontend results

* Improve snapshots to cover all possible use cases

* Linter

* wip make it consistent v33

* apply feedback

* Return default when the ref cannot be found

* Update apps/dashboard/pkg/migration/schemaversion/v33.go

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* apply feedback

* Use same mocks backend/frontend

* restore migrations

* update snapshots

* Adapt migration tests to use min versions

* Ensure v40-v41 works

* Ensure v39-v40 works

* Simplify the naming of the files

* adjust jest to new input convention

* Ensure every migration v36-v41 works

* Improve v38 naming

* Ensure v36 migrates correctly

* Skip v36 refs migrations on rows

* Treat rows as frontend and ensure same results for v36

* Ensure v34 runs with the same logic than the frontend

* Leave empty stadistics as valid option

* ensure v33 is working as the frontend

* Update tests

* Undo frontend changes for legend handling

* Remove filtering by version in the frontend

* linter

* Clean up v33 input JSON

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
Ivan Ortega Alba
2025-07-03 12:23:51 +02:00
committed by GitHub
parent b7153d4d20
commit 93c14c52da
109 changed files with 6762 additions and 21950 deletions
@@ -1,561 +0,0 @@
{
"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": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"name": "CloudWatch Annotation Single Stat",
"enable": true,
"iconColor": "red",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["Average"]
},
{
"name": "CloudWatch Annotation Multiple Stats",
"enable": true,
"iconColor": "blue",
"dimensions": {
"InstanceId": "i-789012"
},
"namespace": "AWS/RDS",
"region": "us-west-2",
"prefixMatching": false,
"statistics": ["Maximum", "Minimum", "Sum"]
},
{
"datasource": "",
"enable": true,
"name": "Test Empty String Annotation",
"type": "dashboard"
},
{
"datasource": "another-missing-ds",
"enable": true,
"name": "Test Another Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
},
{
"type": "timeseries",
"title": "Timeseries Panel with Hidden Axes",
"id": 10,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"type": "timeseries",
"title": "CloudWatch Single Query Multiple Stats",
"id": 11,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"targets": [
{
"refId": "A",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum", "Minimum"],
"period": "300",
"alias": "CPU Usage"
}
]
},
{
"type": "timeseries",
"title": "Mixed CloudWatch and Prometheus Queries",
"id": 12,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"targets": [
{
"refId": "A",
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-2",
"metricName": "RequestCount",
"statistics": ["Sum", "Average"]
},
{
"refId": "B",
"expr": "up",
"datasource": "prometheus"
},
{
"refId": "C",
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"namespace": "AWS/RDS",
"region": "us-east-1",
"metricName": "DatabaseConnections",
"statistics": ["Maximum"]
}
]
},
{
"type": "row",
"collapsed": true,
"title": "Collapsed Row with CloudWatch",
"id": 13,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"panels": [
{
"type": "timeseries",
"title": "Nested CloudWatch Panel",
"id": 14,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"targets": [
{
"refId": "A",
"dimensions": {
"QueueName": "my-queue"
},
"namespace": "AWS/SQS",
"region": "us-east-1",
"metricName": "ApproximateNumberOfMessages",
"statistics": ["Average", "Maximum", "Sum"]
}
]
}
]
},
{
"type": "stat",
"title": "V33: Panel with Null Datasource",
"id": 15,
"datasource": null,
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 64
},
"targets": [
{
"refId": "A",
"datasource": "non-default-test-ds-uid"
}
]
},
{
"type": "stat",
"title": "V33: Panel with Existing Datasource Reference",
"id": 16,
"datasource": {
"uid": "existing-ref-uid",
"type": "prometheus"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 64
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch"
}
}
]
},
{
"type": "table",
"title": "V33: Panel without Targets",
"id": 17,
"datasource": "Non Default Test Datasource",
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 64
}
},
{
"type": "table",
"title": "V33: Panel with Empty Targets Array",
"id": 18,
"datasource": "default",
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 64
},
"targets": []
},
{
"type": "graph",
"title": "V33: Target Datasource Edge Cases",
"id": 19,
"datasource": "non-default-test-ds-uid",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 68
},
"targets": [
{
"refId": "A",
"datasource": null
},
{
"refId": "B",
"datasource": "default"
},
{
"refId": "C",
"datasource": "non-existing-ds"
},
{
"refId": "D"
}
]
},
{
"type": "timeseries",
"title": "V33: Mixed Target References",
"id": 20,
"datasource": null,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 68
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-ref",
"type": "prometheus"
}
},
{
"refId": "B",
"datasource": "Non Default Test Datasource"
},
{
"refId": "C",
"datasource": "default"
}
]
},
{
"type": "stat",
"title": "V33: Panel with Empty String Datasource",
"id": 21,
"datasource": "",
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 76
},
"targets": [
{
"refId": "A",
"datasource": ""
}
]
},
{
"type": "table",
"title": "V33: Panel with Another Non-existing Datasource",
"id": 22,
"datasource": "completely-missing-ds",
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 76
},
"targets": [
{
"refId": "A",
"datasource": "also-missing-ds"
},
{
"refId": "B",
"datasource": ""
}
]
}
],
"preload": false,
"refresh": true,
"schemaVersion": 32,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
},
{
"type": "query",
"datasource": "",
"name": "empty_string_var"
},
{
"type": "query",
"datasource": "another-non-existing-ds",
"name": "another_non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,375 +0,0 @@
{
"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": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
},
{
"name": "CloudWatch Annotation Single Stat",
"enable": true,
"iconColor": "red",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["Average"]
},
{
"name": "CloudWatch Annotation Multiple Stats",
"enable": true,
"iconColor": "blue",
"dimensions": {
"InstanceId": "i-789012"
},
"namespace": "AWS/RDS",
"region": "us-west-2",
"prefixMatching": false,
"statistics": ["Maximum", "Minimum", "Sum"]
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
},
{
"type": "timeseries",
"title": "Timeseries Panel with Hidden Axes",
"id": 10,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"type": "timeseries",
"title": "CloudWatch Single Query Multiple Stats",
"id": 11,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"targets": [
{
"refId": "A",
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum", "Minimum"],
"period": "300",
"alias": "CPU Usage"
}
]
},
{
"type": "timeseries",
"title": "Mixed CloudWatch and Prometheus Queries",
"id": 12,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 48
},
"targets": [
{
"refId": "A",
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-2",
"metricName": "RequestCount",
"statistics": ["Sum", "Average"]
},
{
"refId": "B",
"expr": "up",
"datasource": "prometheus"
},
{
"refId": "C",
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"namespace": "AWS/RDS",
"region": "us-east-1",
"metricName": "DatabaseConnections",
"statistics": ["Maximum"]
}
]
},
{
"type": "row",
"collapsed": true,
"title": "Collapsed Row with CloudWatch",
"id": 13,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 56
},
"panels": [
{
"type": "timeseries",
"title": "Nested CloudWatch Panel",
"id": 14,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"targets": [
{
"refId": "A",
"dimensions": {
"QueueName": "my-queue"
},
"namespace": "AWS/SQS",
"region": "us-east-1",
"metricName": "ApproximateNumberOfMessages",
"statistics": ["Average", "Maximum", "Sum"]
}
]
}
]
}
],
"preload": false,
"refresh": true,
"schemaVersion": 33,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,251 +0,0 @@
{
"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": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
},
{
"type": "timeseries",
"title": "Timeseries Panel with Hidden Axes",
"id": 10,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
}
],
"preload": false,
"refresh": true,
"schemaVersion": 34,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,231 +0,0 @@
{
"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": "Non Default Test Datasource",
"enable": true,
"name": "Test Annotation by Name",
"type": "dashboard"
},
{
"datasource": "non-default-test-ds-uid",
"enable": true,
"name": "Test Annotation by UID",
"type": "dashboard"
},
{
"datasource": "default",
"enable": true,
"name": "Test Default Annotation",
"type": "dashboard"
},
{
"datasource": "non-existing-ds",
"enable": true,
"name": "Test Non-existing Annotation",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
},
{
"datasource": "default",
"title": "Mixed Datasources Panel",
"id": 7,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": {
"uid": "-- Mixed --"
},
"title": "Mixed Panel with Mixed Targets",
"id": 8,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"targets": [
{
"datasource": "non-default-test-ds-uid"
},
{
"datasource": "Non Default Test Datasource"
}
]
},
{
"datasource": "non-existing-ds",
"title": "Non-existing Datasource Panel",
"id": 9,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"targets": [
{
"datasource": "non-existing-ds"
}
]
}
],
"preload": false,
"refresh": true,
"schemaVersion": 35,
"tags": [],
"templating": {
"list": [
{
"type": "query",
"datasource": "default",
"name": "default_var"
},
{
"type": "query",
"datasource": "Non Default Test Datasource",
"name": "es_var_by_name"
},
{
"type": "query",
"datasource": "non-default-test-ds-uid",
"name": "es_var_by_uid"
},
{
"type": "query",
"datasource": null,
"name": "null_var"
},
{
"type": "query",
"datasource": "non-existing-ds",
"name": "non_existing_var"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,125 +0,0 @@
{
"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"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"type": "graph",
"options": {},
"title": "No Legend Config",
"id": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"options": {
"legend": true
},
"title": "Boolean Legend True",
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"options": {
"legend": false
},
"title": "Boolean Legend False",
"id": 3,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
}
},
{
"options": {
"legend": {
"displayMode": "hidden"
}
},
"title": "Hidden DisplayMode",
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
}
},
{
"options": {
"legend": {
"showLegend": false
}
},
"title": "ShowLegend False",
"id": 5,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
}
},
{
"options": {
"legend": {
"displayMode": "table"
}
},
"title": "Visible Legend",
"id": 6,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
}
}
],
"preload": false,
"refresh": true,
"schemaVersion": 36,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,362 +0,0 @@
{
"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"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "basic"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Basic Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "gradient-gauge"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Gradient Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "lcd-gauge"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "LCD Gauge Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "color-background"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "color-background-solid"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 5,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Color Background Solid Display Mode",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"displayMode": "some-other-mode"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Other Display Mode",
"type": "table"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 37,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,155 +0,0 @@
{
"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"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "mean",
"B": "max"
}
}
}
],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "B"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"refresh": true,
"schemaVersion": 38,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": ""
}
@@ -1,136 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": "",
"refresh": true,
"schemaVersion": 39
}
@@ -1,136 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.0-81438",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"queryType": "randomWalk",
"refId": "A"
}
],
"title": "Panel Title",
"type": "timeseries"
}
],
"preload": false,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "New dashboard",
"version": 0,
"weekStart": "",
"refresh": "",
"schemaVersion": 40
}
@@ -0,0 +1,166 @@
{
"schemaVersion": 32,
"title": "V33 Panel Datasource Name to Ref Test",
"panels": [
{
"type": "stat",
"title": "Panel Datasource: null → should stay null",
"description": "Tests v33 migration behavior when panel datasource is explicitly null. Should remain null after migration (returnDefaultAsNull: true).",
"id": 1,
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": "non-default-test-ds-uid",
"description": "Target with UID reference should migrate to full object"
}
]
},
{
"type": "stat",
"title": "Panel Datasource: existing object → should stay unchanged",
"description": "Tests v33 migration behavior when panel datasource is already a proper object reference. Should remain unchanged.",
"id": 2,
"datasource": {
"uid": "existing-ref-uid",
"type": "prometheus"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch"
},
"description": "Target with existing object should remain unchanged"
}
]
},
{
"type": "table",
"title": "Panel Datasource: string name → should migrate to object",
"description": "Tests v33 migration when panel datasource is a string name. Should convert to proper object with uid, type, apiVersion.",
"id": 3,
"datasource": "Non Default Test Datasource Name"
},
{
"type": "table",
"title": "Panel Datasource: string name with empty targets → should migrate",
"description": "Tests v33 migration when panel has datasource string but empty targets array. Panel datasource should still migrate.",
"id": 4,
"datasource": "Default Test Datasource Name",
"targets": []
},
{
"type": "graph",
"title": "Target Datasources: mixed null/string/non-existing scenarios",
"description": "Tests v33 target migration with various edge cases: null target (unchanged), valid string (migrated), non-existing string (preserved), missing datasource field (unchanged).",
"id": 5,
"datasource": "non-default-test-ds-uid",
"targets": [
{
"refId": "A",
"datasource": null,
"description": "Null target datasource should remain null"
},
{
"refId": "B",
"datasource": "Default Test Datasource Name",
"description": "Valid string should migrate to object"
},
{
"refId": "C",
"datasource": "non-existing-ds",
"description": "Non-existing datasource should be preserved as-is (migration returns nil)"
},
{
"refId": "D",
"description": "Target without datasource field should remain unchanged"
}
]
},
{
"type": "timeseries",
"title": "Panel: null datasource with mixed target types",
"description": "Tests v33 migration when panel datasource is null but targets have mixed reference types (object, string). Panel should stay null, targets should migrate appropriately.",
"id": 6,
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-ref",
"type": "prometheus"
},
"description": "Existing object target should remain unchanged"
},
{
"refId": "B",
"datasource": "Non Default Test Datasource Name",
"description": "String target should migrate to object"
},
{
"refId": "C",
"datasource": "Default Test Datasource Name",
"description": "Default datasource string should migrate to object"
}
]
},
{
"type": "stat",
"title": "Empty string datasource → should return empty object {}",
"description": "Tests v33 migration behavior with empty string datasource. Should migrate to empty object {} based on MigrateDatasourceNameToRef logic.",
"id": 7,
"datasource": "",
"targets": [
{
"refId": "A",
"datasource": "",
"description": "Empty string target should also migrate to empty object {}"
}
]
},
{
"type": "table",
"title": "Non-existing datasources → should be preserved as-is",
"description": "Tests v33 migration with completely unknown datasource names. Since migration returns nil for unknown datasources, they should be preserved unchanged.",
"id": 8,
"datasource": "completely-missing-ds",
"targets": [
{
"refId": "A",
"datasource": "also-missing-ds",
"description": "Unknown target datasource should remain unchanged (migration returns nil)"
},
{
"refId": "B",
"datasource": "",
"description": "Empty string target should migrate to {}"
}
]
},
{
"type": "row",
"title": "Row Panel: nested panels should also migrate",
"description": "Tests v33 migration handles nested panels within collapsed rows. Nested panel datasources should migrate same as top-level panels.",
"id": 9,
"collapsed": true,
"panels": [
{
"type": "timeseries",
"title": "Nested Panel: string datasource → should migrate to object",
"description": "Nested panel with string datasource should migrate to proper object reference, proving row panel recursion works.",
"id": 10,
"datasource": "Non Default Test Datasource Name",
"targets": [
{
"refId": "A",
"datasource": "Default Test Datasource Name",
"description": "Nested target should also migrate from string to object"
}
]
}
]
}
]
}
@@ -0,0 +1,366 @@
{
"title": "CloudWatch Multiple Statistics Test Dashboard",
"schemaVersion": 33,
"annotations": {
"list": [
{
"name": "CloudWatch Annotation Single Statistic",
"enable": true,
"iconColor": "red",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["Average"]
},
{
"name": "CloudWatch Annotation Multiple Statistics",
"enable": true,
"iconColor": "blue",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"InstanceId": "i-789012"
},
"namespace": "AWS/RDS",
"region": "us-west-2",
"prefixMatching": false,
"statistics": ["Maximum", "Minimum", "Sum"]
},
{
"name": "CloudWatch Annotation Empty Statistics",
"enable": true,
"iconColor": "green",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"LoadBalancer": "my-lb"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-1",
"prefixMatching": false,
"statistics": []
},
{
"name": "CloudWatch Annotation Invalid Statistics",
"enable": true,
"iconColor": "yellow",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"TableName": "my-table"
},
"namespace": "AWS/DynamoDB",
"region": "us-east-1",
"prefixMatching": false,
"statistics": ["InvalidStat", "Sum", null, "Average"]
},
{
"name": "Non-CloudWatch Annotation",
"enable": true,
"iconColor": "purple",
"datasource": {
"uid": "prometheus"
}
}
]
},
"panels": [
{
"id": 1,
"type": "timeseries",
"title": "CloudWatch Single Query Multiple Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"InstanceId": "i-123456"
},
"namespace": "AWS/EC2",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum", "Minimum"],
"period": "300"
}
]
},
{
"id": 2,
"type": "timeseries",
"title": "CloudWatch Single Query Single Statistic",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"LoadBalancer": "my-load-balancer"
},
"namespace": "AWS/ApplicationELB",
"region": "us-west-2",
"metricName": "RequestCount",
"statistics": ["Sum"]
}
]
},
{
"id": 3,
"type": "timeseries",
"title": "CloudWatch Query No Statistics Array",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"DBInstanceIdentifier": "my-db"
},
"namespace": "AWS/RDS",
"region": "us-east-1",
"metricName": "DatabaseConnections",
"statistic": "Maximum"
}
]
},
{
"id": 4,
"type": "timeseries",
"title": "Mixed CloudWatch and Non-CloudWatch Queries",
"datasource": {
"uid": "prometheus"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"QueueName": "my-queue"
},
"namespace": "AWS/SQS",
"region": "us-east-1",
"metricName": "ApproximateNumberOfMessages",
"statistics": ["Average", "Maximum"]
},
{
"refId": "B",
"expr": "up",
"datasource": {
"uid": "prometheus"
}
},
{
"refId": "C",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"TopicName": "my-topic"
},
"namespace": "AWS/SNS",
"region": "us-west-1",
"metricName": "NumberOfMessagesPublished",
"statistics": ["Sum"]
}
]
},
{
"id": 5,
"type": "timeseries",
"title": "CloudWatch Query Empty Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"BucketName": "my-bucket"
},
"namespace": "AWS/S3",
"region": "us-east-1",
"metricName": "BucketSizeBytes",
"statistics": []
}
]
},
{
"id": 6,
"type": "timeseries",
"title": "CloudWatch Query Invalid Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"FunctionName": "my-function"
},
"namespace": "AWS/Lambda",
"region": "us-west-2",
"metricName": "Duration",
"statistics": ["InvalidStat", "Average", null, "Maximum", ""]
}
]
},
{
"id": 7,
"type": "row",
"collapsed": true,
"title": "Collapsed Row with CloudWatch",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
}
}
],
"panels": [
{
"id": 8,
"type": "timeseries",
"title": "Nested CloudWatch Query Multiple Statistics",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"StreamName": "my-stream"
},
"namespace": "AWS/Kinesis",
"region": "us-east-1",
"metricName": "IncomingRecords",
"statistics": ["Sum", "Average", "Maximum"]
}
]
}
]
},
{
"id": 9,
"type": "timeseries",
"title": "CloudWatch Query with Existing Editor Mode",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
},
"dimensions": {
"ClusterName": "my-cluster"
},
"namespace": "AWS/ECS",
"region": "us-east-1",
"metricName": "CPUUtilization",
"statistics": ["Average", "Maximum"],
"metricEditorMode": 1,
"metricQueryType": 1,
"period": "300"
}
]
},
{
"id": 10,
"type": "timeseries",
"title": "Non-CloudWatch Panel",
"datasource": {
"uid": "prometheus"
},
"targets": [
{
"refId": "A",
"expr": "cpu_usage",
"datasource": {
"uid": "prometheus"
}
}
]
}
]
}
@@ -0,0 +1,100 @@
{
"title": "X-Axis Visibility Test Dashboard",
"schemaVersion": 34,
"panels": [
{
"title": "Timeseries with Hidden Axis",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"title": "Timeseries with Hidden Axis and Existing Overrides",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Series A"
},
"properties": [
{
"id": "color.mode",
"value": "palette-classic"
}
]
}
]
}
},
{
"title": "Timeseries with Auto Axis (No Change Expected)",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "auto"
}
},
"overrides": []
}
},
{
"title": "Stat Panel with Hidden Axis (No Change Expected)",
"type": "stat",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
},
"overrides": []
}
},
{
"title": "Timeseries with Missing FieldConfig",
"type": "timeseries",
"id": 5
},
{
"title": "Timeseries with Missing Defaults",
"type": "timeseries",
"fieldConfig": {
"overrides": []
}
},
{
"title": "Timeseries with Missing Custom Config",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"unit": "bytes"
},
"overrides": []
}
},
{
"title": "Timeseries with Missing Overrides Array",
"type": "timeseries",
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden"
}
}
}
}
]
}
@@ -0,0 +1,286 @@
{
"title": "Datasource Reference Migration Test Dashboard",
"schemaVersion": 35,
"annotations": {
"list": [
{
"name": "Default Annotation - Tests default datasource migration",
"datasource": {
"uid": "default-ds-uid",
"type": "prometheus",
"apiVersion": "v1"
}
},
{
"name": "Named Datasource Annotation - Tests migration by datasource name",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "UID Datasource Annotation - Tests migration by datasource UID",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "Null Datasource Annotation - Tests null datasource fallback to default",
"datasource": null
},
{
"name": "Unknown Datasource Annotation - Tests unknown datasource preserved as UID",
"datasource": {
"uid": "unknown-datasource-name"
}
}
]
},
"templating": {
"list": [
{
"name": "query_var_null",
"type": "query",
"datasource": null
},
{
"name": "query_var_named",
"type": "query",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "query_var_uid",
"type": "query",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
},
{
"name": "query_var_unknown",
"type": "query",
"datasource": {
"uid": "unknown-datasource"
}
},
{
"name": "non_query_var",
"type": "constant",
"datasource": null
}
]
},
"panels": [
{
"id": 1,
"title": "Panel with Null Datasource and Targets",
"description": "Tests null panel datasource migration with targets - should fallback to default",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": null
}
]
},
{
"id": 2,
"title": "Panel with Null Datasource and Empty Targets",
"description": "Tests null panel datasource with empty targets array - should create default target",
"datasource": null,
"targets": []
},
{
"id": 3,
"title": "Panel with No Targets Array",
"description": "Tests null panel datasource with missing targets - should create default target array",
"datasource": null
},
{
"id": 4,
"title": "Panel with Mixed Datasources",
"description": "Tests mixed datasource panel - targets should migrate independently",
"datasource": {
"uid": "-- Mixed --"
},
"targets": [
{
"refId": "A",
"datasource": null
},
{
"refId": "B",
"datasource": {
"uid": "existing-target-uid"
}
}
]
},
{
"id": 5,
"title": "Panel with Existing Object Datasource",
"description": "Tests panel with already migrated datasource object - should preserve existing refs",
"datasource": {
"uid": "existing-ref-uid",
"type": "prometheus"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch"
}
}
]
},
{
"id": 6,
"title": "Panel with Unknown Datasource Name",
"description": "Tests panel with unknown datasource - should preserve as UID-only reference",
"datasource": {
"uid": "unknown-panel-datasource"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "unknown-target-datasource"
}
}
]
},
{
"id": 7,
"title": "Panel with Expression Query",
"description": "Tests panel with expression query - should not inherit expression as panel datasource",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid"
}
},
{
"refId": "B",
"datasource": {
"uid": "__expr__",
"type": "__expr__"
}
}
]
},
{
"id": 8,
"title": "Panel Inheriting from Target",
"description": "Tests panel inheriting datasource from target when panel datasource was default",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid"
}
}
]
},
{
"id": 9,
"title": "Panel with Named Datasource",
"description": "Tests panel with datasource referenced by name - should migrate to full object",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
}
]
},
{
"id": 10,
"title": "Panel with UID Datasource",
"description": "Tests panel with datasource referenced by UID - should migrate to full object",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
}
]
},
{
"id": 11,
"type": "row",
"title": "Simple Row Panel",
"description": "Tests row panel - it gets datasource or targets fields added even it is not needed, but this is how it works in frontend",
"collapsed": false,
"panels": []
},
{
"id": 12,
"type": "row",
"title": "Collapsed Row with Nested Panels",
"description": "Tests collapsed row with nested panels - nested panels should migrate",
"collapsed": true,
"panels": [
{
"id": 13,
"title": "Nested Panel with Default Datasource",
"description": "Nested panel in collapsed row with default datasource",
"datasource": null,
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid"
}
}
]
},
{
"id": 14,
"title": "Nested Panel with Unknown Datasource",
"description": "Nested panel in collapsed row with unknown datasource",
"datasource": {
"uid": "unknown-nested-datasource"
},
"targets": [
{
"refId": "A",
"datasource": {
"uid": "existing-target-uid",
"type": "elasticsearch",
"apiVersion": "v2"
}
}
]
}
]
}
]
}
@@ -0,0 +1,126 @@
{
"title": "V37 Legend Normalization Test Dashboard",
"schemaVersion": 36,
"panels": [
{
"type": "timeseries",
"title": "Panel with Boolean Legend True",
"id": 1,
"options": {
"legend": true
}
},
{
"type": "timeseries",
"title": "Panel with Boolean Legend False",
"id": 2,
"options": {
"legend": false
}
},
{
"type": "graph",
"title": "Panel with Hidden DisplayMode",
"id": 3,
"options": {
"legend": {
"displayMode": "hidden",
"showLegend": true
}
}
},
{
"type": "stat",
"title": "Panel with ShowLegend False",
"id": 4,
"options": {
"legend": {
"displayMode": "table",
"showLegend": false
}
}
},
{
"type": "barchart",
"title": "Panel with Table Legend",
"id": 5,
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom"
}
}
},
{
"type": "histogram",
"title": "Panel with List Legend",
"id": 6,
"options": {
"legend": {
"displayMode": "list",
"placement": "right"
}
}
},
{
"type": "text",
"title": "Panel with No Options",
"id": 7
},
{
"type": "gauge",
"title": "Panel with No Legend Config",
"id": 8,
"options": {
"reduceOptions": {
"fields": "/.*temperature.*/"
}
}
},
{
"type": "piechart",
"title": "Panel with Null Legend",
"id": 9,
"options": {
"legend": null
}
},
{
"type": "row",
"title": "Row with Nested Panels Having Various Legend Configs",
"id": 10,
"collapsed": false,
"panels": [
{
"type": "timeseries",
"title": "Nested Panel with Boolean Legend",
"id": 11,
"options": {
"legend": true
}
},
{
"type": "graph",
"title": "Nested Panel with Hidden DisplayMode",
"id": 12,
"options": {
"legend": {
"displayMode": "hidden"
}
}
},
{
"type": "stat",
"title": "Nested Panel with Conflicting Properties",
"id": 13,
"options": {
"legend": {
"displayMode": "table",
"showLegend": false
}
}
}
]
}
]
}
@@ -0,0 +1,187 @@
{
"title": "V38 Table Migration Comprehensive Test Dashboard",
"schemaVersion": 37,
"panels": [
{
"type": "table",
"title": "Table with Basic Gauge",
"id": 1,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Gradient Gauge",
"id": 2,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with LCD Gauge",
"id": 3,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "lcd-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background",
"id": 4,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background Solid",
"id": 5,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background-solid"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Unknown Mode",
"id": 6,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "some-other-mode"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with No Display Mode",
"id": 7,
"fieldConfig": {
"defaults": {
"custom": {
"width": 100
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Overrides",
"id": 8,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field1"
},
"properties": [
{
"id": "custom.displayMode",
"value": "gradient-gauge"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Field2"
},
"properties": [
{
"id": "custom.displayMode",
"value": "color-background"
}
]
}
]
}
},
{
"type": "graph",
"title": "Non-table Panel (Should Remain Unchanged)",
"id": 9
},
{
"type": "row",
"title": "Row with Nested Table Panels",
"id": 10,
"collapsed": false,
"panels": [
{
"type": "table",
"title": "Nested Table with Basic Mode",
"id": 11,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Nested Table with Gradient Gauge",
"id": 12,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "NestedField"
},
"properties": [
{
"id": "custom.displayMode",
"value": "lcd-gauge"
}
]
}
]
}
}
]
}
]
}
@@ -0,0 +1,187 @@
{
"title": "V38 Table Migration Test Dashboard",
"schemaVersion": 37,
"panels": [
{
"type": "table",
"title": "Table with Basic Gauge",
"id": 1,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Gradient Gauge",
"id": 2,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with LCD Gauge",
"id": 3,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "lcd-gauge"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background",
"id": 4,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Color Background Solid",
"id": 5,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "color-background-solid"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Unknown Mode",
"id": 6,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "some-other-mode"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with No Display Mode",
"id": 7,
"fieldConfig": {
"defaults": {
"custom": {
"width": 100
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Table with Overrides",
"id": 8,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field1"
},
"properties": [
{
"id": "custom.displayMode",
"value": "gradient-gauge"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Field2"
},
"properties": [
{
"id": "custom.displayMode",
"value": "color-background"
}
]
}
]
}
},
{
"type": "graph",
"title": "Non-table Panel (Should Remain Unchanged)",
"id": 9
},
{
"type": "row",
"title": "Row with Nested Table Panels",
"id": 10,
"collapsed": false,
"panels": [
{
"type": "table",
"title": "Nested Table with Basic Mode",
"id": 11,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "basic"
}
},
"overrides": []
}
},
{
"type": "table",
"title": "Nested Table with Gradient Gauge",
"id": 12,
"fieldConfig": {
"defaults": {
"custom": {
"displayMode": "gradient-gauge"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "NestedField"
},
"properties": [
{
"id": "custom.displayMode",
"value": "lcd-gauge"
}
]
}
]
}
}
]
}
]
}
@@ -0,0 +1,145 @@
{
"title": "V39 TimeSeriesTable Transformation Migration Test Dashboard",
"schemaVersion": 38,
"panels": [
{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Single Stat",
"id": 1,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "mean"
}
}
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable Transformation - Multiple Stats",
"id": 2,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "mean",
"B": "max",
"C": "min",
"D": "sum"
}
}
}
]
},
{
"type": "graph",
"title": "Panel with TimeSeriesTable Transformation - Mixed with Other Transforms",
"id": 3,
"transformations": [
{
"id": "reduce",
"options": {
"reducers": ["mean"]
}
},
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"A": "last",
"B": "first"
}
}
},
{
"id": "organize",
"options": {
"excludeByName": {}
}
}
]
},
{
"type": "stat",
"title": "Panel with Non-TimeSeriesTable Transformation (Should Remain Unchanged)",
"id": 4,
"transformations": [
{
"id": "reduce",
"options": {
"reducers": ["mean", "max"]
}
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable - Empty RefIdToStat",
"id": 5,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {}
}
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable - No Options (Should Skip)",
"id": 6,
"transformations": [
{
"id": "timeSeriesTable"
}
]
},
{
"type": "table",
"title": "Panel with TimeSeriesTable - Invalid Options (Should Skip)",
"id": 7,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"someOtherOption": "value"
}
}
]
},
{
"type": "graph",
"title": "Panel with No Transformations (Should Remain Unchanged)",
"id": 8
},
{
"type": "row",
"title": "Row with Nested Panels Having TimeSeriesTable Transformations",
"id": 9,
"collapsed": false,
"panels": [
{
"type": "table",
"title": "Nested Panel with TimeSeriesTable",
"id": 10,
"transformations": [
{
"id": "timeSeriesTable",
"options": {
"refIdToStat": {
"NestedA": "median",
"NestedB": "stdDev"
}
}
}
]
}
]
}
]
}
@@ -0,0 +1,10 @@
{
"title": "Empty String Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": ""
}
@@ -0,0 +1,10 @@
{
"title": "Boolean False Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": false
}
@@ -0,0 +1,9 @@
{
"title": "Refresh Not Set Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
}
}
@@ -0,0 +1,10 @@
{
"title": "Numeric Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": 60
}
@@ -0,0 +1,10 @@
{
"title": "String Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": "1m"
}
@@ -0,0 +1,10 @@
{
"title": "Boolean Refresh Test Dashboard",
"schemaVersion": 39,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": true
}
@@ -0,0 +1,10 @@
{
"title": "No Time Picker Test Dashboard",
"schemaVersion": 40,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": ""
}
@@ -0,0 +1,7 @@
{
"title": "Time Picker No Time Options Test Dashboard",
"schemaVersion": 40,
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
}
}
@@ -0,0 +1,14 @@
{
"title": "Time Picker Time Options Test Dashboard",
"schemaVersion": 40,
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"refresh": ""
}