mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
parent
04539ffccb
commit
58d6ce1c87
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user