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,91 @@
{
"panels": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 2,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Normal Panel",
"type": "graph"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 4,
"panels": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 6,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Normal nested panel",
"type": "graph"
}
],
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Row with repeated panels",
"type": "row"
}
],
"refresh": "",
"schemaVersion": 41,
"templating": {
"list": [
{
"current": {
"selected": true,
"text": "default_value",
"value": "default_value"
},
"hide": 0,
"name": "constant_var",
"options": [
{
"selected": true,
"text": "default_value",
"value": "default_value"
}
],
"query": "default_value",
"type": "textbox"
}
]
},
"title": "V27 Repeated Panels and Constant Variable Migration Test Dashboard"
}
@@ -0,0 +1,322 @@
{
"panels": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#FF0000",
"value": null
},
{
"color": "green",
"value": 10
},
{
"color": "orange",
"value": 20
}
]
}
},
"overrides": []
},
"grid": {
"max": 10,
"min": 1
},
"legend": true,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "1.0.0",
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"type": "stat"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"max": null,
"min": null,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#FF0000",
"value": null
},
{
"color": "green",
"value": 10
},
{
"color": "orange",
"value": 20
}
]
}
},
"overrides": []
},
"grid": {
"max": 10,
"min": 1
},
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "1.0.0",
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"type": "stat"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"fieldConfig": {
"defaults": {
"mappings": [
{
"options": {
"20": {
"color": null,
"text": "test"
}
},
"type": "value"
},
{
"options": {
"30": {
"color": null,
"text": "test1"
}
},
"type": "value"
},
{
"options": {
"40": {
"color": "orange",
"text": "50"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#FF0000",
"value": null
},
{
"color": "green",
"value": 10
},
{
"color": "orange",
"value": 20
}
]
}
},
"overrides": []
},
"grid": {
"max": 10,
"min": 1
},
"legend": true,
"mappingTypes": [
{
"name": "value to text",
"value": 1
}
],
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "1.0.0",
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
}
}
],
"type": "stat"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"expr": "rate(http_requests_total[5m])",
"refId": "A"
}
],
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 41,
"templating": {
"list": [
{
"datasource": {
"uid": "prometheus"
},
"name": "query_variable_with_tags",
"query": "label_values(up, instance)",
"refresh": 1,
"type": "query"
},
{
"name": "custom_variable_with_tags",
"options": [
{
"text": "Option 1",
"value": "opt1"
},
{
"text": "Option 2",
"value": "opt2"
}
],
"type": "custom"
},
{
"name": "clean_variable",
"options": [
{
"text": "Hello",
"value": "World"
}
],
"type": "textbox"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"title": "V28 Singlestat and Variable Properties Migration Test Dashboard"
}