mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixes after merging #15468
This commit is contained in:
parent
a053fb5908
commit
0633dba302
@ -1,19 +1,10 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { PanelOptionsProps, PanelOptionsGrid } from '@grafana/ui';
|
||||
import { PanelEditorProps, PanelOptionsGrid } from '@grafana/ui';
|
||||
|
||||
import ValueOptions from './ValueOptions';
|
||||
import { PiechartOptions } from './types';
|
||||
|
||||
export const defaultProps = {
|
||||
options: {
|
||||
pieType: 'pie',
|
||||
unit: 'short',
|
||||
stat: 'current',
|
||||
strokeWidth: 1,
|
||||
},
|
||||
};
|
||||
|
||||
export default class PiechartPanelOptions extends PureComponent<PanelOptionsProps<PiechartOptions>> {
|
||||
export default class PiechartPanelOptions extends PureComponent<PanelEditorProps<PiechartOptions>> {
|
||||
static defaultProps = defaultProps;
|
||||
|
||||
render() {
|
@ -1,4 +1,10 @@
|
||||
import PiechartPanelOptions, { defaultProps } from './PiechartPanelOptions';
|
||||
import { PiechartPanel } from './PiechartPanel';
|
||||
import { ReactPanelPlugin } from '@grafana/ui';
|
||||
|
||||
export { PiechartPanel as Panel, PiechartPanelOptions as PanelOptions, defaultProps as PanelDefaults };
|
||||
import PiechartPanelEditor from './PiechartPanelEditor';
|
||||
import { PiechartPanel } from './PiechartPanel';
|
||||
import { PiechartOptions, defaults } from './types';
|
||||
|
||||
export const reactPanel = new ReactPanelPlugin<PiechartOptions>(PiechartPanel);
|
||||
|
||||
reactPanel.setEditor(PiechartPanelEditor);
|
||||
reactPanel.setDefaults(defaults);
|
||||
|
@ -5,3 +5,10 @@ export interface PiechartOptions {
|
||||
strokeWidth: number;
|
||||
// TODO: Options for Legend / Combine components
|
||||
}
|
||||
|
||||
export const defaults: PiechartOptions = {
|
||||
pieType: 'pie',
|
||||
unit: 'short',
|
||||
stat: 'current',
|
||||
strokeWidth: 1,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user