D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
usr
/
share
/
grafana
/
public
/
app
/
plugins
/
panel
/
canvas
/
Filename :
migrations.ts
back
Copy
import { PanelModel } from '@grafana/data'; import { Options } from './panelcfg.gen'; export const canvasMigrationHandler = (panel: PanelModel): Partial<Options> => { const pluginVersion = panel?.pluginVersion ?? ''; // Rename text-box to rectangle // Initial plugin version is empty string for first migration if (pluginVersion === '') { const root = panel.options?.root; if (root?.elements) { for (const element of root.elements) { if (element.type === 'text-box') { element.type = 'rectangle'; } } } } return panel.options; };