Commit Graph

13 Commits

Author SHA1 Message Date
Haris Rozajac f5d8f42635
Dashboard Scene: Fix unnecessary diffing (#100158)
* Fix unnecessary diffing

* use a diferent approach; update legacyId type

* fix test
2025-02-07 10:47:07 -07:00
Alexa V 30c8ac7108
Dashboard: Schema V2 - Remove Dashboard id from spec (#99590)
* Dashboard: Schema V2 - Remove Dashboard id from spec

* Fix issue with dashboard id used in examples and serializers for schema v2

* Fix snapshot test
2025-01-29 10:13:56 +01:00
Alexa V 8f3fd8f91d
Schema v2: Write Path Implement saveDashboard in v2 client API (#98263)
Create new function for save dashboards written in schema v2 and using the v2 api from k8s
2025-01-27 14:14:19 +01:00
Dominik Prokop 8e078315f0
Schema v2: Reason about new dashboard based on UID (#98879)
* 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
2025-01-27 11:18:06 +01:00
Dominik Prokop daced46d27
Schema v2: Remove schemaVersion property (#99375)
* Schema v2: Remove schemaVersion property

* ah snap
2025-01-22 16:52:34 +01:00
Kévin Gomez 77f7ab27be
Use cog as a cli tool to generate code for kinds v2 schemas (#99044)
* Use cog as a cli tool to generate code for kinds v2 schemas

* Update imports to dashboard v2 package in frontend

* Ensure cog is installed before using it
2025-01-16 13:18:47 +01:00
Dominik Prokop 99e1780527
Revert "Schema v2: Reason about new dashboard based on UID (#98800)" (#98877)
This reverts commit 72846e3431.
2025-01-13 13:07:45 +01:00
Dominik Prokop 72846e3431
Schema v2: Reason about new dashboard based on UID (#98800)
* Schema v2: Reason about new dashboard based on UID

* Fix test
2025-01-13 12:16:35 +01:00
Haris Rozajac 6b03adbbb0
Dashboard V2: Snapshot variables and read snapshot (#98463)
* 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>
2025-01-09 08:14:41 -07:00
Ivan Ortega Alba 1a6312296e
Dashboard: Compute tracking info for schema V2 (#98271) 2025-01-02 18:33:16 +02:00
Dominik Prokop 746bde0fac
DashboardSceneSerializerLike: Update interface to support initial version and snapshot url (#98206)
* Make dashboard prompt ignoreChanges schema version independent

* Serializer: add interface for snapshot url retrieval

* Revert "Make dashboard prompt ignoreChanges schema version independent"

This reverts commit 65466c2ef1.

* Add dashbaord version to scene metadata

* Add tracking info

* Revert "Add tracking info"

This reverts commit 4c58c6687b.

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-12-19 16:09:19 +01:00
Ivan Ortega Alba a06779614e
Implement detect changes tracking to V2 Schema (#98153)
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
2024-12-19 13:00:59 +02:00
Dominik Prokop f8686be56a
Schema v2: Make DashboardScene accept v1 and v2 schema (#96931)
* WIP

* Refactor useSaveDashboard to make it dashboard type independent when used

* DashboardPrompt: makeit Dashboard type independent

* DashboardScene: accept both v1 and v2 schema

* Update save dashboard command interface

* Fix test

* Lint

* Refactor

* Add onSaveComplete to DashboardSceneSerializer

* Cleanup tests

* Remove unused code

* Refactor dashboard tracking information

* added a todo

* Fix betterer

* Update betterer results
2024-12-13 10:20:22 +01:00