mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Aftermerge fixes
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user