Schema: Add schema for library panels (#62169)

This commit is contained in:
Ryan McKinley
2023-01-29 20:14:12 -08:00
committed by GitHub
parent 13159d03ba
commit 0d2a786816
32 changed files with 724 additions and 303 deletions

View File

@@ -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,

View File

@@ -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 });
}