8aab6302c5
* Fix the conversion shallowed error and normalize the conversion status * Add unit tests to ensure all permutations data loss detection * Fix counting issue
209 lines
4.8 KiB
JSON
209 lines
4.8 KiB
JSON
{
|
|
"kind": "Dashboard",
|
|
"apiVersion": "dashboard.grafana.app/v2alpha1",
|
|
"metadata": {
|
|
"name": "dashboard-properties-test",
|
|
"labels": {
|
|
"test": "dashboard-properties"
|
|
}
|
|
},
|
|
"spec": {
|
|
"annotations": [
|
|
{
|
|
"kind": "AnnotationQuery",
|
|
"spec": {
|
|
"query": {
|
|
"kind": "",
|
|
"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": "",
|
|
"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,
|
|
"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": {
|
|
"conversion": {
|
|
"failed": false,
|
|
"storedVersion": "v1beta1"
|
|
}
|
|
}
|
|
} |