mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Panels: Support angular -> react migration via PanelMigrationHandler
This commit is contained in:
@@ -21,10 +21,16 @@ export interface PanelEditorProps<T = any> {
|
||||
onOptionsChange: (options: T) => void;
|
||||
}
|
||||
|
||||
export interface PanelModel<TOptions = any> {
|
||||
id: number;
|
||||
options: TOptions;
|
||||
pluginVersion?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a panel is first loaded with existing options
|
||||
* Called when a panel is first loaded with current panel model
|
||||
*/
|
||||
export type PanelMigrationHandler<TOptions = any> = (exiting: any, oldVersion?: string) => Partial<TOptions>;
|
||||
export type PanelMigrationHandler<TOptions = any> = (panel: PanelModel<TOptions>) => Partial<TOptions>;
|
||||
|
||||
/**
|
||||
* Called before a panel is initalized
|
||||
|
||||
Reference in New Issue
Block a user