Dashboard Migrations: V29 query variable refresh property and options (#108088)
* Dashboard Migrations: V31 LabelsToFields-Merge Migration * Dashboard Migrations: V32 No-op migration * simplify * Refactor to reduce nesting * Dashboard Migrations: V30 value mappings and tooltip options * Do not automigrate since graph is migrated in v27 * Refactor to reduce nesting * Add test case for invalid mapping * migrate to v29 --------- Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
This commit is contained in:
co-authored by
Ivan Ortega
parent
1200b684c6
commit
2f8ec01c6c
+137
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"title": "V29 Query Variables Refresh and Options Migration Test Dashboard",
|
||||
"schemaVersion": 28,
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"name": "never_refresh_with_options",
|
||||
"type": "query",
|
||||
"datasource": "prometheus",
|
||||
"options": [
|
||||
{"text": "A", "value": "A"},
|
||||
{"text": "B", "value": "B"}
|
||||
],
|
||||
"refresh": 0
|
||||
},
|
||||
{
|
||||
"name": "never_refresh_without_options",
|
||||
"type": "query",
|
||||
"datasource": "prometheus",
|
||||
"options": [],
|
||||
"refresh": 0
|
||||
},
|
||||
{
|
||||
"name": "dashboard_refresh_with_options",
|
||||
"type": "query",
|
||||
"datasource": "prometheus",
|
||||
"options": [
|
||||
{"text": "C", "value": "C"}
|
||||
],
|
||||
"refresh": 1
|
||||
},
|
||||
{
|
||||
"name": "dashboard_refresh_without_options",
|
||||
"type": "query",
|
||||
"datasource": "prometheus",
|
||||
"options": [],
|
||||
"refresh": 1
|
||||
},
|
||||
{
|
||||
"name": "timerange_refresh_with_options",
|
||||
"type": "query",
|
||||
"datasource": "prometheus",
|
||||
"options": [
|
||||
{"text": "D", "value": "D"},
|
||||
{"text": "E", "value": "E"}
|
||||
],
|
||||
"refresh": 2
|
||||
},
|
||||
{
|
||||
"name": "timerange_refresh_without_options",
|
||||
"type": "query",
|
||||
"datasource": "prometheus",
|
||||
"options": [],
|
||||
"refresh": 2
|
||||
},
|
||||
{
|
||||
"name": "no_refresh_with_options",
|
||||
"type": "query",
|
||||
"datasource": "prometheus",
|
||||
"options": [
|
||||
{"text": "F", "value": "F"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "no_refresh_without_options",
|
||||
"type": "query",
|
||||
"datasource": "prometheus",
|
||||
"options": []
|
||||
},
|
||||
{
|
||||
"name": "unknown_refresh_with_options",
|
||||
"type": "query",
|
||||
"datasource": "prometheus",
|
||||
"options": [
|
||||
{"text": "G", "value": "G"}
|
||||
],
|
||||
"refresh": 2001
|
||||
},
|
||||
{
|
||||
"name": "unknown_refresh_without_options",
|
||||
"type": "query",
|
||||
"datasource": "prometheus",
|
||||
"options": [],
|
||||
"refresh": 2001
|
||||
},
|
||||
{
|
||||
"name": "custom_variable",
|
||||
"type": "custom",
|
||||
"options": [
|
||||
{"text": "custom", "value": "custom"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "textbox_variable",
|
||||
"type": "textbox",
|
||||
"options": [
|
||||
{"text": "Hello", "value": "World"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "datasource_variable",
|
||||
"type": "datasource",
|
||||
"options": [
|
||||
{"text": "ds", "value": "ds"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "interval_variable",
|
||||
"type": "interval",
|
||||
"options": [
|
||||
{"text": "1m", "value": "1m"}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"id": 1,
|
||||
"title": "Test Panel",
|
||||
"type": "timeseries",
|
||||
"datasource": "prometheus",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "up"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user