- Rename ScenePerformanceService to ScenePerformanceLogger for clarity
- Consolidate performance service initialization into dashboardPerformanceInitializer
- Remove global singleton pattern in favor of per-dashboard lifecycle management
- Add comprehensive collapsible analytics logging with detailed panel breakdowns
- Remove duplicate completion logs between services
- Implement proper cleanup for both ScenePerformanceLogger and DashboardAnalyticsAggregator
- Update all imports and references to use new naming conventions
- Remove getDashboardInteractionCallback from DashboardProfiler.ts
- Clean up imports in dashboard serialization files
- Update analytics comments and remove processingTime references
- Keep getDashboardComponentInteractionCallback as the active function
* create new interaction profiler behaviour and also use it to measure scopes fetching times
* PR mods
* refactor
* add canary scenes
* refactor
* refactor
* canary version
* add config flag for scope measurements
* refactor
* fix
- Remove DashboardPanelProfilingBehavior class and tests
- Update transformSaveModelToScene to use enablePanelProfilingForDashboard
- Update transformSaveModelSchemaV2ToScene to use enablePanelProfilingForDashboard
- Modify DashboardProfiler to use SceneObject instead of any type
- Replace separate behavior with composed SceneRenderProfiler approach
- Add ScenePerformanceService to create Chrome DevTools performance marks/measures
- Implement DashboardAnalyticsAggregator to collect and report dashboard analytics
- Add performanceConstants.ts for standardized performance mark/measure naming
- Add DashboardAnalyticsInitializerBehavior for proper lifecycle management
- Update DashboardProfiler to remove duplicate initialization code
- Fix analytics calls to use correct dashboard_render event format
- Add networkDuration field to dashboard performance data with proper typing
- Add DashboardPanelProfilingBehavior to automatically attach VizPanelRenderProfiler
- Integrate behavior in transformSaveModelToScene and transformSaveModelSchemaV2ToScene
- Enable profiling when dashboard_performance_metrics config matches dashboard UID
- Add comprehensive test suite for behavior functionality
- Remove enableLongFrameDetection parameter (implemented in later phase)
- S2.0 VizPanel Performance Behavior now complete and tested
* Revert "Revert: Future-proofing query and data source model in Dashboard Sche… (#107985)"
This reverts commit 13a89d4ae3.
* Revert "Revert "Schema V2: Simplify annotations v1<->v2 conversions" (#107984)"
This reverts commit 2b8c5bea1a.
* make gen apps
* e2e update
* Use v2alpha2 by default (#108177)
* Use v2alpha2 by default
* Apply only DS changes to alpha2
* Use v2alpha2 by default except to query
* Create a v2 index in @grafana/schema
* Update path and apply lint
* Update tests
* Update imports to v2 status
* Fix failing openapi test
* Schemav2 breaking changes: conversion implementation (#108224)
* provision v2alpha1 dashboard
* Run conversions for DS refactor
* Run snapshot testing on conversions
* Normalize output name
* Update snapshots to include all panel and variable cases
* fix lint
* fix lint
* fix test and go lint
* more go lint
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
* Schema v2: Introduce group/datasource convention to GroupBy and AdHoc variable (#108237)
* Schema v2: Introduce group/datasource convention to GroupBy and AdHoc variables
* add conversion
* App Installer: Authorizer support (#108419)
* Chore: use `satisfies` and remove a load of `any`s (#108397)
use satisfies and remove a load of anys
* improve logging and fail unified-storage migration with more than 0 errors (#108471)
improve logging and fail unified-storage migration with more than 0 errors
* fix conversion test
* Secrets: Create more granular fixed roles for SecureValues (#108382)
* Provisioning: Fix bug in job progress recording (#108440)
Fix bug in job progress recording
* Provisioning: Fix ImportAllPanelsFromLocalRepository test (#108441)
* Provisioning: Skip flaky test
* Fix flaky provisioning test
* Fix lint
---------
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
* BulkDeleteProvisionedResource: Move progress bar into a second step (#108417)
* Move progress bar into a second step
---------
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* [Dashboard Schema Codegen] Move dashboard CUE codegen block back up into kind body (#108476)
[Dashboard Schema Codegen] Move dashboard CUE codegen block back up into kind body to make sure new versions have the same settings.
---------
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Will Assis <35489495+gassiss@users.noreply.github.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Roberto Jiménez Sánchez <jszroberto@gmail.com>
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
Co-authored-by: Yunwen Zheng <yunwen.zheng@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Austin Pond <IfSentient@users.noreply.github.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* Dashboard Schema V2: Refactor VizConfigKind to follow DataQueryKind convention (#108148)
* Dashboards API: Register v2alpha2 API
* Prepare conversion functions
* Fix test
* Refactor VizConfigKind to follow DataQueryKind convention
* fix tests
* use new dataquerykind convention alpha 2
* add conversion
* fix tests
* fix tests
* fix another test
* Fix merge
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* fix k8s codegen
* Update e2e-playwright/dashboards/TestV2Dashboard.json
* Update e2e/dashboards/TestV2Dashboard.json
* revert app generation for non-related apps
* try again
* another try
* also revert folder and secret app generation
* v2alpha1 provisioned dashboard
* Fix kind
* Fix conversion snapshots
* Update API discovery registry
* Rename to v2beta1
* Rename migrations
* Update apps/dashboard/pkg/apis/dashboard/v2beta1/doc.go
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* Ensure conditional rendering and other non changed properties
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Will Assis <35489495+gassiss@users.noreply.github.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Roberto Jiménez Sánchez <jszroberto@gmail.com>
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
Co-authored-by: Yunwen Zheng <yunwen.zheng@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Austin Pond <IfSentient@users.noreply.github.com>
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* Rename Annotations 'Options' to 'legacyOptions'
* use new legacyOptions in StandardAnnotationQueryEditor
* use new legacyOptions in transformSaveModelSchemaToScene
* use legacyOptions in transformSceneToSaveModelSchemaV2
* Fix bug with ds query editors not taking the latest state
* update snapshot
* move preserve to scenePage level, fix issues with restoring variables and failing to reload dd
* refactor and fix preserve/reload url state
* cleanup
* lint
* lint
* reference this PR in comment
* Fix annotations losing queries when saving v1 with dynamic dashboards enabled
* Add extra options property to the DashboardAnnotationQuerySpec to catch all field datasource-specific properties
* Add options to the v2Alpha1 schema and run make gen-apps
* Add unit test and clean up console.logs
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* ReloadDashboard: Unified manager should delegate to the right manager
* Throw only when dashboard version error is detected
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Create basic logic for stateless variables
* Refactor function to get DS from queries and variables
* Simplify code, remove unnecessary wrappers
* Fix typo
* improve naming
* Add unit test for variables
* Fix tests
* Add extra logic to keep backwards compatibility, variables can be used without dashboard scene
* Adjust logic for variables ds
* Refactor code, pass dsReferenceMap
- Rename `initializeMapping` into `initializeElementMapping`
- Create new `initializeDSReferencesMapping` to track queries without explicit datasources
- Fix panel datasource detection to use default datasource when none is specified
- Improve datasource resolution by searching for best match by query kind
- Add unit test
---------
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* 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>
* Add tests
* refactor transformSaveModelToSchemaV2 and transformSceneToSaveModelV2
* move default grid serializer functions outside of class
* simplify layoutmanager descriptor
* add test for SaveModel -> Scene
* Fix lint issues
* remove auto added import
* Fix name
* Fix test typo
* 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
* 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>
* 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