mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Schema: Add schema for library panels (#62169)
This commit is contained in:
@@ -113,7 +113,7 @@ export const AddPanelWidgetUnconnected = ({ panel, dashboard }: Props) => {
|
||||
const onAddLibraryPanel = (panelInfo: LibraryElementDTO) => {
|
||||
const { gridPos } = panel;
|
||||
|
||||
const newPanel: PanelModel = {
|
||||
const newPanel = {
|
||||
...panelInfo.model,
|
||||
gridPos,
|
||||
libraryPanel: panelInfo,
|
||||
|
||||
@@ -177,7 +177,7 @@ export class DashboardExporter {
|
||||
model = libPanel.model;
|
||||
}
|
||||
|
||||
const { gridPos, id, ...rest } = model;
|
||||
const { gridPos, id, ...rest } = model as any;
|
||||
if (!libraryPanels.has(uid)) {
|
||||
libraryPanels.set(uid, { name, uid, kind: LibraryElementKind.Panel, model: rest });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user