Dashboard Migrations: v27 repeated panels and constant variable (#108644)

This commit is contained in:
Haris Rozajac
2025-08-06 10:22:11 -06:00
committed by GitHub
parent d0d8b8f82d
commit fdfe123305
8 changed files with 917 additions and 1 deletions
@@ -0,0 +1,43 @@
{
"title": "V27 Repeated Panels and Constant Variable Migration Test Dashboard",
"schemaVersion": 26,
"panels": [
{
"id": 1,
"type": "graph",
"repeatPanelId": "panel1"
},
{
"id": 2,
"type": "graph",
"title": "Normal Panel"
},
{
"id": 4,
"type": "row",
"title": "Row with repeated panels",
"panels": [
{
"id": 5,
"type": "graph",
"repeatPanelId": "panel2"
},
{
"id": 6,
"type": "graph",
"title": "Normal nested panel"
}
]
}
],
"templating": {
"list": [
{
"name": "constant_var",
"type": "constant",
"query": "default_value",
"hide": 0
}
]
}
}
@@ -0,0 +1,105 @@
{
"title": "V28 Singlestat and Variable Properties Migration Test Dashboard",
"schemaVersion": 27,
"panels": [
{
"type": "singlestat",
"legend": true,
"thresholds": "10,20,30",
"colors": ["#FF0000", "green", "orange"],
"grid": { "min": 1, "max": 10 },
"targets": [{ "refId": "A" }, {}]
},
{
"type": "singlestat",
"thresholds": "10,20,30",
"colors": ["#FF0000", "green", "orange"],
"gauge": {
"show": true,
"thresholdMarkers": true,
"thresholdLabels": false
},
"grid": { "min": 1, "max": 10 }
},
{
"type": "singlestat",
"legend": true,
"thresholds": "10,20,30",
"colors": ["#FF0000", "green", "orange"],
"grid": { "min": 1, "max": 10 },
"targets": [{ "refId": "A" }, {}],
"mappingTypes": [
{
"name": "value to text",
"value": 1
}
],
"valueMaps": [
{
"op": "=",
"text": "test",
"value": "20"
},
{
"op": "=",
"text": "test1",
"value": "30"
},
{
"op": "=",
"text": "50",
"value": "40"
}
]
},
{
"type": "timeseries",
"targets": [
{
"refId": "A",
"expr": "rate(http_requests_total[5m])"
}
]
}
],
"templating": {
"list": [
{
"name": "query_variable_with_tags",
"type": "query",
"datasource": "prometheus",
"query": "label_values(up, instance)",
"tags": ["instance", "job"],
"tagsQuery": "label_values(up, job)",
"tagValuesQuery": "label_values(up{job=\"$job\"}, instance)",
"useTags": true,
"refresh": 1
},
{
"name": "custom_variable_with_tags",
"type": "custom",
"options": [
{"text": "Option 1", "value": "opt1"},
{"text": "Option 2", "value": "opt2"}
],
"tags": ["custom_tag"],
"tagsQuery": "custom query",
"useTags": false
},
{
"name": "clean_variable",
"type": "textbox",
"options": [
{"text": "Hello", "value": "World"}
]
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
}
}