Aftermerge fixes

pull/15511/head
corpglory-dev 6 years ago
parent 250ee2298a
commit 083cc0bbca
  1. 4
      public/app/plugins/panel/piechart/PiechartOptionsBox.tsx
  2. 6
      public/app/plugins/panel/piechart/PiechartPanelEditor.tsx
  3. 3
      public/app/plugins/panel/piechart/PiechartValueEditor.tsx

@ -16,8 +16,8 @@ const labelWidth = 8;
const piechartOptions = [{ value: PiechartType.PIE, label: 'Pie' }, { value: PiechartType.DONUT, label: 'Donut' }];
export class PiechartOptionsBox extends PureComponent<PanelEditorProps<PiechartOptions>> {
onPieTypeChange = ({ target }) => this.props.onChange({ ...this.props.options, pieType: target.value });
onStrokeWidthChange = ({ target }) => this.props.onChange({ ...this.props.options, strokeWidth: target.value });
onPieTypeChange = ({ target }) => this.props.onOptionsChange({ ...this.props.options, pieType: target.value });
onStrokeWidthChange = ({ target }) => this.props.onOptionsChange({ ...this.props.options, strokeWidth: target.value });
render() {
const { options } = this.props;

@ -7,19 +7,19 @@ import { PiechartOptions, PiechartValueOptions } from './types';
export default class PiechartPanelEditor extends PureComponent<PanelEditorProps<PiechartOptions>> {
onValueOptionsChanged = (valueOptions: PiechartValueOptions) =>
this.props.onChange({
this.props.onOptionsChange({
...this.props.options,
valueOptions,
});
render() {
const { onChange, options } = this.props;
const { onOptionsChange, options } = this.props;
return (
<>
<PanelOptionsGrid>
<PiechartValueEditor onChange={this.onValueOptionsChanged} options={options.valueOptions} />
<PiechartOptionsBox onChange={onChange} options={options} />
<PiechartOptionsBox onOptionsChange={onOptionsChange} options={options} />
</PanelOptionsGrid>
</>
);

@ -1,6 +1,5 @@
import React, { PureComponent } from 'react';
import { FormLabel, PanelOptionsGroup, Select } from '@grafana/ui';
import UnitPicker from 'app/core/components/Select/UnitPicker';
import { FormLabel, PanelOptionsGroup, Select, UnitPicker } from '@grafana/ui';
import { PiechartValueOptions } from './types';
const statOptions = [

Loading…
Cancel
Save