Schema V2: Simplify annotations v1<->v2 conversions (#107390)
* Initial migration pending to test * Update tests * apply feedback * Remove unnecessary types * Fix types * Update tests * fixing tests * Default DS for transformer * Update the default DS * Update the generated sdk files * Restore commented tests * Update tests * Updating snapshots * fix * Do not preserve empty datasource in panel spec * update provisioning v2 sample dashboard * Fix test * Prettier * Fix import e2e * Prettier * restore commented tests * Update to support annotations * Lint * Make gen apps * Make the build pass Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com> * Update grafana-app-sdk to 0.39.2 * Workspace update * make gen-cue * Runtime error fix * Update dashboard spec * Update go workspaces * Schema V2: Simplify annotations v1<->v2 conversions * Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts * Cleanup and some more tests * test improvement * Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts * Update go.sum * make generate * Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com> * ts * make gen-apps * Update response transformers to correctly handle v2->v1 annotations * Update dashboards openapi snapshot --------- Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com> Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com> Co-authored-by: alexandra vargas <alexa1866@gmail.com> Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com> Co-authored-by: Igor Suleymanov <igor.suleymanov@grafana.com> Co-authored-by: spinillos <selenepinillos@gmail.com> Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
This commit is contained in:
@@ -394,7 +394,7 @@ AnnotationQuerySpec: {
|
||||
name: string
|
||||
builtIn?: bool | *false
|
||||
filter?: AnnotationPanelFilter
|
||||
legacyOptions?: [string]: _ //Catch-all field for datasource-specific properties
|
||||
legacyOptions?: [string]: _ // Catch-all field for datasource-specific properties. Should not be available in as code tooling.
|
||||
}
|
||||
|
||||
AnnotationQueryKind: {
|
||||
|
||||
@@ -398,7 +398,7 @@ AnnotationQuerySpec: {
|
||||
name: string
|
||||
builtIn?: bool | *false
|
||||
filter?: AnnotationPanelFilter
|
||||
legacyOptions?: [string]: _ //Catch-all field for datasource-specific properties
|
||||
legacyOptions?: [string]: _ // Catch-all field for datasource-specific properties. Should not be available in as code tooling.
|
||||
}
|
||||
|
||||
AnnotationQueryKind: {
|
||||
|
||||
@@ -30,7 +30,7 @@ type DashboardAnnotationQuerySpec struct {
|
||||
Name string `json:"name"`
|
||||
BuiltIn *bool `json:"builtIn,omitempty"`
|
||||
Filter *DashboardAnnotationPanelFilter `json:"filter,omitempty"`
|
||||
// Catch-all field for datasource-specific properties
|
||||
// Catch-all field for datasource-specific properties. Should not be available in as code tooling.
|
||||
LegacyOptions map[string]interface{} `json:"legacyOptions,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -643,7 +643,7 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardAnnotationQuerySpec(ref common.
|
||||
},
|
||||
"legacyOptions": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Catch-all field for datasource-specific properties",
|
||||
Description: "Catch-all field for datasource-specific properties. Should not be available in as code tooling.",
|
||||
Type: []string{"object"},
|
||||
AdditionalProperties: &spec.SchemaOrBool{
|
||||
Allows: true,
|
||||
|
||||
Reference in New Issue
Block a user