Commit Graph

57 Commits

Author SHA1 Message Date
Ivan Ortega Alba
d983629650
Detect folder changes when saving a dashboard (#85378) 2024-04-08 13:06:50 +03:00
Dominik Prokop
63a941472e
DashboardScene: Fix access to dashboard settings views (#85289)
* DashboardScene: Fix access to dashboard settings views

* Review
2024-03-28 16:40:39 +01:00
Dominik Prokop
ae9a4b6467
DashboardScene: Fix constant variable not being hidden after creation (#85196) 2024-03-28 15:29:48 +01:00
Torkel Ödegaard
d290aaff46
DashboardScene: Support time region migrations (#84147)
* DashboardScene: Support time region migrations

* Update

* Update

* Update

* fix

* Fix lock

* fix tests

* Fix migrations test

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-03-28 07:39:26 +01:00
Dominik Prokop
f74d5ff93e
Data layers: Integrate latest scenes changes (#84804)
* bump scenes

* Improved data layers

* DashboardScene: Allow transformations by topic

* Use stable version

* Mock grafana ds to avoid anno layers test failure

* Fix name change

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-03-21 18:23:47 +01:00
kay delaney
86afe012c5
Scenes: Enable live now feature (#84399) 2024-03-21 16:57:22 +00:00
Dominik Prokop
a4ff2abd9d
PanelGridItemRepeater: Refactor (#84710)
* wip

* serialisation tests updates

* VizPanelManager test updates

* ests updates

* Making it green

* Use DashboardGridItem instead of SceneGridItem

* Cleanup tests that unnecessarily depend on dashboard grid items

* Fix row repeater behavior test

* Update public/app/features/dashboard-scene/panel-edit/PanelEditor.tsx

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>

* Fix unnecessary library panel changes detection

* Fix test

---------

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2024-03-21 14:38:00 +01:00
Ivan Ortega Alba
74e62ac6fa
Dashgpt: Make generate title and description work in scened dashboard settings (#84649)
* wip

* add GenAI to scenes dashboard settings

* rework title and description into controlled inputs

---------

Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
2024-03-19 14:06:03 +00: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
Sergej-Vlasov
26e1a5887a
DashboardScene: Reset editIndex on variable delete (#84589)
* reset edit index on variable delete

* adjust delete variable test

* adjust test to be more in line with user flow
2024-03-18 12:02:12 +00:00
Gilles De Mey
8765c48389
Alerting: Remove legacy alerting (#83671)
Removes legacy alerting, so long and thanks for all the fish! 🐟

---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Co-authored-by: Sonia Aguilar <soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Armand Grillet <armandgrillet@users.noreply.github.com>
Co-authored-by: William Wernert <rwwiv@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-03-14 15:36:35 +01:00
Dominik Prokop
8c7e65f6f4
Dashboard settings: Allow saving dashboard from JSON model view (#84343)
* Dashboard settings: Allow saving dashboard from JSON model view

* Dashboard settings: Allow saving dashboard from JSON model view

* Review fix
2024-03-13 16:15:40 +01:00
Sergej-Vlasov
c0d0f13a8d
DashboardScene: Reset query variable query and definition on datasource change (#84347)
reset query variable query and definition on datasource change
2024-03-13 15:41:03 +02:00
Ivan Ortega Alba
4a81a0388b
Playlist: run on Scenes (#83551)
* DashboardScene: Implement playlist controls

* Mock the runtime config properly

* PlaylistSrv: with state you can subscribe to (#83828)

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-03-11 13:33:32 +01:00
Erik Sundell
bc34874bbb
Annotations: Add selector to new query button (#83240)
add selector
2024-03-07 07:25:11 +01:00
Ivan Ortega Alba
29d6cd8fa0
DashboardScene: Share change detection logic between saving and runtime (#81958)
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-02-29 18:18:26 +02:00
Sergej-Vlasov
30965d47a3
DashboardScene: Update query variable definition on query change (#83218)
* update scenes query variable definition on query change

* add variable query definition test
2024-02-27 17:48:08 +02:00
Ivan Ortega Alba
5460d75e74
QueryVariableEditor: Select a variable ds does not work (#83144) 2024-02-21 17:57:53 +02:00
Sergej-Vlasov
e1edec02d0
DashboardScene: Validate variable name in scenes variable editor (#82415)
* add variable name validation

* adjust variable name validation logic

* move variable name validation logic to model

* add tests for onValidateVariableName

* extract variable name validation itest into separate describe
2024-02-21 17:16:57 +02:00
Torkel Ödegaard
6db2d1a411
DashboardScene: Simplify controls a bit (#82908)
* DashboardScene: Simplify controls a bit

* update tests

* more test updates

* Update

* improvements

* Fix

* Fix merge

* Update

* update
2024-02-20 08:43:02 +01:00
Gilles De Mey
248031d007
Alerting: Show legacy provisioned alert rules warning (#81902) 2024-02-16 14:47:03 +01: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
Victor Marin
1fe32479d7
Scenes: Annotations functionality in settings (#81361)
* wip listing/viewing annotations

* list annotations in settings

* fix tests

* wip edit mode

* PR mods

* move, delete, edit, add new

* edit annotation in settings

* Annotations functionality

* revert change

* add ui tests, move angularEditorLoader

* remove flaky test

* refactor

* bump scenes version, refactor getVizPanels, refactor edit page

* fix nav breadcrumbs

* annotation set dirty flag, add overlay to edit view

* PR mods

* PR mods

* remove flaky test

* change dirty flag setting logic for anotations

* change button variants
2024-02-12 16:06:46 +02:00
Sergej-Vlasov
5a5520b5da
Dashboards: add delete variable flow to VariableEditorForm (#82149)
* add delete variable flow to VariableEditorForm

* adjust modal logic and replace HorizontalGroup with Stack

* revert onDelete prop name
2024-02-09 12:01:58 +00:00
Ivan Ortega Alba
35e96d6b04
Settings: Consistent footer actions across edit views (#82048) 2024-02-08 11:50:53 +02:00
Ashley Harrison
af8ea896d0
GroupBy: add new groupby variable type and optional groupByKeys (#81717)
* add new groupby type

* rename to groupByKeys + introduce GroupByVariableModel

* fix unit test

* update scenes package

* update interface

* update fixture

* update unit test

* bump to scenes 2.6.2

* remove baseFilters for now
2024-02-07 11:14:04 +00:00
Sergej-Vlasov
3605d85c4c
Dashboards: Remove advancedDataSourcePicker feature toggle (#81790)
* remove advancedDataSourcePicker feature toggle from DataSourcePickerWithPrompt

* remove advancedDataSourcePicker toggle from DataSourcePicker and adjust tests that relied on old picker

* adjust failing tests in QueryVariableEditorForm

* move DataSourceDropdown to DataSourcePicker file

* covert style declaration syntax to object style in DataSourcePicker

* remove advancedDataSourcePicker  feature flag from registry

* remove .only from test

* adjust QueryVariableEditor test to avoid console.error
2024-02-06 09:20:07 +00:00
Victor Marin
613da422ca
Scenes: Migrate permissions settings page (#81781)
* Migrate permissions settings page

* fix
2024-02-06 10:32:55 +02:00
Torkel Ödegaard
6e3048c6fa
DashboardScene: move overlay out from each edit view (#81852) 2024-02-05 11:17:33 +01:00
Alexa V
62c8584443
Dashboard: Migration - Edit Variable Settings: Implement "Add new" and Remove "Discard Changes" (#81660)
* enable "add" new variables and implement logic

* Remove discard changes code as we will not follow that pattern for now

* Add unit test of the onAdd function

* add unit test for utils functions
2024-02-01 17:07:59 +01:00
Ivan Ortega Alba
a9f17a3f24
QueryVariable: Be able to edit the variable using scenes (#80847) 2024-01-31 13:31:08 +01:00
Victor Marin
63c7096d32
Scenes: List annotations in dashboard settings (#80995)
* wip listing/viewing annotations

* list annotations in settings

* fix tests

* PR mods
2024-01-30 18:38:26 +02:00
Torkel Ödegaard
b48e1f897e
Dashboard: Improve diff styling (#81509)
* Dashboard: Improve diff styling

* Update public/app/features/dashboard-scene/settings/version-history/DiffGroup.tsx

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* Fix

* Update

* Update

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-01-30 16:07:24 +01:00
Alexa V
e3a648e107
Dashboard: Migration - EditVariable Settings: Implement Interval Variable (#81259)
* Extract logic from core IntervalEditor and create a new Form to be shared between scenes and core
* Implement IntervalVariableEditor and refactor some utils functions
* Add unit test
2024-01-29 16:53:09 +01:00
Haris Rozajac
7ab710daa7
Dashboard-Scenes: JSON Model and Version tabs don't hide edit mode on refresh (#81219)
* Add NavToolbarActions to fix the bug

* Update public/app/features/dashboard-scene/settings/VersionsEditView.tsx

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>

* Fix compared view

---------

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2024-01-25 21:27:11 +00:00
Alexa V
2774e0d023
Dashboard: Migration - EditVariable Settings: Implement DataSource Variable (#80885)
* Extract DatasourceVariableForm logic and use it in core grafana

* Implement DataSourceVariable editor in scenes

* Refactor VariableSelect and add unit test for DataSourceVariableEditor

* Refactor old unit test to use userEvent and mock getDataSourceSrv
2024-01-25 12:56:37 +01:00
kay delaney
b2f2864628
Scenes: Add panel frame options and visualization options to panel editor (#80884) 2024-01-24 14:01:00 +00:00
Ashley Harrison
3f1e97cb07
NestedFolderPicker: Add clearable prop (#81114)
* add clearable prop to NestedFolderPicker

* update types
2024-01-24 13:18:01 +00:00
Haris Rozajac
85d633f1b9
Dashboards-Scenes: ability to edit and save JSON model (#80757)
* View JSON Model tab

* Use correct translation field

* saving functionality

* Remove TODO

* Update button tittle
2024-01-19 09:25:56 -07:00
Victor Marin
b93567a839
Scenes: Restore dashboard from version settings (#80600)
* Add versions tab in dashboard settings

* Fetch and render dashboard versions

* Be able to compare two versions

* PR discussion changes

* remove unnecessary async in test

* PR discussion mods

* linter fix

* styles and tests

* Fix show more versions bug

* migrate files + style fix

* fix test

* refactor styles - css object keys to camelCase

* refactor file migrations

* more files migrations

* wip restore

* remove unused type, cleanup

* wip

* restore functionality

* revert defaults

* wip

* restore functional

* refactor + tests

* CR modifications

* fix tests - CR mods
2024-01-19 10:58:20 +02:00
Alexa V
4b113f87f9
Dashboard: Migration - EditVariable Settings: Implement Constant Variable (#80743)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-01-18 11:04:29 +01:00
Ivan Ortega Alba
3b401d0d4d
CustomVariable: Be able to edit them using scenes (#80193)
---------
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2024-01-17 19:14:01 +02:00
Victor Marin
5a509ef1f1
Scenes: Compare versions in dashboard settings (#80286)
* Add versions tab in dashboard settings

* Fetch and render dashboard versions

* Be able to compare two versions

* PR discussion changes

* remove unnecessary async in test

* PR discussion mods

* linter fix

* styles and tests

* Fix show more versions bug

* migrate files + style fix

* fix test

* refactor styles - css object keys to camelCase

* refactor file migrations

* more files migrations

* remove unused type, cleanup
2024-01-17 17:14:29 +02:00
Alexa V
6c609051a0
Dashboard: Migration - EditVariable Settings: Implement TextBox Variable (#80293)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-01-16 12:38:34 +01:00
Ivan Ortega Alba
07778cb221
DashboardLinksSettings: Move them to Scenes (#79998) 2024-01-16 13:24:54 +02:00
Victor Marin
1cf53a34d1
Scenes: Render versions in dashboard settings (#80229)
* Add versions tab in dashboard settings

* Fetch and render dashboard versions

* PR discussion changes

* remove unnecessary async in test

* PR discussion mods

* linter fix
2024-01-15 16:57:45 +02:00
Dominik Prokop
900fa04c9b
VariableEditorForm: Fix multi-value variable runtime error (#80425) 2024-01-12 12:24:53 +02:00
Ivan Ortega Alba
e9f1b41d23
EditVariable: Add base form to edit variables (#80172) 2024-01-12 12:01:11 +02:00
Haris Rozajac
d4f76c3391
Dashboard-Scene Migration: User can view JSON Mode tab (#80332)
* View JSON Model tab

* Use correct translation field

* Extract json grabbing and formatting into a model method
2024-01-11 15:18:35 -07:00