Dashboard migration: Implement v2 to v0 conversions (#114812)
* Update docs * Remove 406 response since now it is converted * fix linter --------- Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
Vendored
+150
-213
@@ -7,221 +7,158 @@
|
||||
"test": "dashboard-properties"
|
||||
}
|
||||
},
|
||||
"spec": null,
|
||||
"spec": {
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"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,
|
||||
"graphTooltip": 2,
|
||||
"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,
|
||||
"placement": "inControlsMenu",
|
||||
"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,
|
||||
"panels": [
|
||||
{
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {},
|
||||
"pluginVersion": "",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Simple Panel",
|
||||
"type": "stat"
|
||||
}
|
||||
],
|
||||
"preload": true,
|
||||
"refresh": "30s",
|
||||
"schemaVersion": 42,
|
||||
"tags": [
|
||||
"test",
|
||||
"properties",
|
||||
"metadata"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"allowCustomValue": true,
|
||||
"current": {
|
||||
"text": "value1",
|
||||
"value": "value1"
|
||||
},
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"multi": false,
|
||||
"name": "simple_var",
|
||||
"options": [],
|
||||
"query": "value1,value2,value3",
|
||||
"skipUrlSync": false,
|
||||
"type": "custom"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-12h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"nowDelay": "1m",
|
||||
"refresh_intervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
]
|
||||
},
|
||||
"timezone": "America/New_York",
|
||||
"title": "Dashboard Properties Test",
|
||||
"weekStart": "sunday"
|
||||
},
|
||||
"status": {
|
||||
"conversion": {
|
||||
"failed": true,
|
||||
"error": "backend conversion not yet implemented",
|
||||
"storedVersion": "v2beta1",
|
||||
"source": {
|
||||
"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,
|
||||
"placement": "inControlsMenu"
|
||||
},
|
||||
{
|
||||
"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": {}
|
||||
}
|
||||
"failed": false,
|
||||
"storedVersion": "v2beta1"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user