From 58f04178a36f5dc839ef087a765efaef2fed7f15 Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Thu, 7 Feb 2019 09:20:17 +0100 Subject: [PATCH] removed direction and series mode options, cleaned up the code somewhat --- .../panel/gauge/GaugeOptionsEditor.tsx | 32 ++------------ public/app/plugins/panel/gauge/GaugePanel.tsx | 44 ++++++------------- .../plugins/panel/gauge/GaugePanelOptions.tsx | 2 - public/app/plugins/panel/gauge/types.ts | 2 - 4 files changed, 16 insertions(+), 64 deletions(-) diff --git a/public/app/plugins/panel/gauge/GaugeOptionsEditor.tsx b/public/app/plugins/panel/gauge/GaugeOptionsEditor.tsx index 418cb06388c..5294b9e62bc 100644 --- a/public/app/plugins/panel/gauge/GaugeOptionsEditor.tsx +++ b/public/app/plugins/panel/gauge/GaugeOptionsEditor.tsx @@ -1,24 +1,10 @@ import React, { PureComponent } from 'react'; -import { - FormField, - FormLabel, - PanelOptionsProps, - PanelOptionsGroup, - Select, - SelectOptionItem, - Switch, -} from '@grafana/ui'; +import { FormField, PanelOptionsProps, PanelOptionsGroup, Switch } from '@grafana/ui'; import { GaugeOptions } from './types'; export default class GaugeOptionsEditor extends PureComponent> { - directionOptions: SelectOptionItem[] = [ - { value: 'auto', label: 'Auto' }, - { value: 'horizontal', label: 'Horizontal' }, - { value: 'vertical', label: 'Vertical' }, - ]; - - labelWidth = 9; + labelWidth = 8; onToggleThresholdLabels = () => this.props.onChange({ ...this.props.options, showThresholdLabels: !this.props.options.showThresholdLabels }); @@ -30,11 +16,9 @@ export default class GaugeOptionsEditor extends PureComponent this.props.onChange({ ...this.props.options, maxValue: target.value }); - onDirectionChange = ({ value }) => this.props.onChange({ ...this.props.options, direction: value }); - render() { const { options } = this.props; - const { direction, maxValue, minValue, showThresholdLabels, showThresholdMarkers } = options; + const { maxValue, minValue, showThresholdLabels, showThresholdMarkers } = options; return ( @@ -52,16 +36,6 @@ export default class GaugeOptionsEditor extends PureComponent -
- Direction -