Commit 083cc0bb by corpglory-dev

Aftermerge fixes

parent 250ee229
...@@ -16,8 +16,8 @@ const labelWidth = 8; ...@@ -16,8 +16,8 @@ const labelWidth = 8;
const piechartOptions = [{ value: PiechartType.PIE, label: 'Pie' }, { value: PiechartType.DONUT, label: 'Donut' }]; const piechartOptions = [{ value: PiechartType.PIE, label: 'Pie' }, { value: PiechartType.DONUT, label: 'Donut' }];
export class PiechartOptionsBox extends PureComponent<PanelEditorProps<PiechartOptions>> { export class PiechartOptionsBox extends PureComponent<PanelEditorProps<PiechartOptions>> {
onPieTypeChange = ({ target }) => this.props.onChange({ ...this.props.options, pieType: target.value }); onPieTypeChange = ({ target }) => this.props.onOptionsChange({ ...this.props.options, pieType: target.value });
onStrokeWidthChange = ({ target }) => this.props.onChange({ ...this.props.options, strokeWidth: target.value }); onStrokeWidthChange = ({ target }) => this.props.onOptionsChange({ ...this.props.options, strokeWidth: target.value });
render() { render() {
const { options } = this.props; const { options } = this.props;
......
...@@ -7,19 +7,19 @@ import { PiechartOptions, PiechartValueOptions } from './types'; ...@@ -7,19 +7,19 @@ import { PiechartOptions, PiechartValueOptions } from './types';
export default class PiechartPanelEditor extends PureComponent<PanelEditorProps<PiechartOptions>> { export default class PiechartPanelEditor extends PureComponent<PanelEditorProps<PiechartOptions>> {
onValueOptionsChanged = (valueOptions: PiechartValueOptions) => onValueOptionsChanged = (valueOptions: PiechartValueOptions) =>
this.props.onChange({ this.props.onOptionsChange({
...this.props.options, ...this.props.options,
valueOptions, valueOptions,
}); });
render() { render() {
const { onChange, options } = this.props; const { onOptionsChange, options } = this.props;
return ( return (
<> <>
<PanelOptionsGrid> <PanelOptionsGrid>
<PiechartValueEditor onChange={this.onValueOptionsChanged} options={options.valueOptions} /> <PiechartValueEditor onChange={this.onValueOptionsChanged} options={options.valueOptions} />
<PiechartOptionsBox onChange={onChange} options={options} /> <PiechartOptionsBox onOptionsChange={onOptionsChange} options={options} />
</PanelOptionsGrid> </PanelOptionsGrid>
</> </>
); );
......
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { FormLabel, PanelOptionsGroup, Select } from '@grafana/ui'; import { FormLabel, PanelOptionsGroup, Select, UnitPicker } from '@grafana/ui';
import UnitPicker from 'app/core/components/Select/UnitPicker';
import { PiechartValueOptions } from './types'; import { PiechartValueOptions } from './types';
const statOptions = [ const statOptions = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment