mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Schema v2: Read API integration (#97953)
* Introduce DashboardScenePageStateManagerLike interface * Implement dash loader for handling v2 api * Transformation improvements * Update response transformer test * v2 schema: Remove defaultOptionEnabled from ds variable schema * v2 schema: Make annotations filter optional * WIP render dashboard from v2 schema * Force dashbaord scene for v2 api * V2 schema -> scene meta transformation * v2 api: Handle home dashboard * Use correct api client in DashboardScenePage * Correctly use v2 dashboard scene serializer * Remove unnecesary type assertions * Handle v2 dashboard not found * Fix type * Fix test * Some more tests fix * snapshot * Add dashboard id annotation * Nits * Nits * Rename v2 api * Update public/app/features/dashboard-scene/serialization/transformSaveModelSchemaV2ToScene.ts Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com> * add getDashboardsApiVersion test for forcing scenes through URL * add links to ResponseTransformers * Update public/app/features/dashboard/api/ResponseTransformers.test.ts Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com> * Nit rename test case * Add tests for DashboardScenePageStateManagerV2 * Update test * Typecheck * Add console error for debugging * Fix typo --------- Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com> Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
This commit is contained in:
@@ -477,18 +477,17 @@ export const defaultVizConfigKind = (): VizConfigKind => ({
|
||||
export interface AnnotationQuerySpec {
|
||||
datasource?: DataSourceRef;
|
||||
query?: DataQueryKind;
|
||||
builtIn?: boolean;
|
||||
enable: boolean;
|
||||
filter: AnnotationPanelFilter;
|
||||
hide: boolean;
|
||||
iconColor: string;
|
||||
name: string;
|
||||
builtIn?: boolean;
|
||||
filter?: AnnotationPanelFilter;
|
||||
}
|
||||
|
||||
export const defaultAnnotationQuerySpec = (): AnnotationQuerySpec => ({
|
||||
builtIn: false,
|
||||
enable: false,
|
||||
filter: defaultAnnotationPanelFilter(),
|
||||
hide: false,
|
||||
iconColor: "",
|
||||
name: "",
|
||||
|
||||
@@ -370,12 +370,12 @@ VizConfigKind: {
|
||||
AnnotationQuerySpec: {
|
||||
datasource?: DataSourceRef
|
||||
query?: DataQueryKind
|
||||
builtIn?: bool | *false
|
||||
enable: bool
|
||||
filter: AnnotationPanelFilter
|
||||
hide: bool
|
||||
iconColor: string
|
||||
name: string
|
||||
builtIn?: bool | *false
|
||||
filter?: AnnotationPanelFilter
|
||||
}
|
||||
|
||||
AnnotationQueryKind: {
|
||||
|
||||
Reference in New Issue
Block a user