Dashboard Migrations: V21 data links (#108950)

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
This commit is contained in:
Haris Rozajac
2025-08-08 08:55:32 +00:00
committed by GitHub
co-authored by Ivan Ortega
parent 99c7cd60e6
commit 8f2d27044d
5 changed files with 605 additions and 1 deletions
@@ -0,0 +1,85 @@
{
"title": "V21 Data Links Series to Field Migration Test Dashboard",
"schemaVersion": 20,
"panels": [
{
"type": "timeseries",
"title": "Panel with data links",
"id": 1,
"options": {
"dataLinks": [
{
"url": "http://mylink.com?series=${__series.labels}&${__series.labels.a}",
"title": "Data Link 1"
},
{
"url": "http://anotherlink.com?param=${__series.labels}",
"title": "Data Link 2"
}
]
}
},
{
"type": "stat",
"title": "Panel with field options links",
"id": 2,
"options": {
"fieldOptions": {
"defaults": {
"links": [
{
"url": "http://mylink.com?series=${__series.labels}&${__series.labels.x}",
"title": "Field Link 1"
},
{
"url": "http://fieldlink.com?field=${__series.labels}",
"title": "Field Link 2"
}
]
}
}
}
},
{
"type": "graph",
"title": "Panel with both link types",
"id": 3,
"options": {
"dataLinks": [
{
"url": "http://mylink.com?series=${__series.labels}",
"title": "Graph Data Link"
}
],
"fieldOptions": {
"defaults": {
"links": [
{
"url": "http://mylink.com?field=${__series.labels}",
"title": "Graph Field Link"
}
]
}
}
}
},
{
"type": "timeseries",
"title": "Panel without series labels",
"id": 4,
"options": {
"dataLinks": [
{
"url": "http://mylink.com?other=${__field.labels}",
"title": "No Series Labels Link"
}
]
}
},
{
"type": "timeseries",
"title": "Panel without options",
"id": 5
}
]
}
@@ -0,0 +1,166 @@
{
"panels": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 1,
"options": {
"dataLinks": [
{
"title": "Data Link 1",
"url": "http://mylink.com?series=${__field.labels}\u0026${__field.labels.a}"
},
{
"title": "Data Link 2",
"url": "http://anotherlink.com?param=${__field.labels}"
}
]
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Panel with data links",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 2,
"options": {
"fieldOptions": {
"defaults": {
"links": [
{
"title": "Field Link 1",
"url": "http://mylink.com?series=${__field.labels}\u0026${__field.labels.x}"
},
{
"title": "Field Link 2",
"url": "http://fieldlink.com?field=${__field.labels}"
}
]
}
},
"justifyMode": "auto",
"percentChangeColorMode": "standard",
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Panel with field options links",
"type": "stat"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 3,
"options": {
"dataLinks": [
{
"title": "Graph Data Link",
"url": "http://mylink.com?series=${__field.labels}"
}
],
"fieldOptions": {
"defaults": {
"links": [
{
"title": "Graph Field Link",
"url": "http://mylink.com?field=${__field.labels}"
}
]
}
}
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Panel with both link types",
"type": "graph"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 4,
"options": {
"dataLinks": [
{
"title": "No Series Labels Link",
"url": "http://mylink.com?other=${__field.labels}"
}
]
},
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Panel without series labels",
"type": "timeseries"
},
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"id": 5,
"targets": [
{
"datasource": {
"apiVersion": "v1",
"type": "prometheus",
"uid": "default-ds-uid"
},
"refId": "A"
}
],
"title": "Panel without options",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 41,
"title": "V21 Data Links Series to Field Migration Test Dashboard"
}