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:
+17
-5
@@ -154,10 +154,22 @@
|
||||
"exclude": true
|
||||
},
|
||||
"mappings": {
|
||||
"title": "service",
|
||||
"text": "description",
|
||||
"time": "timestamp",
|
||||
"tags": "labels"
|
||||
"title": {
|
||||
"source": "field",
|
||||
"value": "service"
|
||||
},
|
||||
"text": {
|
||||
"source": "field",
|
||||
"value": "description"
|
||||
},
|
||||
"time": {
|
||||
"source": "field",
|
||||
"value": "timestamp"
|
||||
},
|
||||
"tags": {
|
||||
"source": "field",
|
||||
"value": "labels"
|
||||
}
|
||||
},
|
||||
"builtIn": 0,
|
||||
"type": "influxdb"
|
||||
@@ -214,4 +226,4 @@
|
||||
},
|
||||
"links": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apps/dashboard/pkg/migration/conversion/testdata/output/v1beta1.annotation-conversions.v0alpha1.json
Vendored
+17
-5
@@ -151,10 +151,22 @@
|
||||
"hide": false,
|
||||
"iconColor": "#FF5722",
|
||||
"mappings": {
|
||||
"tags": "labels",
|
||||
"text": "description",
|
||||
"time": "timestamp",
|
||||
"title": "service"
|
||||
"tags": {
|
||||
"source": "field",
|
||||
"value": "labels"
|
||||
},
|
||||
"text": {
|
||||
"source": "field",
|
||||
"value": "description"
|
||||
},
|
||||
"time": {
|
||||
"source": "field",
|
||||
"value": "timestamp"
|
||||
},
|
||||
"title": {
|
||||
"source": "field",
|
||||
"value": "service"
|
||||
}
|
||||
},
|
||||
"name": "Complex Filter Annotation",
|
||||
"target": {
|
||||
@@ -227,4 +239,4 @@
|
||||
"storedVersion": "v1beta1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apps/dashboard/pkg/migration/conversion/testdata/output/v1beta1.annotation-conversions.v2alpha1.json
Vendored
+18
-6
@@ -215,13 +215,25 @@
|
||||
3
|
||||
]
|
||||
},
|
||||
"legacyOptions": {
|
||||
"mappings": {
|
||||
"tags": "labels",
|
||||
"text": "description",
|
||||
"time": "timestamp",
|
||||
"title": "service"
|
||||
"mappings": {
|
||||
"tags": {
|
||||
"source": "field",
|
||||
"value": "labels"
|
||||
},
|
||||
"text": {
|
||||
"source": "field",
|
||||
"value": "description"
|
||||
},
|
||||
"time": {
|
||||
"source": "field",
|
||||
"value": "timestamp"
|
||||
},
|
||||
"title": {
|
||||
"source": "field",
|
||||
"value": "service"
|
||||
}
|
||||
},
|
||||
"legacyOptions": {
|
||||
"type": "influxdb"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+18
-6
@@ -224,13 +224,25 @@
|
||||
3
|
||||
]
|
||||
},
|
||||
"legacyOptions": {
|
||||
"mappings": {
|
||||
"tags": "labels",
|
||||
"text": "description",
|
||||
"time": "timestamp",
|
||||
"title": "service"
|
||||
"mappings": {
|
||||
"tags": {
|
||||
"source": "field",
|
||||
"value": "labels"
|
||||
},
|
||||
"text": {
|
||||
"source": "field",
|
||||
"value": "description"
|
||||
},
|
||||
"time": {
|
||||
"source": "field",
|
||||
"value": "timestamp"
|
||||
},
|
||||
"title": {
|
||||
"source": "field",
|
||||
"value": "service"
|
||||
}
|
||||
},
|
||||
"legacyOptions": {
|
||||
"type": "influxdb"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user