Commit Graph

23 Commits

Author SHA1 Message Date
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
Haris Rozajac 8b72e2188a
Dash-SchemaV2: Don't persist undefined fields (#98493)
Don't persist undefined values
2025-01-07 10:54:56 -07:00
Haris Rozajac a110917577
Dashboard SchemaV2: V2 -> Scene -> V2 integration test (#98146)
* Tests for layout, transformations; displayMode

* wip

* fix annotations

* fix panel query and transformation topic

* fix dash id, default options, fieldConfig

* Complete integration test

* fix annotation query

* Fix test

* Clarify

* Have default value of builtIn

* update import path
2024-12-31 11:43:04 -07:00
Kévin Gomez c8d3ea58f8
Support importing local cue modules when generating TS types with cog (#96876)
* Support importing local cue modules when generating TS types with cog

* Generate enums as unions of values instead of an actual `enum` statement

* Update transformers to use the new TS enums

* Update go workspaces

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-11-28 10:45:31 +01:00
Victor Marin 2736fe0568
Dashboards: Add the option to toggle custom value options in the groupBy variable (#96892)
* allow options list locking in groupBy var

* refactor

* fix

* fix lint
2024-11-25 12:21:25 +02:00
Victor Marin d5f404d082
Dashboards: Add possibility to lock multi value variables option list (#95949)
* add new option for multi variables to lock value list wip

* WIP - lock option list

* tests

* fix

* fixes + canary scenes

* wip

* wip

* fix snapshot

* bump scenes

* Dashboards: Add possibility to lock adhoc variables options list (#96077)

* Lock list of options flag for ad hoc

* refactor

* fix snapshot
2024-11-21 16:01:54 +02:00
Ivan Ortega Alba 1a7faed56a
Add tests to SceneToSaveModelV2 transformer (#96700)
* Add tests to SceneToSaveModelV2 transformer

* Add text properties always
2024-11-20 14:53:58 +02:00
Alexa V 3c182a37fa
Transform DashboardScene into Schema V2 (#95546)
---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
2024-11-19 13:01:40 +01:00
Ivan Ortega Alba d09017f7a2
Dashboard Scene: Sync variable state with TemplateSrv result (#93327)
* Generate options for variables through TemplateSrv

* Add refresh when object changes

* Remove unnecesary static function

* Extract logic

* Add extra test case when variable changes and refresh event is triggered

* bring back old logic, query options should not live in the dashboard json

* add missing change

* Add support to keep variable options in query

* tests

* move refreshEvent to DashboardVariableDependency

---------

Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
2024-10-04 20:19:18 +03:00
kay delaney 424b3528ca
Scenes: Persist variable options in save model (#84812)
* Scenes: Persist variable options in save model

* Updated snapshot
2024-03-21 16:35:48 +01:00
Ashley Harrison b1b65faf02
Variables: Support static keys in AdHocFiltersVariable (#83157)
* initial start

* don't use getTagKeysProvider

* some cleanup

* undo kinds adjustment

* simplify

* remove async declaration

* add description and a couple of unit tests

* add transformSaveModelToScene test

* add tests for AdHocVariableForm

* add tests for AdHocFiltersVariableEditor

* update to defaultKeys

* fix snapshots

* update to 3.13.3
2024-03-18 16:12:00 +00:00
Dominik Prokop f016f95298
GroupBy variable core integration (#82185)
* Bump scenes

* Make GroupByVariableModel a VariableWithOptions

* Serialise/deserialise group by variable

* WIP: Group by variable editor

* WIP tests

* Group by variable tests

* add feature toggle and gate variable creation behind it

* Fix types

* Do not resolve DS variable

* Do not show the message if no DS is selected

* Now groupby has options and current

* Update public/app/features/dashboard-scene/settings/variables/components/GroupByVariableForm.test.tsx

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* don't allow creating groupby if toggle is off + update tests

* add unit tests

* remove groupByKeys

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-02-14 09:18:04 -08:00
Ivan Ortega Alba 3d86d101b7
Dashboards: Use `auto` and only use `AdHocFiltersVariable` to manage filters (#81318) 2024-02-13 22:38:26 +02:00
Dominik Prokop 9982830bd7
DashboardScene: Do not hide variables on save (#81501) 2024-01-30 10:28:17 +01:00
Alexa V e8b2e85966
Dashboard: Scene Migration: Add variable `definition` prop to serialization (#79022)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2023-12-06 11:33:54 +01:00
Dominik Prokop d0b1ceb7d4
DashboardScene: Support Textbox variables (#78525) 2023-11-22 04:43:27 -08:00
Javier Ruiz b7a332276a
[sceneVariablesSetToVariables]: Use type guards from scenes to type variable (#78488)
* Update grafana/scenes version to 1.24.0

* Use type guards to properly type variables

* Update scenes to version 1.24.1
2023-11-22 09:47:44 +01:00
Javier Ruiz ee42f41e0e
[sceneVariablesSetToVariables]: Manually check variable type, instead of instanceof (#78407)
Check type instead of instanceof, manually type variable
2023-11-21 10:40:30 +01:00
Torkel Ödegaard 7169bfdb30
DashboardScene: Support templateSrv.getVariables usage (#77910)
Update
2023-11-13 13:13:27 +01:00
Alexa V 8dfd918200
Dashboard: Use Interval variable in DashboardScene (#75836)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2023-10-16 17:34:09 +02:00
Dominik Prokop 6968f4d6ff
DashboardScene: Share snapshot (#76132)
* Dashboard snapshot creation logic and tests

* Add variable type to serialized json, add refresh prop to datasource var

* WIP Snapshots tab UI

* Use Grafana snapshot query for a generated snapshot

* Make anno snapshots backwards compatible

* Share snapshot tab UI

* Single panel snapshot

* Remove unused param

* Snap update

* Ts fix

* One more snap fix

* Basic rows support

* Add tests for basic rows

* Bettererupdate
2023-10-11 04:24:18 -07:00
Torkel Ödegaard f41565626a
DashboardScene: AdHoc filters (#76115)
* DashboardScene: AdHoc filters

* Update

* minor update

* update
2023-10-10 10:17:21 +02:00
Dominik Prokop 2cfbe087fc
DashboardScene serialization: Handle variables and library panels (#76117)
* DashboardScene serialization: Library panels

* DashboardScene serialization: Variables

* TS fix

* Review

* betetrer -u
2023-10-06 05:32:29 -07:00