Schema v2: Move annotation mappings out of legacyOptions (#114721)
* Add mappings property to v2(alpha/beta)1 * Mappings convetions * OpenAPI spec * fe annotaations mapping * Update snapshots * v2->v1 conversion * fix tests --------- Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
This commit is contained in:
co-authored by
Haris Rozajac
parent
3e50bfced8
commit
bb787a2637
@@ -1275,6 +1275,24 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v2alpha1.DashboardAnnotationEventFieldMapping": {
|
||||
"description": "Annotation event field mapping. Defines how to map a data frame field to an annotation event field.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"regex": {
|
||||
"description": "Regular expression to apply to the field value",
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"description": "Source type for the field value",
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"description": "Constant value to use when source is \"text\"",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v2alpha1.DashboardAnnotationPanelFilter": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -1354,6 +1372,18 @@
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Mappings define how to convert data frame fields to annotation event fields.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"default": {},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v2alpha1.DashboardAnnotationEventFieldMapping"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
|
||||
Reference in New Issue
Block a user