The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grafana/public/app/plugins/panel/text2/module.tsx

18 lines
541 B

7 years ago
import { ReactPanelPlugin } from '@grafana/ui';
7 years ago
import { TextPanelEditor } from './TextPanelEditor';
import { TextPanel } from './TextPanel';
import { TextOptions, defaults } from './types';
7 years ago
export const reactPanel = new ReactPanelPlugin<TextOptions>(TextPanel);
7 years ago
reactPanel.setEditor(TextPanelEditor);
reactPanel.setDefaults(defaults);
7 years ago
reactPanel.setPanelTypeChangedHook((options: TextOptions, prevPluginId: string, prevOptions: any) => {
if (prevPluginId === 'text') {
return prevOptions as TextOptions;
}
return options;
});