Add lib panel from empty dashboard page (#83522)

* wip

* tests + refactor ad panel func

* Add row functionality

* update row state only when there are children

* Add new row + copy paste panels

* Add library panel functionality

* tests

* PR mods

* reafctor + tests

* reafctor

* fix test

* refactor

* fix bug on cancelling lib widget

* dashboard now saves with lib panel widget

* add lib panels widget works in rows as well

* split add lib panel func to another PR

* Add library panel functionality

* Add lib panel from empty dashboard page

* refactor

* take panelKey into account when getting next panel id in dashboard

* fix tests
This commit is contained in:
Victor Marin 2024-02-28 16:41:56 +02:00 committed by GitHub
parent 04539ffccb
commit 58d6ce1c87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,7 +113,7 @@ const DashboardEmpty = ({ dashboard, canCreate }: Props) => {
onClick={() => {
DashboardInteractions.emptyDashboardButtonClicked({ item: 'import_from_library' });
if (dashboard instanceof DashboardScene) {
// TODO: dashboard scene logic for adding a library panel
dashboard.onCreateLibPanelWidget();
} else {
onAddLibraryPanel(dashboard);
}