Commit Graph

149 Commits

Author SHA1 Message Date
Kyle Brandt
a12669951b Prometheus: Add BE support for Adhoc Filters (#85969)
---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-04-16 16:56:50 +03:00
Alexa V
40f1b2c92c Dashboard: Migration - Add public dashboard tag in the nav bar (#86204)
Migrate public dashboard badge to scenes dashboard
2024-04-16 10:04:25 +02:00
Torkel Ödegaard
869814ea3e DashboardScene: Fix empty row repeat issue (#86095) 2024-04-16 03:10:24 +02:00
Bogdan Matei
d379e319d6 Implement API server client in Scopes (#85266) 2024-04-15 13:43:42 +03:00
Sergej-Vlasov
79631bdd15 DashboardScene: prevent panel hovel header crop with scenes (#85869)
* add behaviour that adjusts hoverHeaderOffset

* clean up behaviour logic

* optimise and extract behaviour to separate file

* fix hoverHeaderOffsetBehavior unsubscribe

* update to latest scenes version

* Fix PanelOptionsTest

* fix: test value for adhoc filter url param

* Fix transformation tab tests

* bump scenes version

* Revert "Fix transformation tab tests"

This reverts commit 3ec9f5b226.

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Darren Janeczek <darren.janeczek@grafana.com>
Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
2024-04-10 20:39:43 +03:00
Dominik Prokop
483dc02b68 Remove repeating responsibility from LibraryVizPanel (#84879)
* Remove repeating responsibility from LibraryVizPanel

* Improvements
2024-04-10 17:46:42 +02:00
Dominik Prokop
615fa73f23 DashboardScene: Enrich requests correctly in edit mode (#85883) 2024-04-10 17:38:37 +02:00
Sergej-Vlasov
33b6f45a9e Revert "DashboardScene: prevent panel hovel header crop with scenes" (#85865)
Revert "DashboardScene: prevent panel hovel header crop with scenes (#85780)"

This reverts commit 23f1732855.
2024-04-10 16:27:53 +03:00
Sergej-Vlasov
23f1732855 DashboardScene: prevent panel hovel header crop with scenes (#85780)
* add behaviour that adjusts hoverHeaderOffset

* clean up behaviour logic

* optimise and extract behaviour to separate file

* fix hoverHeaderOffsetBehavior unsubscribe

* update to latest scenes version

* Fix PanelOptionsTest

* fix: test value for adhoc filter url param

* Fix transformation tab tests

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Darren Janeczek <darren.janeczek@grafana.com>
Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
2024-04-10 15:39:51 +03:00
Darren Janeczek
66c0fd4dcc chore: update datatrails feature flag and enable (#85508)
* chore: update datatrails feature flag and enable

* fix: rename `datatrails` feature flag to `exploreMetrics`
2024-04-09 14:15:18 -04:00
Victor Marin
b6249d6a50 Check source panel for updates in Dashboard DS panel (#85655)
* Check source panel for updates in Dashboard DS panel

* Test

* made it better

* cleanup

* cleanup and tests

* fix failing tests

* find the correct dashboard query

* revert mixed check in dashboard behaviour

* Dashboard data source: Return error when used in mixed data source (#85765)

* MixedDS: Inform about dashboard ds not being supported

* lint fix

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-04-09 20:59:37 +03:00
Ivan Ortega Alba
27bc0c19ab DashboardScene: Detect changes when editing a panel (#85708) 2024-04-09 18:48:10 +03:00
Ivan Ortega Alba
df72cfd38e Dashboard: Move "add" actions into a dropdown (#85776)
* Move all add actions into a dropdown

* Hide alerts rules when editing

* Hide fav icon when editing
2024-04-09 11:09:37 +03:00
Torkel Ödegaard
edf36d9ec0 DashboardScene: Fixes issue with mobile responsive layout due to repeated grid item class (#85731) 2024-04-08 16:55:35 +02:00
Ivan Ortega Alba
d983629650 Detect folder changes when saving a dashboard (#85378) 2024-04-08 13:06:50 +03:00
Ivan Ortega Alba
89638238e5 DashboardScene: Detect changes when live is enabled from settings (#85409)
* Adapt the code to the new live timer API

* Update scenes
2024-04-03 14:22:10 +03:00
Ivan Ortega Alba
eb3d088645 DashboardScene: Implement autofit panels (#85221) 2024-04-03 13:36:29 +03:00
Dominik Prokop
b4dc79401b DashboardScene: Fix explore to dashboard flow (#85140)
* DashboardScene: Fix explore to dashboard flow

* Tests

* Make sure dashboard is in edit mode when adding from explore

* Allow discarding changes when coming from explore

* Tests
2024-04-03 12:06:38 +02:00
Dominik Prokop
fa9e139123 DashboardScene: Fix issues with dashboard empty state (#85406)
Fix

Tests

Make sure edit mode is on when adding panel/library panel

Co-authored-by: kay delaney <kay@grafana.com>
2024-03-30 18:34:26 +01: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
Victor Marin
30c9307539 Scenes: Fix row crash when removing a panel from it (#85339)
* Fix row crash when removing a panel from it

* fix tests

* fix tests
2024-03-28 16:45:33 +02:00
Torkel Ödegaard
e90b87589f ModalsContext: Unify modals context and manager (#84916)
* ModalsContext: Unify modals context and manager

* Clear on location change

* fixes

* Update

* use generics to avoid anys

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-03-28 13:26:57 +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
Carl Bergquist
b214b07695 Scopes: Name relationship objects *binding (#84955)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
2024-03-26 15:52:12 +01:00
Juan Cabanas
8d4ca72f2a PublicDashboards: Scene migration (#84409) 2024-03-22 11:48:21 -03:00
Torkel Ödegaard
bb1133d6d9 DashboardScene: Fixes navbar action buttons collapse to menu (#84928)
* DashboardScene: Fixes navbar action buttons collapse to menu

* Update

* Change zindex
2024-03-22 12:05:25 +01:00
Torkel Ödegaard
b20da139ad DashboardScene: Show insights icon (#84877)
* DashboardScene: Show insights icon

* Update

* Create separate group for precence indicators

* fix

* Update

* fix tests
2024-03-22 09:46:29 +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
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
Bogdan Matei
b23541c298 Implement Scopes UI (#82920) 2024-03-21 13:01:47 +02:00
Darren Janeczek
63e8753aa0 datatrails: integrate dashboard panels with metrics explore (#84521)
* feat: integrate dashboard panels with metrics explore

- add dashboard panel menu items (in non-scenes dashboard) to open
  `metric{filters}` entries detected from queries to launch
  "metrics explorer" drawers for the selected `metric{filter}`

* fix: remove OpenEmbeddedTrailEvent

* fix: use modal manager dismiss capabilities instead
2024-03-18 17:16:38 +01:00
Torkel Ödegaard
4753948262 DashboardScene: Don't show switch to old dashboard architecture toggle unless you are in dev mode (#84444)
* DashboardScene: Don't show switch to old architecture toggle unless you are in dev mode

* Update
2024-03-15 15:39:04 +01:00
kay delaney
6e6d6e368e Scenes: Restrict panel menu options when in edit mode (#84509) 2024-03-15 12:06:05 +02:00
kay delaney
c13e248384 Scenes: Fix issue with discarding unsaved changes modal in new dashboards (#84369) 2024-03-15 09:58:08 +00:00
kay delaney
e5faeb324d Scenes: Make repeat panels respect maxPerRow (#84497) 2024-03-15 09:48:29 +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
Oscar Kilhed
0fe5b62fa5 Dashboard scenes: Unlink library panel inside edit mode (#84355)
Unlink library panel inside edit mode
2024-03-13 18:22:22 +01:00
Victor Marin
90e0f8cab6 Allows re-entering edit mode after version restore (#84298)
* Allows re-entering edit mode after version restore

* refactor

* revert to previous commit
2024-03-13 18:24:26 +02: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
Dominik Prokop
7c1ad64bb2 DashboardScene: Make sure dashboard prompt is shown when navigating away way from an edited dashboard (#84077)
DashboardScene: Make sure dashboard prompt is shown when navigating away from an edited dashboard

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2024-03-12 16:12:00 +01:00
Dominik Prokop
39b682e333 DashboardScene: Fix dashboard being restored to initial state after successful save (#84183)
* Failing test

* Do not restore initial state after edit mode exit when dashboard is not dirty
2024-03-12 13:54:47 +01:00
Victor Marin
f50624d257 Scenes: Duplicate library panels (#84159)
duplicate library panels
2024-03-12 10:11:15 +02:00
Oscar Kilhed
0b2640e9ff Dashboard scenes: Editing library panels. (#83223)
* wip

* Refactor find panel by key

* clean up lint, make isLoading optional

* change library panel so that the dashboard key is attached to the panel instead of the library panel

* do not reload everything when the library panel is already loaded

* Progress on library panel options in options pane

* We can skip building the edit scene until we have the library panel loaded

* undo changes to findLibraryPanelbyKey, changes not necessary when the panel has the findable id instead of the library panel

* fix undo

* make sure the save model gets the id from the panel and not the library panel

* remove non necessary links and data providers from dummy loading panel

* change library panel so that the dashboard key is attached to the panel instead of the library panel

* make sure the save model gets the id from the panel and not the library panel

* do not reload everything when the library panel is already loaded

* Fix merge issue

* Clean up

* lint cleanup

* wip saving

* working save

* use title from panel model

* move library panel api functions

* fix issue from merge

* Add confirm save modal. Update library panel to response from save request. Add library panel information box to panel options

* Better naming

* Remove library panel from viz panel state, use sourcePanel.parent instead. Fix edited by time formatting

* Add tests for editing library panels

* implement changed from review feedback

* minor refactor from feedback
2024-03-11 20:48:27 +01: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
kay delaney
8206a23061 Scenes/Repeats: Show reduced panel menu for repeat panels (#84085) 2024-03-11 13:27:12 +02:00
Victor Marin
9c22a6144e Scenes: Row controls (#83607)
* wip row controls

* wip row repeats

* wip

* wip

* row repeat functional

* refactor

* refactor to reuse RepeatRowSelect2

* refactor + tests

* remove comment

* refactor
2024-03-11 12:34:40 +02:00
Oscar Kilhed
87d6bebb9e Dashboard scenes: Remove panel menu options that are dashboard editing activities when not in edit mode. (#84156)
* remove panel menu options that are dasbhoard editing activities when the dashboard is not in edit mode

* remove corresponding keybindings when not in edit mode

* add keyboard shortcuts but inactivate them when not in edit mode

* Add tests; fix tests
2024-03-11 11:33:33 +01:00
Dominik Prokop
1da78ac846 DashboardScene: Allow unlinking a library panel (#83956)
* DashboardScene: Allow unlinking a library panel

* Betterer

* Revert

* Review
2024-03-07 18:11:34 +01:00
Victor Marin
20d201ca6a Scenes: Remove normal and library panels from layout or rows (#83969)
* Remove normal/lib panels from layout or rows

* refactor
2024-03-07 10:24:12 +02:00
Leon Sorokin
1dc6014b10 Dashboard: Revert descending z-index changes (#83466)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-03-06 16:31:54 +02:00