DataSourceList: Build a dashboard button to open new dashboard in panel edit with data source already set (#60532)

* New dashboard with preset data source

* Updates

* use replace instead

* Tests: fix failing tests

* Chore: add UID to the error message

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
This commit is contained in:
Torkel Ödegaard
2023-01-06 15:21:40 +01:00
committed by GitHub
parent e2ed42c2a3
commit f71bfd88c5
6 changed files with 71 additions and 13 deletions

View File

@@ -75,6 +75,7 @@ export const AddPanelWidgetUnconnected = ({ panel, dashboard }: Props) => {
const newPanel: Partial<PanelModel> = {
type: 'timeseries',
title: 'Panel Title',
datasource: panel.datasource,
gridPos: { x: gridPos.x, y: gridPos.y, w: gridPos.w, h: gridPos.h },
};