mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
17 lines
605 B
TypeScript
17 lines
605 B
TypeScript
import { AnnoListPanel } from './AnnoListPanel';
|
|
import { AnnoOptions, defaults } from './types';
|
|
import { AnnoListEditor } from './AnnoListEditor';
|
|
import { PanelPlugin } from '@grafana/ui';
|
|
|
|
export const plugin = new PanelPlugin<AnnoOptions>(AnnoListPanel)
|
|
.setDefaults(defaults)
|
|
.setEditor(AnnoListEditor)
|
|
|
|
// TODO, we should support this directly in the plugin infrastructure
|
|
.setPanelChangeHandler((options: AnnoOptions, prevPluginId: string, prevOptions: any) => {
|
|
if (prevPluginId === 'ryantxu-annolist-panel') {
|
|
return prevOptions as AnnoOptions;
|
|
}
|
|
return options;
|
|
});
|