Commit Graph

20 Commits

Author SHA1 Message Date
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
Josh Hunt
f2628bfad4
Whitelabelling: Override version in UI from config (#84392)
* Unify how the version is shown in the UI

* use versionString in dashboard help bundles

* fix lint

* remove comment

* fix test types

* make test less flakey
2024-03-15 18:39:13 +02:00
Dominik Prokop
b8d4d28f4a
DashboardScene: Fix Get Help panel menu for lib panels (#84272) 2024-03-12 13:54:55 +01:00
Oscar Kilhed
bc7eacfcbd
Dashboard Scenes: Add model to library panel inspect json (#83536)
* Add model to library panel inspect json

* Add missing information from library panel when inspecting its JSON

* minor refactor

* refactor inspect library panel model to show the model that was fetched from the api

* nit: improve comment

* fix library panel import path

---------

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2024-03-05 10:51:22 +01:00
Oscar Kilhed
19743a7fef
Dashboard scenes: Change library panel to set dashboard key to panel instead of library panel. (#83420)
* 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
2024-02-27 17:56:29 +01: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
Oscar Kilhed
b56f6ed0dc
Dashboard scenes: Fixes inspect library panels (#82879)
* working except for links

* Make sure the links are present on the library panels

* add tests, add empty links before panel is loaded, refactor legacy representation

* Update

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-02-19 15:25:45 +01:00
Haris Rozajac
00aa876e46
Dashboard Scene: All panel menu items available (#81678)
* WIP: removing panel functionality

* wip

* Deleting works with old model and with unified alerting

* Add shortcut for removing panel

* Add duplicate panel functionality; improve remove panel logic

* Copy and new alert rule

* Hide legend

* WIP: Help wizard

* Fix PanelMenuBehavior tests

* Got help wizard to work in scenes

* Fix HelpWizard and SupportSnapshotService tests

* Use object for writing styles

* betterer

* Fix create lib panel

* PanelRepeaterItem should be duplicated

* Share randomizer from dashboard-scenes

* share randomizer

* Fix import

* Update error message

* Fix test

* When duplicating PanelRepeaterGridItem's child use  PanelRepeaterGridItem.state.source

* Don't use getResultsStream

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-02-07 06:32:08 -07:00
Dominik Prokop
f20053e4b6
DashboardScene: Allow editing panel links (#81560)
* Panel links supplier for VizPanel

* Update panel links behavior

* Allow editing panel links

* Update so that single link is rendered without a dropdown

* Serialise links in scene -> save model transformation

* Betterer fix

* Fix inspect json tab test
2024-01-31 13:30:27 +02: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
Ashley Harrison
b374912937
Drawer: Make content scroll by default (#75287)
* deprecate scrollableContent prop and make it the default behaviour

* restore prop behaviour, just make it default to true

* Update packages/grafana-ui/src/components/Drawer/Drawer.tsx

Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>

---------

Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
2023-09-27 13:31:57 +01: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
401ec3c4b0
DashboardScene: Meta data tab (#74810)
* DashboardScene: Inspect meta tab

* DashboardScene: Inspect meta tab

* fix casing

* Added meta data inspector to testdata data source
2023-09-18 09:00:59 +02:00
Torkel Ödegaard
05f01dee0c
DashboardScene: Inspect / query tab (#74795) 2023-09-14 12:45:13 +02:00
Torkel Ödegaard
5e9f252962
DashboardScene: Inspect / Json tab (#74701)
* DashboardScene: Inspect / Json tab

* Fixing behaviors and writing tests

* Progress

* limit options based on data provider

* Fixes

* Add tracking

* Remove unused function

* Remove unused function

* Fix test

* Update

* Move utils function

* Rename to source
2023-09-14 12:17:04 +02:00
Torkel Ödegaard
73a675af02
DashboardScene: Inspect panel data tab (#74646)
* Refactor data tab to be usable from scenes

* DashboardScene: Inspect data tab

* Everything seem to work now

* don't change drawer size in this PR

* Remove uncommented code

* Fix layout issues for data actions

* Added comment explaining retry
2023-09-11 16:11:22 +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
Torkel Ödegaard
412e545503
DashboardScene: Support for discard, start at transform back to save model and save drawer (#73873)
* SceneDashboard: Discard changes now works

* To save model works and start at save drawer

* Update

* Added missing file

* Refactorings to keep responsibility more logical

* Refactorings

* Removed file

* Fixed state issue

* Update

* Update
2023-08-29 14:17:55 +02:00
Torkel Ödegaard
eab6250142
DashboardScene: Move to new folder structure, some refactorings and progress on inspect (#73810)
* Progress refactoring

* Update

* Update

* Update

* DashboardScene: Folder struct propsal

* Rename loading to persistance

* Moving and renaming
2023-08-25 14:11:47 +02:00