Commit Graph

26 Commits

Author SHA1 Message Date
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
kay delaney
ad28e3cc77 Scenes: Fix panel repeats (#83707) 2024-03-04 13:01:17 +00:00
kay delaney
c6a16e5520 Scenes/VizPanel: Add support for panel repeat options (#81818) 2024-02-26 17:03:36 +00:00
Haris Rozajac
28fa2849df Dashboard-Scene: View panel as table in edit mode (#83077)
* WIP: working functionality

* betterer

* Fully working: Alerts show up, toggling table view doesn't update viz type in options pane

* betterer

* improve

* betterer

* Refactoring a bit

* wrong step

* move data provider to vizPanel

* Update

* update

* More refactorings

* Fix InspectJsonTab tests (except 1); remove obsolete PanelControls

* Fixed test

* Update

* minor fix

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-02-22 10:34:21 -07:00
Torkel Ödegaard
bfdb4625a0 Grafana/UI: Replace Splitter with useSplitter hook and refactor PanelEdit snapping logic to useSnappingSplitter hook (#82895)
* Hook refactor

* Update

* Test

* Update

* Both directions work

* fixes

* refactoring

* Update

* Update

* update

* Remove consolo.log

* Update

* Fix
2024-02-21 12:34:19 +01:00
Torkel Ödegaard
592b830fd8 DashboardScene: Panel edit ux tweaks (#82500)
* Panel edit ux

* Update

* Update

* switch panel plugin bugfix

* Icon change

* Update

* Update

* Fixes
2024-02-16 13:04:45 +01:00
Torkel Ödegaard
526916e10f DashboardScene: Panel edit use new splitter and new conditional data and options pane logic (#82377)
Rebase
2024-02-14 13:37:52 +01:00
Torkel Ödegaard
763dab7532 DashboardScene: Panel edit toolbar actions (#82302)
* DashboardScene: Panel edit toolbar actions

* Make saving work

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

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

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-02-13 14:23:47 +01:00
Torkel Ödegaard
7f7f1b17e6 DashboardScene: Panel edit progress (#82288) 2024-02-12 11:45:34 +01:00
Dominik Prokop
a385ae4fa5 DashboardScene: Do not show data pane for panels with skipDataQuery (#81934)
* Bump scenes

* Don't show data pane for panels without data support

* Add tests

* Review
2024-02-07 00:51:25 -08:00
kay delaney
b2f2864628 Scenes: Add panel frame options and visualization options to panel editor (#80884) 2024-01-24 14:01:00 +00:00
kay delaney
950d57c0f5 Scenes: Set min-height of left panel editor panes to 0 (#80641) 2024-01-18 11:31:51 +00:00
Dominik Prokop
3356fb7726 DashboardScene: Add dashboard slug support (#80726) 2024-01-17 06:58:57 -08:00
Dominik Prokop
1de876c354 DashboardScene: Get rid of panel edit route (#80605)
* Wip: get rod of panel edit route

* Cleanup unused code

* Test update

* Simplify url sync for inspect and vie/edit panel

* Update navigating back to dashboard from edit panel

* DashboardScene:  Panel inspect improvements (#80655)

Improve inspect, andle view pane end edit mode inspection

* Url sync fixes

* Test update
2024-01-17 05:53:53 -08:00
kay delaney
5640f25213 Scenes/PanelEdit: Fix some styles and flesh out the skeleton (#80366) 2024-01-16 12:58:07 +00:00
Torkel Ödegaard
8157711893 DashboardDataSource: Implement sharing logic inside the data source (#80526)
* Make dashboard data source query actually use DashboardDataSource

* remove commented out bit

* Always wrap SceneQueryRunner with SceneDataTransformer

* Update Dashboard model compat wrapper tests

* DashboardQueryEditor test

* VizPanelManager tests update

* transform save model to scene tests update

* Betterer

* PanelMenuBehavior test update

* Few more bits

* Prettier

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-01-15 16:43:30 +01:00
kay delaney
4a5f271142 Scenes/PanelEdit: Replace panel when commiting editor changes (#80282)
* Scenes/PanelEdit: Replace panel when commiting editor changes

* Clone panel rather than setting it as body directly
2024-01-12 15:22:53 +02:00
Dominik Prokop
cd66149c65 DashboardScene: Handle Dashboard data source when editing panel (#79991)
* Dashboard model compat wrapper update

* Handle changing data source type to and from Dashboard data source

* VizPanelManager tests

* Betterer

* DashboardModelCompatibilityWrapper tests

* Review: test updates

* Test updates

* Test fix

* Move the complexity of the dashboard data source edit directly to the ShareQueryDataProvider

* Make sure deactivation handler ain't called multiple times

* Make sure compat panel compat wrapper return queries for shared runner with transformations

* Betterer

* VizPanelManager: Remove data object subscription

* Remove unnecesary code
2024-01-12 01:21:32 -08:00
Torkel Ödegaard
f0c38611a2 Scenes: Remove old scenes stuff (#79760)
* Scenes: Remove old scenes stuff

* Fixes

* Fixes

* update
2024-01-04 15:44:41 +01:00
Dominik Prokop
73eab8fcd6 DashboardScene: Data source and query options edit for a panel (#79267)
* Scenes bump

* Refactor query group components so that they are reusable

* Basic queries rendering and datasource change

* Store last used ds in local storage

* maxDataPoints and minInterval queries options

* Progress on query options

* Query options tests

* Allow panel inspection / queries inspection from panel edit

* Add counters to data pane tabs

* Betterer update

* Handle data source changes

* Minor fixes

* Data source change tests

* Handle scenario of data source change when transformations are in place

* Review comment

* Fix test
2023-12-19 05:51:19 -08:00
Dominik Prokop
f6bd390bc1 DashboardScene: Skeleton for Panel edit data tabs (#79130) 2023-12-07 01:25:06 -08:00
kay delaney
7a38a2e48b Scenes: Add ability to change panel viz type (#78477)
* Scenes: Add ability to change panel viz type

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2023-12-06 16:14:54 +00:00
Dominik Prokop
6e80a3d59b DashboardScene: Viewer role only support (#76748)
* Allow starring DashboardScene

* Add feature toggle to enable dashbaord scene for viewers

* Basics for proxying viewers to a dashboard scene

* Removed isHomeDashboard flag

* Don't use proxy for rendering dashboard page

* Revert "Don't use proxy for rendering dashboard page"

This reverts commit 95836bdb2c.

* Pre-fetch dashboard prior page rendering

* Depend only on dashboard permissions

* Update default home dashboard to proper model...

* Fix breadcrumbs

* Types update

* Dashboards page proxy tests

* Fix missing controls

* URLs generation

* DashboardScenePageStateManager caching test

* Tests updates

* Fix wrong import

* Test update

* Gen
2023-11-02 12:02:25 -07:00
Torkel Ödegaard
7759e2f8a3 DashboardScene: Panel Keybindings and some others (#76233)
* DashboardScene: Keybindings like v to view panel

* more bindings

* Fix imports

* Progress

* Nit update

* Fix merge

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2023-10-20 06:22:56 -07:00
Torkel Ödegaard
3529b7413d DashboardScene: Include url params when switching from old dashboard arch to new (#74969)
* DashboardScene: Include url params when switching from old dashboard arch to new

* remove imports

* fix
2023-09-22 13:04:17 +02:00
Torkel Ödegaard
499b02b3c6 DashboardScene: Panel edit route basics (#74081)
* DashboardScene: Panel edit route basics

* remove unused file

* Removed some comments

* Minor fix

* Update

* example of apply changes implementation

* SceneObjectRef: Testing scene object ref

* Rename to ref suffix

* Update

* Fix url sync in panel edit

* Update

* Update

* simplify logic when committing change

* remove import

* Another fix for committing change
2023-09-11 13:51:05 +02:00