* feat: Implement optional URL path sanitization in BackendSrv methods
* add comment
* revert
* remove namespace import from backendsrv
* change method to validatePath, remove query params and fragments
* Moved validatePath call into fetch and make it throw an error instead
* update pluginSettings tests
* prettier
* Update public/app/features/plugins/pluginSettings.ts
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* change name to validatePath
* fix other tests
* rename property in backend_srv tests
* rename to validatePath in backend_srv, add extra tests
* Move path validation into parseUrlFromOptions
* fix
* Add additional check
* Add test
---------
Co-authored-by: joshhunt <josh.hunt@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* 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
* save transparent setting
* make sure we test both transparent and non transparent
* no more legacy rows
* schema changes
* Add testing, fix first row offset
* Remove legacy row from transform test
* Remove panel that's not present in layout
* Remove expects after removing the row, fix lint issues
* Remove unused commit
* update codegen
* update openapi snapshot
* Fix snapshot
* add missing default prop
* Fix repeating, fix first row, fix not flushing last row
* Use correct repeater
* fix lint, remove unused empty check
* update codegen
* update openapi test snapshot
* make serializer a single source of truth for passing k8s props on save
* remove resourceVersion when updating
* don't pass result.version to resourceVersion
* remove k8s update on saveCompleted from dash scene
* 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>
* Refactor migration error handling to use MinimumVersionError for schema version checks
- Updated migration logic to return MinimumVersionError instead of MigrationError for outdated schema versions.
- Enhanced MinimumVersionError message for clarity on migration constraints.
- Added tests for version error handling in the dashboard API to ensure proper error throwing for specific conversion errors.
* Fix tests and remove folder dependencies
* wip: Create a proxy state manager to avoid complexity
* Read path redirecting
* add tests for unified dashboard API
* add tests
* Contemplate both formats in DashboardProxy
* Fix force old
* Fix tests for proxy
* catch errors
* Save as V2 when dynamic dashboard is enabled
* Improve tests
* Remove feature toggle
* Use kubernetesDashboards for e2e suite
* Fix issue when loading snapshots
* Fix typescript errors
* Integrate with backend conversion error
* Remove legacy annotation
* fix snapshot loading; lint
* Add missing hideTimeControls
* fix test
* make setupDashboardAPI to all suites
* refactor getDashboardAPI
* Add tests
* fix DashboardScenePage tests
* fix tests
* fix go tests
* Refactor to understand better the need of transforming to v2 to compare
* Fix detect changes logic
* yes status from schema gen
---------
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
* Create element panel lookup table
* When transforming to schema v2 get the element_identifier
* Add element identifier logic to layouts
* Retrieve element id in the serialization of each layout
* Keep ElementMapping updated when adding, removing panels
* Add basic unit test
* Wip: implement element mapping in serializer
* Remove Singleton
* Apply suggestions from code review
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
* bring back missing functions - poc works at this point
* Move getElementIdentifierForVizPanel to dashboardSceneGraph
* poc - don't keep elementMapping updated
* Move logic to layout type serializer
* Remove unused code and remove layout tests
* clean up code, remove unnecessary functions
* Fix issue with initializeMapping
* remove console errors
* Remove testing code from response transformers
* Add unit test for DashboardSceneSerializer
* reset file, change not needed
* Improve comments on getElementIDForPanel
---------
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
* change weektype from string to WeekStart | undefined
* Change to WeekStart in more places, fix lint
* change in more places
* More weekstart changes
* fix snapshot, update betterer
* keep weekstart as '' in test dashboards to make sure it doesn't break old dashboards
* adjut quickRanges type in v2
* clean up unused time_options property
* remove deprecated time_options property on time picker
* add schema migration for time_options
* adjust test
* update scenes and weekStart prop type
* update test
* adjust weekStart type in schemaV2
* clean up weekStart error message
* clean up weekStart in test data
* Introduce __legacyStringValue and deprecate string type for query
* Fix tests
* Fix tests
* remove default
* kind should default to default ds if variable doesn't have ds field
* lint
* getDefaultDataSourceRef should not return undefined
* RTK APIs: Extract base query function
* Add error handling
* Add return type
* Use createBaseQuery in browseDashboards
* Support custom manageError
* Export getConfigError
* Remove redundant type
* data -> body
* Testing out rows in schemav2
* update schema
* loading sort of works
* descibe position in relation to row
* add row repeats by variable
* explain ts-expect-error
* Save repeats as well
* Update tests for repeat behavior of rows
* Don't add the clones of the repeated rows
* Add row support for response transformer for V2
* Add row actions
* fix panel name
* fix merge issue
* fix tests
* Implement ensureV1
* set key of GridRow
* fix lint issue
* When going from V2 to V1 rows should be assigned unique ids following max panel id
* remove old comment
* Add panel repeats in V2 -> V1 transform
* 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>