Dashboards/API: Keep original when conversion fails (#109912)
* keep original * openapi * update tests * workspace * workspace * fix ts * merge main * update snapshots
This commit is contained in:
@@ -20,6 +20,7 @@ func Convert_V2alpha1_to_V0(in *dashv2alpha1.Dashboard, out *dashv0.Dashboard, s
|
||||
StoredVersion: ptr.To(dashv2alpha1.VERSION),
|
||||
Failed: true,
|
||||
Error: ptr.To("backend conversion not yet implemented"),
|
||||
Source: in,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -36,6 +37,7 @@ func Convert_V2alpha1_to_V1(in *dashv2alpha1.Dashboard, out *dashv1.Dashboard, s
|
||||
StoredVersion: ptr.To(dashv2alpha1.VERSION),
|
||||
Failed: true,
|
||||
Error: ptr.To("backend conversion not yet implemented"),
|
||||
Source: in,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -52,6 +54,7 @@ func Convert_V2alpha1_to_V2beta1(in *dashv2alpha1.Dashboard, out *dashv2beta1.Da
|
||||
StoredVersion: ptr.To(dashv2alpha1.VERSION),
|
||||
Failed: true,
|
||||
Error: ptr.To(err.Error()),
|
||||
Source: in,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -79,6 +82,7 @@ func Convert_V2beta1_to_V0(in *dashv2beta1.Dashboard, out *dashv0.Dashboard, sco
|
||||
StoredVersion: ptr.To(dashv2beta1.VERSION),
|
||||
Failed: true,
|
||||
Error: ptr.To("backend conversion not yet implemented"),
|
||||
Source: in,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -95,6 +99,7 @@ func Convert_V2beta1_to_V1(in *dashv2beta1.Dashboard, out *dashv1.Dashboard, sco
|
||||
StoredVersion: ptr.To(dashv2beta1.VERSION),
|
||||
Failed: true,
|
||||
Error: ptr.To("backend conversion not yet implemented"),
|
||||
Source: in,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -111,6 +116,7 @@ func Convert_V2beta1_to_V2alpha1(in *dashv2beta1.Dashboard, out *dashv2alpha1.Da
|
||||
StoredVersion: ptr.To(dashv2beta1.VERSION),
|
||||
Failed: true,
|
||||
Error: ptr.To("backend conversion not yet implemented"),
|
||||
Source: in,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user