Dashboard Migrations: v18 - gauge options (#109496)

* migrate to v19

* migrate to v18

* Update v19.go
This commit is contained in:
Haris Rozajac
2025-08-13 15:01:50 -06:00
committed by GitHub
parent df70198038
commit 4a3b8a567f
5 changed files with 566 additions and 1 deletions
@@ -0,0 +1,66 @@
{
"title": "V18 Gauge Options Migration Test Dashboard",
"schemaVersion": 17,
"panels": [
{
"id": 1,
"type": "gauge",
"title": "Complete Gauge Panel",
"options-gauge": {
"unit": "ms",
"stat": "last",
"decimals": 2,
"prefix": "Value: ",
"suffix": " ms",
"thresholds": [
{"color": "green", "value": 0},
{"color": "yellow", "value": 50},
{"color": "red", "value": 100}
]
}
},
{
"id": 2,
"type": "gauge",
"title": "Partial Gauge Panel",
"options-gauge": {
"unit": "percent",
"decimals": 1
}
},
{
"id": 3,
"type": "gauge",
"title": "Buggy Gauge Panel",
"options-gauge": {
"unit": "bytes",
"options": "this should be deleted",
"stat": "avg",
"decimals": 0
}
},
{
"id": 4,
"type": "gauge",
"title": "Custom Properties Gauge Panel",
"options-gauge": {
"unit": "short",
"customProperty": "customValue",
"anotherProp": 42,
"thresholds": [
{"color": "blue", "value": 10}
]
}
},
{
"id": 5,
"type": "graph",
"title": "Non-Gauge Panel",
"options": {
"legend": {
"show": true
}
}
}
]
}
@@ -0,0 +1,162 @@
{
"panels": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 1,
"options": {
"thresholds": [
{
"color": "red",
"value": 100
},
{
"color": "yellow",
"value": 50
},
{
"color": "green",
"value": 0
}
],
"valueOptions": {
"decimals": 2,
"prefix": "Value: ",
"stat": "last",
"suffix": " ms",
"unit": "ms"
}
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Complete Gauge Panel",
"type": "gauge"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 2,
"options": {
"valueOptions": {
"decimals": 1,
"unit": "percent"
}
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Partial Gauge Panel",
"type": "gauge"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 3,
"options": {
"valueOptions": {
"decimals": 0,
"stat": "avg",
"unit": "bytes"
}
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Buggy Gauge Panel",
"type": "gauge"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 4,
"options": {
"anotherProp": 42,
"customProperty": "customValue",
"thresholds": [
{
"color": "blue",
"value": 10
}
],
"valueOptions": {
"unit": "short"
}
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Custom Properties Gauge Panel",
"type": "gauge"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 5,
"options": {
"legend": {
"show": true,
"showLegend": true
}
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Non-Gauge Panel",
"type": "graph"
}
],
"refresh": "",
"schemaVersion": 41,
"title": "V18 Gauge Options Migration Test Dashboard"
}