* Dashboards: Add restore endpoints to the API
* Fix unified api
* Fix resource version
* Add tests
* Update api
* Update type guards
* Update comments
* Add missing type
* Cleanup
* Move spec checking logic to v1 client
* Handle mixed versions in deleted dbs list
* Update tests
* comment
* type
* Provisioning: Refactor createOnCacheEntryAdded
* Use custom list resource type
* add generated types and transformers
* Switch to type guards
* Do not create new array
* create permissions
* add key
* lint
* structure as a delayed callback
* legacy API hook
* merge main
* wired up
* and folders
* watch repos
* missing return statement
* Set the correct permissions
* add TestAfterCreatePermissionCreator
* do not add perms on folder create
* fix tests
* add annotation on create
* lint
* lint
* ensure we set permissions when the FT is disabled
* remove custom folder_storage
* fix lint
* change default
* lint
* lint
* fix: annotation
* ensure permissions are added on folder legacy
* remove folderstorage again
* fix tests
* add FT
* undo change to folder
* dashboard on create
* remove annotation for folder
* fix tests
* fix prepare after rebase
* fix tests
* fix tests
* fix tests
* lint
* address comments
* add test for prepareObjectForStorage
* add again skipIfMode as per comment
---------
Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
* Dashboard: Schema V2 - Remove Dashboard id from spec
* Fix issue with dashboard id used in examples and serializers for schema v2
* Fix snapshot test
* Get rid of _dashboardLoadFailed
* Get rid of dashboardNotFound meta
* Update public dashboards tests
* Fix DashboardPage tests
* DashboardPageProxy tests
* DashboardScenePageStateManager test fix
* Beterer
* Fix merge
* Nits
* Fix test
* remove debugger
* Update get folder to throw
* translate error title
* Update public/app/features/apiserver/types.ts
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Update public/app/features/dashboard/services/DashboardLoaderSrv.ts
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Update public/app/features/dashboard/services/DashboardLoaderSrv.ts
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Update public/app/features/dashboard/services/DashboardLoaderSrv.ts
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
* Betterer
* Update test cases
* More test updates
* More translations
---------
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
* Schema v2: Reason about new dashboard based on UID
* Fix test
* Alerting: respect isNew dashboard for legacy and new arch
* Translate untranslated strings
* Unify is new checks
* PanelInspectDrawer update
* typo fix
* on close test for panel inspect drawer
* Update public/app/features/alerting/unified/PanelAlertTabContent.tsx
* 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
* Enable snapshot variables
* Support getSnapshotUrl() for v2 serializer
* fix
* Make metadata available in the serializer
* Test
* Decouple meta info
* State Manager: Extract snapshot loading into loadSnapshot
* Fix tests
* Add test for snapshot url
* Don't expose dashboardLoaderSrvV2
* Remove TODO
* Bubble up loading snapshot error to error boundary
* Fix test
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* 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>
* structure apic
* API versioning proposal
* Make api service independent from version
* Update v2
* Fix public dashboards page test
* Uncomment reload dashboard feature code
* Revert
* Betterer
* Fix imports
* useV2DashboardsAPI feature toggle
* POC/v2 schema: Add v1<-> v2 transformers (#97058)
* Make dshboard access interface more precise
* Add first pass for schema v1<->v2 transformers
* Update response transformer test
* Import fixes
* Manage dashboards validation: Handle v2 schema
* Handle new dashboard with v2
* Fix tests
* Move dashboard is folder error handling to legacy API implementation
* Add tests for dashboard api client
* betterer
* Use dashboard DTO when capturing dashbaord impression
* prettier
* Dashboard API: resolve folder metadata
* Add tests for resolving folder metadata
* Fix DashboardPicker
* Renames and nits
* POC Alternative Suggestion for Dashboard API versions handling (#97789)
* Add transitional_dashboard_api, reset components that are not ready for v2 schema, and start working on migrating
DashboardPicker to use v2 schema
* reset DashboardScenePageStateManager
* Improve logic in transitional api, also remove isDashboardResource checks from components
* REmove transitional_dashboard_api and apply PR feedback
* Apply PR feedback, use 'v2' as a parameter and remove unnecesary if
* Fix tests
* Adding missing comments from original PR and also changing order to improve diffing in github :)
* update betterer
* fix prettier
* Add tests for DashboardPicker
* Do not use unified alerting mocks
* Fix unused type in dashboard test
* Improve comments in DahboardPicker
* Update folder validation fn
* Validation update
* Update legacy api test
* Lint
---------
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* Implement changes for new Scopes API
* Update from linkID to linkId
* Fixes
* Fix tests
* prom/scopes: change query model to recieve []ScopeSpec
* Move to basic backend service
---------
Co-authored-by: Kyle Brandt <kyle@grafana.com>