Files
grafana/public/app/plugins/panel/text2/module.tsx

16 lines
506 B
TypeScript
Raw Normal View History

import { PanelPlugin } from '@grafana/ui';
2018-01-02 14:52:30 +01:00
2019-02-23 21:53:20 -08:00
import { TextPanelEditor } from './TextPanelEditor';
import { TextPanel } from './TextPanel';
import { TextOptions, defaults } from './types';
2018-01-02 14:52:30 +01:00
export const plugin = new PanelPlugin<TextOptions>(TextPanel)
.setDefaults(defaults)
.setEditor(TextPanelEditor)
.setPanelChangeHandler((options: TextOptions, prevPluginId: string, prevOptions: any) => {
if (prevPluginId === 'text') {
return prevOptions as TextOptions;
}
return options;
});