Schema: convert dashboards from v1beta1 to v2beta1 (#109037)

- 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>
This commit is contained in:
Ivan Ortega Alba
2025-11-12 11:43:46 +01:00
committed by GitHub
co-authored by Haris Rozajac Oscar Kilhed Stephanie Hingtgen
parent 09942c08db
commit e463781077
273 changed files with 75003 additions and 588 deletions
@@ -0,0 +1,230 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v0alpha1",
"metadata": {
"name": "annotation-conversions-test",
"labels": {
"test": "annotation-conversions"
}
},
"spec": {
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": false,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
},
{
"builtIn": 0,
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"enable": true,
"hide": false,
"iconColor": "red",
"name": "Prometheus Annotations",
"target": {
"expr": "ALERTS{alertstate=\"firing\"}",
"interval": "1m",
"refId": "Anno",
"step": 60
},
"type": "prometheus"
},
{
"builtIn": false,
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"hide": false,
"iconColor": "blue",
"name": "TestData Annotations",
"target": {
"lines": 10,
"refId": "Anno",
"scenarioId": "annotations"
},
"type": "testdata"
},
{
"builtIn": 0,
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"enable": true,
"hide": false,
"iconColor": "yellow",
"name": "Elasticsearch Annotations",
"tagsField": "tags",
"target": {
"query": "tags:deployment",
"refId": "Anno",
"timeField": "@timestamp"
},
"textField": "message",
"timeEndField": "end_time",
"timeField": "@timestamp",
"type": "elasticsearch"
},
{
"builtIn": 0,
"datasource": {
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"hide": false,
"iconColor": "green",
"name": "SQL Annotations",
"tagsColumn": "tags",
"target": {
"format": "table",
"rawSql": "SELECT time, title, text, tags FROM annotations WHERE $__timeFilter(time)",
"refId": "Anno"
},
"textColumn": "text",
"timeColumn": "time",
"titleColumn": "title",
"type": "sql"
},
{
"builtIn": 0,
"enable": true,
"hide": false,
"iconColor": "purple",
"name": "No Datasource Annotation",
"target": {
"expr": "static_annotation_query",
"refId": "Anno"
},
"type": "manual"
},
{
"builtIn": 0,
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"enable": false,
"hide": true,
"iconColor": "gray",
"name": "Hidden Annotation",
"target": {
"expr": "disabled_query",
"refId": "Anno"
},
"type": "prometheus"
},
{
"builtIn": 0,
"datasource": {
"type": "influxdb",
"uid": "influx-uid"
},
"enable": true,
"filter": {
"exclude": true,
"ids": [
1,
2,
3
]
},
"hide": false,
"iconColor": "#FF5722",
"mappings": {
"tags": "labels",
"text": "description",
"time": "timestamp",
"title": "service"
},
"name": "Complex Filter Annotation",
"target": {
"query": "from(bucket: \"events\") |\u003e range(start: $__timeFrom, stop: $__timeTo) |\u003e filter(fn: (r) =\u003e r._measurement == \"deployments\")",
"refId": "Anno"
},
"type": "influxdb"
},
{
"builtIn": 0,
"datasource": {
"type": "cloudwatch",
"uid": "cloudwatch-uid"
},
"enable": true,
"hide": false,
"iconColor": "orange",
"name": "CloudWatch Annotations",
"showIn": 0,
"target": {
"dimensions": {
"InstanceId": "i-1234567890abcdef"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"refId": "Anno",
"statistic": "Average"
},
"type": "cloudwatch"
},
{
"builtIn": true,
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": false,
"hide": true,
"iconColor": "transparent",
"name": "Disabled Built-in Annotation",
"target": {
"expr": "ALERTS{alertstate=\"firing\"}",
"interval": "1m",
"refId": "Anno",
"step": 60
},
"type": "prometheus"
}
]
},
"description": "Testing annotation transformations",
"links": [],
"panels": [],
"tags": [
"test",
"annotations"
],
"templating": {
"list": []
},
"time": {
"from": "now-24h",
"to": "now"
},
"title": "Annotation Conversions Test Dashboard"
},
"status": {
"conversion": {
"failed": false,
"storedVersion": "v1beta1"
}
}
}
@@ -0,0 +1,327 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "annotation-conversions-test",
"labels": {
"test": "annotation-conversions"
}
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"query": {
"kind": "DataQuery",
"spec": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
}
},
"enable": true,
"hide": false,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"builtIn": true,
"legacyOptions": {
"type": "dashboard"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"expr": "ALERTS{alertstate=\"firing\"}",
"interval": "1m",
"refId": "Anno",
"step": 60
}
},
"enable": true,
"hide": false,
"iconColor": "red",
"name": "Prometheus Annotations",
"builtIn": false,
"legacyOptions": {
"type": "prometheus"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"lines": 10,
"refId": "Anno",
"scenarioId": "annotations"
}
},
"enable": true,
"hide": false,
"iconColor": "blue",
"name": "TestData Annotations",
"builtIn": false,
"legacyOptions": {
"type": "testdata"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"query": "tags:deployment",
"refId": "Anno",
"timeField": "@timestamp"
}
},
"enable": true,
"hide": false,
"iconColor": "yellow",
"name": "Elasticsearch Annotations",
"builtIn": false,
"legacyOptions": {
"tagsField": "tags",
"textField": "message",
"timeEndField": "end_time",
"timeField": "@timestamp",
"type": "elasticsearch"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"format": "table",
"rawSql": "SELECT time, title, text, tags FROM annotations WHERE $__timeFilter(time)",
"refId": "Anno"
}
},
"enable": true,
"hide": false,
"iconColor": "green",
"name": "SQL Annotations",
"builtIn": false,
"legacyOptions": {
"tagsColumn": "tags",
"textColumn": "text",
"timeColumn": "time",
"titleColumn": "title",
"type": "sql"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"spec": {
"expr": "static_annotation_query",
"refId": "Anno"
}
},
"enable": true,
"hide": false,
"iconColor": "purple",
"name": "No Datasource Annotation",
"builtIn": false,
"legacyOptions": {
"type": "manual"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"expr": "disabled_query",
"refId": "Anno"
}
},
"enable": false,
"hide": true,
"iconColor": "gray",
"name": "Hidden Annotation",
"builtIn": false,
"legacyOptions": {
"type": "prometheus"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "influxdb",
"uid": "influx-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"query": "from(bucket: \"events\") |\u003e range(start: $__timeFrom, stop: $__timeTo) |\u003e filter(fn: (r) =\u003e r._measurement == \"deployments\")",
"refId": "Anno"
}
},
"enable": true,
"hide": false,
"iconColor": "#FF5722",
"name": "Complex Filter Annotation",
"builtIn": false,
"filter": {
"exclude": true,
"ids": [
1,
2,
3
]
},
"legacyOptions": {
"mappings": {
"tags": "labels",
"text": "description",
"time": "timestamp",
"title": "service"
},
"type": "influxdb"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "cloudwatch",
"uid": "cloudwatch-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"dimensions": {
"InstanceId": "i-1234567890abcdef"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"refId": "Anno",
"statistic": "Average"
}
},
"enable": true,
"hide": false,
"iconColor": "orange",
"name": "CloudWatch Annotations",
"builtIn": false,
"legacyOptions": {
"showIn": 0,
"type": "cloudwatch"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"expr": "ALERTS{alertstate=\"firing\"}",
"interval": "1m",
"refId": "Anno",
"step": 60
}
},
"enable": false,
"hide": true,
"iconColor": "transparent",
"name": "Disabled Built-in Annotation",
"builtIn": true,
"legacyOptions": {
"type": "prometheus"
}
}
}
],
"cursorSync": "Off",
"description": "Testing annotation transformations",
"editable": true,
"elements": {},
"layout": {
"kind": "GridLayout",
"spec": {
"items": []
}
},
"links": [],
"liveNow": false,
"preload": false,
"tags": [
"test",
"annotations"
],
"timeSettings": {
"timezone": "browser",
"from": "now-24h",
"to": "now",
"autoRefresh": "",
"autoRefreshIntervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"hideTimepicker": false,
"fiscalYearStartMonth": 0
},
"title": "Annotation Conversions Test Dashboard",
"variables": []
},
"status": {}
}
@@ -0,0 +1,338 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "annotation-conversions-test",
"labels": {
"test": "annotation-conversions"
}
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "grafana",
"version": "v0",
"datasource": {
"name": "-- Grafana --"
},
"spec": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
}
},
"enable": true,
"hide": false,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"builtIn": true,
"legacyOptions": {
"type": "dashboard"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"version": "v0",
"datasource": {
"name": "existing-ref-uid"
},
"spec": {
"expr": "ALERTS{alertstate=\"firing\"}",
"interval": "1m",
"refId": "Anno",
"step": 60
}
},
"enable": true,
"hide": false,
"iconColor": "red",
"name": "Prometheus Annotations",
"builtIn": false,
"legacyOptions": {
"type": "prometheus"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"version": "v0",
"datasource": {
"name": "default-ds-uid"
},
"spec": {
"lines": 10,
"refId": "Anno",
"scenarioId": "annotations"
}
},
"enable": true,
"hide": false,
"iconColor": "blue",
"name": "TestData Annotations",
"builtIn": false,
"legacyOptions": {
"type": "testdata"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "elasticsearch",
"version": "v0",
"datasource": {
"name": "existing-target-uid"
},
"spec": {
"query": "tags:deployment",
"refId": "Anno",
"timeField": "@timestamp"
}
},
"enable": true,
"hide": false,
"iconColor": "yellow",
"name": "Elasticsearch Annotations",
"builtIn": false,
"legacyOptions": {
"tagsField": "tags",
"textField": "message",
"timeEndField": "end_time",
"timeField": "@timestamp",
"type": "elasticsearch"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "loki",
"version": "v0",
"datasource": {
"name": "non-default-test-ds-uid"
},
"spec": {
"format": "table",
"rawSql": "SELECT time, title, text, tags FROM annotations WHERE $__timeFilter(time)",
"refId": "Anno"
}
},
"enable": true,
"hide": false,
"iconColor": "green",
"name": "SQL Annotations",
"builtIn": false,
"legacyOptions": {
"tagsColumn": "tags",
"textColumn": "text",
"timeColumn": "time",
"titleColumn": "title",
"type": "sql"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "",
"version": "v0",
"spec": {
"expr": "static_annotation_query",
"refId": "Anno"
}
},
"enable": true,
"hide": false,
"iconColor": "purple",
"name": "No Datasource Annotation",
"builtIn": false,
"legacyOptions": {
"type": "manual"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"version": "v0",
"datasource": {
"name": "existing-ref-uid"
},
"spec": {
"expr": "disabled_query",
"refId": "Anno"
}
},
"enable": false,
"hide": true,
"iconColor": "gray",
"name": "Hidden Annotation",
"builtIn": false,
"legacyOptions": {
"type": "prometheus"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "influxdb",
"version": "v0",
"datasource": {
"name": "influx-uid"
},
"spec": {
"query": "from(bucket: \"events\") |\u003e range(start: $__timeFrom, stop: $__timeTo) |\u003e filter(fn: (r) =\u003e r._measurement == \"deployments\")",
"refId": "Anno"
}
},
"enable": true,
"hide": false,
"iconColor": "#FF5722",
"name": "Complex Filter Annotation",
"builtIn": false,
"filter": {
"exclude": true,
"ids": [
1,
2,
3
]
},
"legacyOptions": {
"mappings": {
"tags": "labels",
"text": "description",
"time": "timestamp",
"title": "service"
},
"type": "influxdb"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "cloudwatch",
"version": "v0",
"datasource": {
"name": "cloudwatch-uid"
},
"spec": {
"dimensions": {
"InstanceId": "i-1234567890abcdef"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"refId": "Anno",
"statistic": "Average"
}
},
"enable": true,
"hide": false,
"iconColor": "orange",
"name": "CloudWatch Annotations",
"builtIn": false,
"legacyOptions": {
"showIn": 0,
"type": "cloudwatch"
}
}
},
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"version": "v0",
"datasource": {
"name": "default-ds-uid"
},
"spec": {
"expr": "ALERTS{alertstate=\"firing\"}",
"interval": "1m",
"refId": "Anno",
"step": 60
}
},
"enable": false,
"hide": true,
"iconColor": "transparent",
"name": "Disabled Built-in Annotation",
"builtIn": true,
"legacyOptions": {
"type": "prometheus"
}
}
}
],
"cursorSync": "Off",
"description": "Testing annotation transformations",
"editable": true,
"elements": {},
"layout": {
"kind": "GridLayout",
"spec": {
"items": []
}
},
"links": [],
"liveNow": false,
"preload": false,
"tags": [
"test",
"annotations"
],
"timeSettings": {
"timezone": "browser",
"from": "now-24h",
"to": "now",
"autoRefresh": "",
"autoRefreshIntervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"hideTimepicker": false,
"fiscalYearStartMonth": 0
},
"title": "Annotation Conversions Test Dashboard",
"variables": []
},
"status": {}
}
@@ -0,0 +1,210 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v0alpha1",
"metadata": {
"name": "dashboard-properties-test",
"labels": {
"test": "dashboard-properties"
}
},
"spec": {
"annotations": {
"list": [
{
"builtIn": 0,
"enable": true,
"hide": false,
"iconColor": "blue",
"name": "Simple Annotation",
"target": {
"refId": "Anno"
}
}
]
},
"description": "Testing dashboard-level property transformations including time settings, cursor sync, and links",
"editable": true,
"fiscalYearStartMonth": 4,
"gnetId": 12345,
"graphTooltip": 2,
"iteration": 1640995200000,
"links": [
{
"asDropdown": false,
"icon": "external link",
"includeVars": true,
"keepTime": true,
"tags": [
"monitoring",
"alerts"
],
"targetBlank": true,
"title": "External Monitoring System",
"tooltip": "View in external system",
"type": "link",
"url": "https://monitoring.example.com/dashboard?from=${__from}\u0026to=${__to}"
},
{
"asDropdown": true,
"icon": "dashboard",
"includeVars": false,
"keepTime": false,
"tags": [
"grafana",
"internal"
],
"targetBlank": false,
"title": "Related Dashboards",
"tooltip": "Navigate to related dashboards",
"type": "dashboards",
"url": ""
},
{
"asDropdown": false,
"icon": "info",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Documentation",
"tooltip": "View documentation",
"type": "link",
"url": "https://docs.example.com/dashboard-guide"
},
{
"asDropdown": false,
"icon": "tag",
"includeVars": true,
"keepTime": true,
"tags": [
"alerts"
],
"targetBlank": false,
"title": "Tag-based Link",
"tooltip": "Filtered by tags",
"type": "tag",
"url": "/dashboards/tag/alerts"
}
],
"liveNow": true,
"meta": {
"canAdmin": false,
"canEdit": true,
"canSave": true,
"canStar": true,
"created": "2023-01-01T00:00:00Z",
"createdBy": "admin",
"expires": "2024-01-01T00:00:00Z",
"folderId": 0,
"folderTitle": "General",
"folderUrl": "",
"hasAcl": false,
"isFolder": false,
"provisioned": false,
"provisionedExternalId": "",
"slug": "dashboard-properties-test",
"updated": "2023-06-01T00:00:00Z",
"updatedBy": "admin",
"url": "/d/test/dashboard-properties-test",
"version": 42
},
"panels": [
{
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {},
"targets": [
{
"refId": "A"
}
],
"title": "Simple Panel",
"type": "stat"
}
],
"preload": true,
"refresh": "30s",
"schemaVersion": 39,
"snapshot": {
"originalUrl": "http://localhost:3000/d/test",
"timestamp": "2023-01-01T00:00:00Z"
},
"style": "dark",
"tags": [
"test",
"properties",
"metadata"
],
"templating": {
"list": [
{
"current": {
"text": "value1",
"value": "value1"
},
"hide": 0,
"name": "simple_var",
"query": "value1,value2,value3",
"skipUrlSync": false,
"type": "custom"
}
]
},
"time": {
"from": "now-12h",
"to": "now"
},
"timepicker": {
"collapse": false,
"enable": true,
"hidden": false,
"notice": false,
"now": true,
"nowDelay": "1m",
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"status": "Stable",
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
],
"type": "timepicker"
},
"timezone": "America/New_York",
"title": "Dashboard Properties Test",
"version": 42,
"weekStart": "sunday"
},
"status": {
"conversion": {
"failed": false,
"storedVersion": "v1beta1"
}
}
}
@@ -0,0 +1,203 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "dashboard-properties-test",
"labels": {
"test": "dashboard-properties"
}
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"spec": {
"refId": "Anno"
}
},
"enable": true,
"hide": false,
"iconColor": "blue",
"name": "Simple Annotation",
"builtIn": false
}
}
],
"cursorSync": "Tooltip",
"description": "Testing dashboard-level property transformations including time settings, cursor sync, and links",
"editable": true,
"elements": {
"panel-1": {
"kind": "Panel",
"spec": {
"id": 1,
"title": "Simple Panel",
"description": "",
"links": [],
"data": {
"kind": "QueryGroup",
"spec": {
"queries": [
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"spec": {}
},
"refId": "A",
"hidden": false
}
}
],
"transformations": [],
"queryOptions": {}
}
},
"vizConfig": {
"kind": "stat",
"spec": {
"pluginVersion": "",
"options": {},
"fieldConfig": {
"defaults": {},
"overrides": []
}
}
}
}
}
},
"layout": {
"kind": "GridLayout",
"spec": {
"items": [
{
"kind": "GridLayoutItem",
"spec": {
"x": 0,
"y": 0,
"width": 12,
"height": 8,
"element": {
"kind": "ElementReference",
"name": "panel-1"
}
}
}
]
}
},
"links": [
{
"title": "External Monitoring System",
"type": "link",
"icon": "external link",
"tooltip": "View in external system",
"url": "https://monitoring.example.com/dashboard?from=${__from}\u0026to=${__to}",
"tags": [
"monitoring",
"alerts"
],
"asDropdown": false,
"targetBlank": true,
"includeVars": true,
"keepTime": true
},
{
"title": "Related Dashboards",
"type": "dashboards",
"icon": "dashboard",
"tooltip": "Navigate to related dashboards",
"url": "",
"tags": [
"grafana",
"internal"
],
"asDropdown": true,
"targetBlank": false,
"includeVars": false,
"keepTime": false
},
{
"title": "Documentation",
"type": "link",
"icon": "info",
"tooltip": "View documentation",
"url": "https://docs.example.com/dashboard-guide",
"tags": [],
"asDropdown": false,
"targetBlank": true,
"includeVars": false,
"keepTime": false
},
{
"title": "Tag-based Link",
"type": "tag",
"icon": "tag",
"tooltip": "Filtered by tags",
"url": "/dashboards/tag/alerts",
"tags": [
"alerts"
],
"asDropdown": false,
"targetBlank": false,
"includeVars": true,
"keepTime": true
}
],
"liveNow": true,
"preload": true,
"tags": [
"test",
"properties",
"metadata"
],
"timeSettings": {
"timezone": "America/New_York",
"from": "now-12h",
"to": "now",
"autoRefresh": "30s",
"autoRefreshIntervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"hideTimepicker": false,
"weekStart": "sunday",
"fiscalYearStartMonth": 4,
"nowDelay": "1m"
},
"title": "Dashboard Properties Test",
"variables": [
{
"kind": "CustomVariable",
"spec": {
"name": "simple_var",
"query": "value1,value2,value3",
"current": {
"text": "value1",
"value": "value1"
},
"options": [],
"multi": false,
"includeAll": false,
"hide": "dontHide",
"skipUrlSync": false,
"allowCustomValue": true
}
}
]
},
"status": {}
}
@@ -0,0 +1,208 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "dashboard-properties-test",
"labels": {
"test": "dashboard-properties"
}
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "",
"version": "v0",
"spec": {
"refId": "Anno"
}
},
"enable": true,
"hide": false,
"iconColor": "blue",
"name": "Simple Annotation",
"builtIn": false
}
}
],
"cursorSync": "Tooltip",
"description": "Testing dashboard-level property transformations including time settings, cursor sync, and links",
"editable": true,
"elements": {
"panel-1": {
"kind": "Panel",
"spec": {
"id": 1,
"title": "Simple Panel",
"description": "",
"links": [],
"data": {
"kind": "QueryGroup",
"spec": {
"queries": [
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "",
"version": "v0",
"spec": {}
},
"refId": "A",
"hidden": false
}
}
],
"transformations": [],
"queryOptions": {}
}
},
"vizConfig": {
"kind": "VizConfig",
"group": "stat",
"version": "",
"spec": {
"options": {},
"fieldConfig": {
"defaults": {},
"overrides": []
}
}
}
}
}
},
"layout": {
"kind": "GridLayout",
"spec": {
"items": [
{
"kind": "GridLayoutItem",
"spec": {
"x": 0,
"y": 0,
"width": 12,
"height": 8,
"element": {
"kind": "ElementReference",
"name": "panel-1"
}
}
}
]
}
},
"links": [
{
"title": "External Monitoring System",
"type": "link",
"icon": "external link",
"tooltip": "View in external system",
"url": "https://monitoring.example.com/dashboard?from=${__from}\u0026to=${__to}",
"tags": [
"monitoring",
"alerts"
],
"asDropdown": false,
"targetBlank": true,
"includeVars": true,
"keepTime": true
},
{
"title": "Related Dashboards",
"type": "dashboards",
"icon": "dashboard",
"tooltip": "Navigate to related dashboards",
"url": "",
"tags": [
"grafana",
"internal"
],
"asDropdown": true,
"targetBlank": false,
"includeVars": false,
"keepTime": false
},
{
"title": "Documentation",
"type": "link",
"icon": "info",
"tooltip": "View documentation",
"url": "https://docs.example.com/dashboard-guide",
"tags": [],
"asDropdown": false,
"targetBlank": true,
"includeVars": false,
"keepTime": false
},
{
"title": "Tag-based Link",
"type": "tag",
"icon": "tag",
"tooltip": "Filtered by tags",
"url": "/dashboards/tag/alerts",
"tags": [
"alerts"
],
"asDropdown": false,
"targetBlank": false,
"includeVars": true,
"keepTime": true
}
],
"liveNow": true,
"preload": true,
"tags": [
"test",
"properties",
"metadata"
],
"timeSettings": {
"timezone": "America/New_York",
"from": "now-12h",
"to": "now",
"autoRefresh": "30s",
"autoRefreshIntervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"hideTimepicker": false,
"weekStart": "sunday",
"fiscalYearStartMonth": 4,
"nowDelay": "1m"
},
"title": "Dashboard Properties Test",
"variables": [
{
"kind": "CustomVariable",
"spec": {
"name": "simple_var",
"query": "value1,value2,value3",
"current": {
"text": "value1",
"value": "value1"
},
"options": [],
"multi": false,
"includeAll": false,
"hide": "dontHide",
"skipUrlSync": false,
"allowCustomValue": true
}
}
]
},
"status": {}
}
@@ -0,0 +1,353 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v0alpha1",
"metadata": {
"name": "panel-conversions-test",
"labels": {
"test": "panel-conversions"
}
},
"spec": {
"annotations": {
"list": []
},
"description": "Testing panel to elements conversion",
"editable": true,
"links": [],
"panels": [
{
"cacheTimeout": "60s",
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"interval": "1m",
"links": [
{
"targetBlank": true,
"title": "External Link",
"url": "https://example.com"
}
],
"maxDataPoints": 300,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"expr": "up",
"hide": false,
"interval": "30s",
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"expr": "cpu_usage",
"hide": true,
"interval": "1m",
"refId": "B"
}
],
"title": "Regular Timeseries Panel",
"transformations": [
{
"id": "reduce",
"options": {
"reducers": [
"mean"
]
}
}
],
"transparent": true,
"type": "timeseries"
},
{
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 0
},
"id": 2,
"libraryPanel": {
"name": "Shared Stats Panel",
"uid": "library-panel-uid-123"
},
"title": "Library Panel Reference"
},
{
"collapsed": false,
"datasource": {
"type": "prometheus",
"uid": "edprtf91hz01se"
},
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 8
},
"id": 3,
"panels": [],
"repeat": "server",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "edprtf91hz01se"
},
"refId": "A"
}
],
"title": "Row Panel",
"type": "row"
},
{
"autoMigrateFrom": "graph",
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 9
},
"id": 4,
"maxPerRow": 4,
"repeat": "region",
"repeatDirection": "h",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A",
"scenarioId": "random_walk"
}
],
"title": "Panel in Row",
"type": "timeseries"
},
{
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"custom": {
"orientation": "horizontal"
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 16,
"x": 8,
"y": 9
},
"hideTimeOverride": true,
"id": 7,
"links": [
{
"title": "Drill Down",
"url": "/d/detailed-view"
}
],
"maxDataPoints": 1000,
"options": {
"barWidth": 0.97,
"groupWidth": 0.7,
"orientation": "horizontal"
},
"pluginVersion": "9.5.0",
"queryCachingTTL": 300,
"targets": [
{
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"type": "date_histogram"
}
],
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"query": "*",
"refId": "A"
}
],
"timeFrom": "1h",
"timeShift": "1h",
"title": "Complex Panel with All Features",
"transformations": [
{
"id": "groupBy",
"options": {
"fields": {
"status": {
"aggregations": [
"count"
],
"operation": "groupby"
}
}
}
},
{
"id": "sortBy",
"options": {
"sort": [
{
"desc": true,
"field": "count"
}
]
}
}
],
"type": "barchart"
},
{
"collapsed": true,
"datasource": {
"type": "prometheus",
"uid": "edprtf91hz01se"
},
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 15
},
"id": 5,
"panels": [
{
"datasource": {
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 6,
"options": {
"showHeader": true
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"format": "table",
"rawSql": "SELECT * FROM metrics",
"refId": "A"
}
],
"title": "Hidden Panel in Collapsed Row",
"type": "table"
}
],
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"refId": "A"
}
],
"title": "Collapsed Row",
"type": "row"
}
],
"preload": false,
"tags": [
"test",
"panels"
],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"title": "Panel Conversions Test Dashboard"
},
"status": {
"conversion": {
"failed": false,
"storedVersion": "v1beta1"
}
}
}
@@ -0,0 +1,505 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "panel-conversions-test",
"labels": {
"test": "panel-conversions"
}
},
"spec": {
"annotations": [],
"cursorSync": "Off",
"description": "Testing panel to elements conversion",
"editable": true,
"elements": {
"panel-1": {
"kind": "Panel",
"spec": {
"id": 1,
"title": "Regular Timeseries Panel",
"description": "",
"links": [
{
"title": "External Link",
"url": "https://example.com",
"targetBlank": true
}
],
"data": {
"kind": "QueryGroup",
"spec": {
"queries": [
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"spec": {
"expr": "up",
"interval": "30s"
}
},
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"refId": "A",
"hidden": false
}
},
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"spec": {
"expr": "cpu_usage",
"interval": "1m"
}
},
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"refId": "B",
"hidden": true
}
}
],
"transformations": [
{
"kind": "reduce",
"spec": {
"id": "reduce",
"options": {
"reducers": [
"mean"
]
}
}
}
],
"queryOptions": {
"maxDataPoints": 300,
"interval": "1m",
"cacheTimeout": "60s"
}
}
},
"vizConfig": {
"kind": "timeseries",
"spec": {
"pluginVersion": "10.0.0",
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single"
}
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"value": null,
"color": "green"
},
{
"value": 80,
"color": "red"
}
]
},
"color": {
"mode": "palette-classic"
},
"custom": {
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 1
}
},
"overrides": []
}
}
},
"transparent": true
}
},
"panel-2": {
"kind": "LibraryPanel",
"spec": {
"id": 2,
"title": "Library Panel Reference",
"libraryPanel": {
"name": "Shared Stats Panel",
"uid": "library-panel-uid-123"
}
}
},
"panel-4": {
"kind": "Panel",
"spec": {
"id": 4,
"title": "Panel in Row",
"description": "",
"links": [],
"data": {
"kind": "QueryGroup",
"spec": {
"queries": [
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"spec": {
"scenarioId": "random_walk"
}
},
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A",
"hidden": false
}
}
],
"transformations": [],
"queryOptions": {}
}
},
"vizConfig": {
"kind": "timeseries",
"spec": {
"pluginVersion": "",
"options": {},
"fieldConfig": {
"defaults": {},
"overrides": []
}
}
}
}
},
"panel-6": {
"kind": "Panel",
"spec": {
"id": 6,
"title": "Hidden Panel in Collapsed Row",
"description": "",
"links": [],
"data": {
"kind": "QueryGroup",
"spec": {
"queries": [
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"spec": {
"format": "table",
"rawSql": "SELECT * FROM metrics"
}
},
"datasource": {
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"refId": "A",
"hidden": false
}
}
],
"transformations": [],
"queryOptions": {}
}
},
"vizConfig": {
"kind": "table",
"spec": {
"pluginVersion": "",
"options": {
"showHeader": true
},
"fieldConfig": {
"defaults": {},
"overrides": []
}
}
}
}
},
"panel-7": {
"kind": "Panel",
"spec": {
"id": 7,
"title": "Complex Panel with All Features",
"description": "",
"links": [
{
"title": "Drill Down",
"url": "/d/detailed-view"
}
],
"data": {
"kind": "QueryGroup",
"spec": {
"queries": [
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"spec": {
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"type": "date_histogram"
}
],
"query": "*"
}
},
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"refId": "A",
"hidden": false
}
}
],
"transformations": [
{
"kind": "groupBy",
"spec": {
"id": "groupBy",
"options": {
"fields": {
"status": {
"aggregations": [
"count"
],
"operation": "groupby"
}
}
}
}
},
{
"kind": "sortBy",
"spec": {
"id": "sortBy",
"options": {
"sort": [
{
"desc": true,
"field": "count"
}
]
}
}
}
],
"queryOptions": {
"timeFrom": "1h",
"maxDataPoints": 1000,
"timeShift": "1h",
"queryCachingTTL": 300,
"hideTimeOverride": true
}
}
},
"vizConfig": {
"kind": "barchart",
"spec": {
"pluginVersion": "9.5.0",
"options": {
"barWidth": 0.97,
"groupWidth": 0.7,
"orientation": "horizontal"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"custom": {
"orientation": "horizontal"
}
},
"overrides": []
}
}
}
}
}
},
"layout": {
"kind": "RowsLayout",
"spec": {
"rows": [
{
"kind": "RowsLayoutRow",
"spec": {
"title": "",
"collapse": false,
"hideHeader": true,
"layout": {
"kind": "GridLayout",
"spec": {
"items": [
{
"kind": "GridLayoutItem",
"spec": {
"x": 0,
"y": 0,
"width": 12,
"height": 8,
"element": {
"kind": "ElementReference",
"name": "panel-1"
}
}
},
{
"kind": "GridLayoutItem",
"spec": {
"x": 12,
"y": 0,
"width": 6,
"height": 4,
"element": {
"kind": "ElementReference",
"name": "panel-2"
}
}
}
]
}
}
}
},
{
"kind": "RowsLayoutRow",
"spec": {
"title": "Row Panel",
"collapse": false,
"repeat": {
"mode": "variable",
"value": "server"
},
"layout": {
"kind": "GridLayout",
"spec": {
"items": [
{
"kind": "GridLayoutItem",
"spec": {
"x": 0,
"y": 0,
"width": 8,
"height": 6,
"element": {
"kind": "ElementReference",
"name": "panel-4"
},
"repeat": {
"mode": "variable",
"value": "region",
"direction": "h",
"maxPerRow": 4
}
}
},
{
"kind": "GridLayoutItem",
"spec": {
"x": 8,
"y": 0,
"width": 16,
"height": 6,
"element": {
"kind": "ElementReference",
"name": "panel-7"
}
}
}
]
}
}
}
},
{
"kind": "RowsLayoutRow",
"spec": {
"title": "Collapsed Row",
"collapse": true,
"layout": {
"kind": "GridLayout",
"spec": {
"items": [
{
"kind": "GridLayoutItem",
"spec": {
"x": 0,
"y": 0,
"width": 12,
"height": 8,
"element": {
"kind": "ElementReference",
"name": "panel-6"
}
}
}
]
}
}
}
}
]
}
},
"links": [],
"liveNow": false,
"preload": false,
"tags": [
"test",
"panels"
],
"timeSettings": {
"timezone": "browser",
"from": "now-1h",
"to": "now",
"autoRefresh": "",
"autoRefreshIntervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"hideTimepicker": false,
"fiscalYearStartMonth": 0
},
"title": "Panel Conversions Test Dashboard",
"variables": []
},
"status": {}
}
@@ -0,0 +1,514 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "panel-conversions-test",
"labels": {
"test": "panel-conversions"
}
},
"spec": {
"annotations": [],
"cursorSync": "Off",
"description": "Testing panel to elements conversion",
"editable": true,
"elements": {
"panel-1": {
"kind": "Panel",
"spec": {
"id": 1,
"title": "Regular Timeseries Panel",
"description": "",
"links": [
{
"title": "External Link",
"url": "https://example.com",
"targetBlank": true
}
],
"data": {
"kind": "QueryGroup",
"spec": {
"queries": [
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"version": "v0",
"datasource": {
"name": "existing-ref-uid"
},
"spec": {
"expr": "up",
"interval": "30s"
}
},
"refId": "A",
"hidden": false
}
},
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"version": "v0",
"datasource": {
"name": "existing-ref-uid"
},
"spec": {
"expr": "cpu_usage",
"interval": "1m"
}
},
"refId": "B",
"hidden": true
}
}
],
"transformations": [
{
"kind": "reduce",
"spec": {
"id": "reduce",
"options": {
"reducers": [
"mean"
]
}
}
}
],
"queryOptions": {
"maxDataPoints": 300,
"interval": "1m",
"cacheTimeout": "60s"
}
}
},
"vizConfig": {
"kind": "VizConfig",
"group": "timeseries",
"version": "10.0.0",
"spec": {
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single"
}
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"value": null,
"color": "green"
},
{
"value": 80,
"color": "red"
}
]
},
"color": {
"mode": "palette-classic"
},
"custom": {
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 1
}
},
"overrides": []
}
}
},
"transparent": true
}
},
"panel-2": {
"kind": "LibraryPanel",
"spec": {
"id": 2,
"title": "Library Panel Reference",
"libraryPanel": {
"name": "Shared Stats Panel",
"uid": "library-panel-uid-123"
}
}
},
"panel-4": {
"kind": "Panel",
"spec": {
"id": 4,
"title": "Panel in Row",
"description": "",
"links": [],
"data": {
"kind": "QueryGroup",
"spec": {
"queries": [
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"version": "v0",
"datasource": {
"name": "default-ds-uid"
},
"spec": {
"scenarioId": "random_walk"
}
},
"refId": "A",
"hidden": false
}
}
],
"transformations": [],
"queryOptions": {}
}
},
"vizConfig": {
"kind": "VizConfig",
"group": "timeseries",
"version": "",
"spec": {
"options": {},
"fieldConfig": {
"defaults": {},
"overrides": []
}
}
}
}
},
"panel-6": {
"kind": "Panel",
"spec": {
"id": 6,
"title": "Hidden Panel in Collapsed Row",
"description": "",
"links": [],
"data": {
"kind": "QueryGroup",
"spec": {
"queries": [
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "loki",
"version": "v0",
"datasource": {
"name": "non-default-test-ds-uid"
},
"spec": {
"format": "table",
"rawSql": "SELECT * FROM metrics"
}
},
"refId": "A",
"hidden": false
}
}
],
"transformations": [],
"queryOptions": {}
}
},
"vizConfig": {
"kind": "VizConfig",
"group": "table",
"version": "",
"spec": {
"options": {
"showHeader": true
},
"fieldConfig": {
"defaults": {},
"overrides": []
}
}
}
}
},
"panel-7": {
"kind": "Panel",
"spec": {
"id": 7,
"title": "Complex Panel with All Features",
"description": "",
"links": [
{
"title": "Drill Down",
"url": "/d/detailed-view"
}
],
"data": {
"kind": "QueryGroup",
"spec": {
"queries": [
{
"kind": "PanelQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "elasticsearch",
"version": "v0",
"datasource": {
"name": "existing-target-uid"
},
"spec": {
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"type": "date_histogram"
}
],
"query": "*"
}
},
"refId": "A",
"hidden": false
}
}
],
"transformations": [
{
"kind": "groupBy",
"spec": {
"id": "groupBy",
"options": {
"fields": {
"status": {
"aggregations": [
"count"
],
"operation": "groupby"
}
}
}
}
},
{
"kind": "sortBy",
"spec": {
"id": "sortBy",
"options": {
"sort": [
{
"desc": true,
"field": "count"
}
]
}
}
}
],
"queryOptions": {
"timeFrom": "1h",
"maxDataPoints": 1000,
"timeShift": "1h",
"queryCachingTTL": 300,
"hideTimeOverride": true
}
}
},
"vizConfig": {
"kind": "VizConfig",
"group": "barchart",
"version": "9.5.0",
"spec": {
"options": {
"barWidth": 0.97,
"groupWidth": 0.7,
"orientation": "horizontal"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"custom": {
"orientation": "horizontal"
}
},
"overrides": []
}
}
}
}
}
},
"layout": {
"kind": "RowsLayout",
"spec": {
"rows": [
{
"kind": "RowsLayoutRow",
"spec": {
"title": "",
"collapse": false,
"hideHeader": true,
"layout": {
"kind": "GridLayout",
"spec": {
"items": [
{
"kind": "GridLayoutItem",
"spec": {
"x": 0,
"y": 0,
"width": 12,
"height": 8,
"element": {
"kind": "ElementReference",
"name": "panel-1"
}
}
},
{
"kind": "GridLayoutItem",
"spec": {
"x": 12,
"y": 0,
"width": 6,
"height": 4,
"element": {
"kind": "ElementReference",
"name": "panel-2"
}
}
}
]
}
}
}
},
{
"kind": "RowsLayoutRow",
"spec": {
"title": "Row Panel",
"collapse": false,
"repeat": {
"mode": "variable",
"value": "server"
},
"layout": {
"kind": "GridLayout",
"spec": {
"items": [
{
"kind": "GridLayoutItem",
"spec": {
"x": 0,
"y": 0,
"width": 8,
"height": 6,
"element": {
"kind": "ElementReference",
"name": "panel-4"
},
"repeat": {
"mode": "variable",
"value": "region",
"direction": "h",
"maxPerRow": 4
}
}
},
{
"kind": "GridLayoutItem",
"spec": {
"x": 8,
"y": 0,
"width": 16,
"height": 6,
"element": {
"kind": "ElementReference",
"name": "panel-7"
}
}
}
]
}
}
}
},
{
"kind": "RowsLayoutRow",
"spec": {
"title": "Collapsed Row",
"collapse": true,
"layout": {
"kind": "GridLayout",
"spec": {
"items": [
{
"kind": "GridLayoutItem",
"spec": {
"x": 0,
"y": 0,
"width": 12,
"height": 8,
"element": {
"kind": "ElementReference",
"name": "panel-6"
}
}
}
]
}
}
}
}
]
}
},
"links": [],
"liveNow": false,
"preload": false,
"tags": [
"test",
"panels"
],
"timeSettings": {
"timezone": "browser",
"from": "now-1h",
"to": "now",
"autoRefresh": "",
"autoRefreshIntervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"hideTimepicker": false,
"fiscalYearStartMonth": 0
},
"title": "Panel Conversions Test Dashboard",
"variables": []
},
"status": {}
}
@@ -0,0 +1,360 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v0alpha1",
"metadata": {
"name": "variable-conversions-test",
"labels": {
"test": "variable-conversions"
}
},
"spec": {
"annotations": {
"list": []
},
"description": "Testing all variable types and transformations",
"links": [],
"panels": [],
"tags": [
"test",
"variables"
],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "Prometheus",
"value": "prometheus-uid"
},
"description": "Select a data source",
"hide": 0,
"includeAll": false,
"label": "Data Source",
"multi": false,
"name": "datasource_var",
"options": [
{
"selected": true,
"text": "Prometheus",
"value": "prometheus-uid"
},
{
"selected": false,
"text": "InfluxDB",
"value": "influx-uid"
}
],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"allValue": ".*",
"current": {
"selected": true,
"text": [
"All",
"localhost:9090"
],
"value": [
"$__all",
"localhost:9090"
]
},
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"definition": "label_values(up, instance)",
"description": "Available instances",
"hide": 1,
"includeAll": true,
"label": "Instance",
"multi": true,
"name": "query_var",
"options": [
{
"selected": false,
"text": "All",
"value": "$__all"
},
{
"selected": true,
"text": "localhost:9090",
"value": "localhost:9090"
},
{
"selected": false,
"text": "localhost:9091",
"value": "localhost:9091"
}
],
"query": "label_values(up, instance)",
"refresh": 2,
"regex": "/.*9090.*/",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"selected": false,
"text": "prod",
"value": "prod"
},
"description": "Deployment environment",
"hide": 0,
"includeAll": true,
"label": "Environment",
"multi": false,
"name": "custom_var",
"options": [
{
"selected": true,
"text": "prod",
"value": "prod"
},
{
"selected": false,
"text": "staging",
"value": "staging"
},
{
"selected": false,
"text": "dev",
"value": "dev"
}
],
"query": "prod,staging,dev",
"skipUrlSync": false,
"type": "custom"
},
{
"allowCustomValue": true,
"baseFilters": [
{
"key": "environment",
"operator": "=",
"value": "production"
}
],
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"defaultKeys": [
{
"text": "job",
"value": "job"
},
{
"text": "instance",
"value": "instance"
}
],
"description": "Add filters",
"filters": [
{
"key": "job",
"operator": "=",
"value": "prometheus"
}
],
"hide": 0,
"label": "Filters",
"name": "adhoc_var",
"skipUrlSync": false,
"type": "adhoc"
},
{
"current": {
"selected": false,
"text": "my-application",
"value": "my-application"
},
"description": "Application name constant",
"hide": 2,
"label": "App Name",
"name": "constant_var",
"query": "my-application",
"skipUrlSync": true,
"type": "constant"
},
{
"auto": true,
"auto_count": 30,
"auto_min": "10s",
"current": {
"selected": false,
"text": "5m",
"value": "5m"
},
"description": "Time interval for queries",
"hide": 0,
"label": "Interval",
"name": "interval_var",
"options": [
{
"selected": false,
"text": "1m",
"value": "1m"
},
{
"selected": true,
"text": "5m",
"value": "5m"
},
{
"selected": false,
"text": "10m",
"value": "10m"
}
],
"query": "1m,5m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
"refresh": 2,
"skipUrlSync": false,
"type": "interval"
},
{
"current": {
"selected": false,
"text": "error",
"value": "error"
},
"description": "Enter search term",
"hide": 0,
"label": "Search Term",
"name": "textbox_var",
"query": "default_search",
"skipUrlSync": false,
"type": "textbox"
},
{
"current": {
"selected": true,
"text": [
"job",
"instance"
],
"value": [
"job",
"instance"
]
},
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"description": "Group results by field",
"hide": 0,
"label": "Group By",
"multi": true,
"name": "groupby_var",
"options": [
{
"selected": true,
"text": "job",
"value": "job"
},
{
"selected": true,
"text": "instance",
"value": "instance"
},
{
"selected": false,
"text": "region",
"value": "region"
}
],
"query": "",
"skipUrlSync": false,
"type": "groupby"
},
{
"current": {
"selected": false,
"text": "legacy_value",
"value": "legacy_string_content"
},
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"description": "Variable with legacy string value",
"hide": 0,
"label": "Legacy Variable",
"name": "legacy_string_var",
"query": "up",
"refresh": 1,
"skipUrlSync": false,
"type": "query"
},
{
"allValue": "*",
"current": {
"selected": true,
"text": [
"All",
"host1",
"host2"
],
"value": [
"$__all",
"host1",
"host2"
]
},
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"definition": "terms field:@host size:100",
"description": "Variable with complex query and all features",
"hide": 0,
"includeAll": true,
"label": "Complex Query Variable",
"multi": true,
"name": "complex_query_var",
"options": [],
"query": {
"bucketAggs": [
{
"field": "@host",
"id": "2",
"type": "terms"
}
],
"query": "*",
"size": 100
},
"refresh": 1,
"regex": "/host[0-9]+/",
"skipUrlSync": false,
"sort": 2,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": true
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"title": "Variable Conversions Test Dashboard"
},
"status": {
"conversion": {
"failed": false,
"storedVersion": "v1beta1"
}
}
}
@@ -0,0 +1,403 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "variable-conversions-test",
"labels": {
"test": "variable-conversions"
}
},
"spec": {
"annotations": [],
"cursorSync": "Off",
"description": "Testing all variable types and transformations",
"editable": true,
"elements": {},
"layout": {
"kind": "GridLayout",
"spec": {
"items": []
}
},
"links": [],
"liveNow": false,
"preload": false,
"tags": [
"test",
"variables"
],
"timeSettings": {
"timezone": "browser",
"from": "now-6h",
"to": "now",
"autoRefresh": "",
"autoRefreshIntervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"hideTimepicker": false,
"fiscalYearStartMonth": 0
},
"title": "Variable Conversions Test Dashboard",
"variables": [
{
"kind": "DatasourceVariable",
"spec": {
"name": "datasource_var",
"pluginId": "prometheus",
"refresh": "onDashboardLoad",
"regex": "",
"current": {
"text": "Prometheus",
"value": "prometheus-uid"
},
"options": [
{
"selected": true,
"text": "Prometheus",
"value": "prometheus-uid"
},
{
"selected": false,
"text": "InfluxDB",
"value": "influx-uid"
}
],
"multi": false,
"includeAll": false,
"label": "Data Source",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Select a data source",
"allowCustomValue": true
}
},
{
"kind": "QueryVariable",
"spec": {
"name": "query_var",
"current": {
"text": [
"All",
"localhost:9090"
],
"value": [
"$__all",
"localhost:9090"
]
},
"label": "Instance",
"hide": "hideLabel",
"refresh": "onTimeRangeChanged",
"skipUrlSync": false,
"description": "Available instances",
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"__legacyStringValue": "label_values(up, instance)"
}
},
"regex": "/.*9090.*/",
"sort": "alphabeticalAsc",
"definition": "label_values(up, instance)",
"options": [
{
"selected": false,
"text": "All",
"value": "$__all"
},
{
"selected": true,
"text": "localhost:9090",
"value": "localhost:9090"
},
{
"selected": false,
"text": "localhost:9091",
"value": "localhost:9091"
}
],
"multi": true,
"includeAll": true,
"allValue": ".*",
"allowCustomValue": true
}
},
{
"kind": "CustomVariable",
"spec": {
"name": "custom_var",
"query": "prod,staging,dev",
"current": {
"text": "prod",
"value": "prod"
},
"options": [
{
"selected": true,
"text": "prod",
"value": "prod"
},
{
"selected": false,
"text": "staging",
"value": "staging"
},
{
"selected": false,
"text": "dev",
"value": "dev"
}
],
"multi": false,
"includeAll": true,
"label": "Environment",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Deployment environment",
"allowCustomValue": true
}
},
{
"kind": "AdhocVariable",
"spec": {
"name": "adhoc_var",
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"baseFilters": [
{
"key": "environment",
"operator": "=",
"value": "production"
}
],
"filters": [
{
"key": "job",
"operator": "=",
"value": "prometheus"
}
],
"defaultKeys": [
{
"text": "job",
"value": "job"
},
{
"text": "instance",
"value": "instance"
}
],
"label": "Filters",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Add filters",
"allowCustomValue": true
}
},
{
"kind": "ConstantVariable",
"spec": {
"name": "constant_var",
"query": "my-application",
"current": {
"text": "my-application",
"value": "my-application"
},
"label": "App Name",
"hide": "hideVariable",
"skipUrlSync": true,
"description": "Application name constant"
}
},
{
"kind": "IntervalVariable",
"spec": {
"name": "interval_var",
"query": "1m,5m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
"current": {
"text": "5m",
"value": "5m"
},
"options": [
{
"selected": false,
"text": "1m",
"value": "1m"
},
{
"selected": true,
"text": "5m",
"value": "5m"
},
{
"selected": false,
"text": "10m",
"value": "10m"
}
],
"auto": true,
"auto_min": "10s",
"auto_count": 30,
"refresh": "onTimeRangeChanged",
"label": "Interval",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Time interval for queries"
}
},
{
"kind": "TextVariable",
"spec": {
"name": "textbox_var",
"current": {
"text": "error",
"value": "error"
},
"query": "default_search",
"label": "Search Term",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Enter search term"
}
},
{
"kind": "GroupByVariable",
"spec": {
"name": "groupby_var",
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"current": {
"text": [
"job",
"instance"
],
"value": [
"job",
"instance"
]
},
"options": [
{
"selected": true,
"text": "job",
"value": "job"
},
{
"selected": true,
"text": "instance",
"value": "instance"
},
{
"selected": false,
"text": "region",
"value": "region"
}
],
"multi": true,
"label": "Group By",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Group results by field"
}
},
{
"kind": "QueryVariable",
"spec": {
"name": "legacy_string_var",
"current": {
"text": "legacy_value",
"value": "legacy_string_content"
},
"label": "Legacy Variable",
"hide": "dontHide",
"refresh": "onDashboardLoad",
"skipUrlSync": false,
"description": "Variable with legacy string value",
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"__legacyStringValue": "up"
}
},
"regex": "",
"sort": "disabled",
"options": [],
"multi": false,
"includeAll": false,
"allowCustomValue": true
}
},
{
"kind": "QueryVariable",
"spec": {
"name": "complex_query_var",
"current": {
"text": [
"All",
"host1",
"host2"
],
"value": [
"$__all",
"host1",
"host2"
]
},
"label": "Complex Query Variable",
"hide": "dontHide",
"refresh": "onDashboardLoad",
"skipUrlSync": false,
"description": "Variable with complex query and all features",
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"query": {
"kind": "DataQuery",
"spec": {
"bucketAggs": [
{
"field": "@host",
"id": "2",
"type": "terms"
}
],
"query": "*",
"size": 100
}
},
"regex": "/host[0-9]+/",
"sort": "alphabeticalDesc",
"definition": "terms field:@host size:100",
"options": [],
"multi": true,
"includeAll": true,
"allValue": "*",
"allowCustomValue": true
}
}
]
},
"status": {}
}
@@ -0,0 +1,406 @@
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "variable-conversions-test",
"labels": {
"test": "variable-conversions"
}
},
"spec": {
"annotations": [],
"cursorSync": "Off",
"description": "Testing all variable types and transformations",
"editable": true,
"elements": {},
"layout": {
"kind": "GridLayout",
"spec": {
"items": []
}
},
"links": [],
"liveNow": false,
"preload": false,
"tags": [
"test",
"variables"
],
"timeSettings": {
"timezone": "browser",
"from": "now-6h",
"to": "now",
"autoRefresh": "",
"autoRefreshIntervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"hideTimepicker": false,
"fiscalYearStartMonth": 0
},
"title": "Variable Conversions Test Dashboard",
"variables": [
{
"kind": "DatasourceVariable",
"spec": {
"name": "datasource_var",
"pluginId": "prometheus",
"refresh": "onDashboardLoad",
"regex": "",
"current": {
"text": "Prometheus",
"value": "prometheus-uid"
},
"options": [
{
"selected": true,
"text": "Prometheus",
"value": "prometheus-uid"
},
{
"selected": false,
"text": "InfluxDB",
"value": "influx-uid"
}
],
"multi": false,
"includeAll": false,
"label": "Data Source",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Select a data source",
"allowCustomValue": true
}
},
{
"kind": "QueryVariable",
"spec": {
"name": "query_var",
"current": {
"text": [
"All",
"localhost:9090"
],
"value": [
"$__all",
"localhost:9090"
]
},
"label": "Instance",
"hide": "hideLabel",
"refresh": "onTimeRangeChanged",
"skipUrlSync": false,
"description": "Available instances",
"query": {
"kind": "DataQuery",
"group": "prometheus",
"version": "v0",
"datasource": {
"name": "existing-ref-uid"
},
"spec": {
"__legacyStringValue": "label_values(up, instance)"
}
},
"regex": "/.*9090.*/",
"sort": "alphabeticalAsc",
"definition": "label_values(up, instance)",
"options": [
{
"selected": false,
"text": "All",
"value": "$__all"
},
{
"selected": true,
"text": "localhost:9090",
"value": "localhost:9090"
},
{
"selected": false,
"text": "localhost:9091",
"value": "localhost:9091"
}
],
"multi": true,
"includeAll": true,
"allValue": ".*",
"allowCustomValue": true
}
},
{
"kind": "CustomVariable",
"spec": {
"name": "custom_var",
"query": "prod,staging,dev",
"current": {
"text": "prod",
"value": "prod"
},
"options": [
{
"selected": true,
"text": "prod",
"value": "prod"
},
{
"selected": false,
"text": "staging",
"value": "staging"
},
{
"selected": false,
"text": "dev",
"value": "dev"
}
],
"multi": false,
"includeAll": true,
"label": "Environment",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Deployment environment",
"allowCustomValue": true
}
},
{
"kind": "AdhocVariable",
"group": "prometheus",
"datasource": {
"name": "existing-ref-uid"
},
"spec": {
"name": "adhoc_var",
"baseFilters": [
{
"key": "environment",
"operator": "=",
"value": "production"
}
],
"filters": [
{
"key": "job",
"operator": "=",
"value": "prometheus"
}
],
"defaultKeys": [
{
"text": "job",
"value": "job"
},
{
"text": "instance",
"value": "instance"
}
],
"label": "Filters",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Add filters",
"allowCustomValue": true
}
},
{
"kind": "ConstantVariable",
"spec": {
"name": "constant_var",
"query": "my-application",
"current": {
"text": "my-application",
"value": "my-application"
},
"label": "App Name",
"hide": "hideVariable",
"skipUrlSync": true,
"description": "Application name constant"
}
},
{
"kind": "IntervalVariable",
"spec": {
"name": "interval_var",
"query": "1m,5m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
"current": {
"text": "5m",
"value": "5m"
},
"options": [
{
"selected": false,
"text": "1m",
"value": "1m"
},
{
"selected": true,
"text": "5m",
"value": "5m"
},
{
"selected": false,
"text": "10m",
"value": "10m"
}
],
"auto": true,
"auto_min": "10s",
"auto_count": 30,
"refresh": "onTimeRangeChanged",
"label": "Interval",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Time interval for queries"
}
},
{
"kind": "TextVariable",
"spec": {
"name": "textbox_var",
"current": {
"text": "error",
"value": "error"
},
"query": "default_search",
"label": "Search Term",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Enter search term"
}
},
{
"kind": "GroupByVariable",
"group": "prometheus",
"datasource": {
"name": "existing-ref-uid"
},
"spec": {
"name": "groupby_var",
"current": {
"text": [
"job",
"instance"
],
"value": [
"job",
"instance"
]
},
"options": [
{
"selected": true,
"text": "job",
"value": "job"
},
{
"selected": true,
"text": "instance",
"value": "instance"
},
{
"selected": false,
"text": "region",
"value": "region"
}
],
"multi": true,
"label": "Group By",
"hide": "dontHide",
"skipUrlSync": false,
"description": "Group results by field"
}
},
{
"kind": "QueryVariable",
"spec": {
"name": "legacy_string_var",
"current": {
"text": "legacy_value",
"value": "legacy_string_content"
},
"label": "Legacy Variable",
"hide": "dontHide",
"refresh": "onDashboardLoad",
"skipUrlSync": false,
"description": "Variable with legacy string value",
"query": {
"kind": "DataQuery",
"group": "prometheus",
"version": "v0",
"datasource": {
"name": "existing-ref-uid"
},
"spec": {
"__legacyStringValue": "up"
}
},
"regex": "",
"sort": "disabled",
"options": [],
"multi": false,
"includeAll": false,
"allowCustomValue": true
}
},
{
"kind": "QueryVariable",
"spec": {
"name": "complex_query_var",
"current": {
"text": [
"All",
"host1",
"host2"
],
"value": [
"$__all",
"host1",
"host2"
]
},
"label": "Complex Query Variable",
"hide": "dontHide",
"refresh": "onDashboardLoad",
"skipUrlSync": false,
"description": "Variable with complex query and all features",
"query": {
"kind": "DataQuery",
"group": "elasticsearch",
"version": "v0",
"datasource": {
"name": "existing-target-uid"
},
"spec": {
"bucketAggs": [
{
"field": "@host",
"id": "2",
"type": "terms"
}
],
"query": "*",
"size": 100
}
},
"regex": "/host[0-9]+/",
"sort": "alphabeticalDesc",
"definition": "terms field:@host size:100",
"options": [],
"multi": true,
"includeAll": true,
"allValue": "*",
"allowCustomValue": true
}
}
]
},
"status": {}
}
@@ -79,7 +79,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"group": "",
"version": "v0",
"datasource": {
"name": "gdev-prometheus"
@@ -399,7 +399,7 @@
"auto": true,
"auto_min": "10s",
"auto_count": 30,
"refresh": "load",
"refresh": "onTimeRangeChanged",
"label": "Interval",
"hide": "dontHide",
"skipUrlSync": false,
@@ -58,7 +58,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"group": "",
"version": "v0",
"spec": {
"lines": 10,
@@ -103,7 +103,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"group": "",
"version": "v0",
"spec": {
"expr": "{action=\"add_client\"}",
@@ -213,7 +213,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "grafana-testdata-datasource",
"group": "",
"version": "v0",
"datasource": {
"name": "gdev-testdata"
@@ -324,7 +324,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "grafana-testdata-datasource",
"group": "",
"version": "v0",
"spec": {
"scenarioId": "random_walk",
@@ -403,7 +403,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"group": "",
"version": "v0",
"spec": {
"disableTextWrap": false,
@@ -518,7 +518,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"group": "",
"version": "v0",
"datasource": {
"name": "gdev-prometheus"
@@ -636,7 +636,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"group": "",
"version": "v0",
"datasource": {
"name": "gdev-prometheus"
@@ -661,7 +661,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "grafana-testdata-datasource",
"group": "",
"version": "v0",
"datasource": {
"name": "gdev-testdata"
@@ -769,7 +769,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "prometheus",
"group": "",
"version": "v0",
"spec": {
"disableTextWrap": false,
@@ -791,7 +791,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "grafana-testdata-datasource",
"group": "",
"version": "v0",
"spec": {}
},
@@ -984,7 +984,7 @@
"skipUrlSync": false,
"query": {
"kind": "DataQuery",
"group": "prometheus",
"group": "",
"version": "v0",
"datasource": {
"name": "gdev-prometheus"
@@ -1014,7 +1014,7 @@
"skipUrlSync": false,
"query": {
"kind": "DataQuery",
"group": "grafana-testdata-datasource",
"group": "",
"version": "v0",
"spec": {
"csv": "1,2,3,4",
@@ -1042,7 +1042,7 @@
"skipUrlSync": false,
"query": {
"kind": "DataQuery",
"group": "grafana-testdata-datasource",
"group": "",
"version": "v0",
"spec": {}
},
@@ -1067,7 +1067,7 @@
"skipUrlSync": false,
"query": {
"kind": "DataQuery",
"group": "prometheus",
"group": "",
"version": "v0",
"spec": {
"expr": "up"
@@ -24,7 +24,7 @@
"spec": {
"query": {
"kind": "DataQuery",
"group": "grafana-testdata-datasource",
"group": "",
"version": "v0",
"datasource": {
"name": "gdev-testdata"