mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Moved defaultProps to ui/components
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import { BasicGaugeColor, GaugeOptions, PanelOptionsProps } from '@grafana/ui';
|
||||
|
||||
import { ThresholdsEditor } from './ThresholdsEditor';
|
||||
import { BasicGaugeColor, PanelOptionsProps, GaugeOptions } from '../../types';
|
||||
|
||||
const defaultProps = {
|
||||
options: {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import tinycolor, { ColorInput } from 'tinycolor2';
|
||||
import { BasicGaugeColor, ColorPicker, GaugeOptions, PanelOptionsProps, Threshold } from '@grafana/ui';
|
||||
|
||||
import { Threshold, PanelOptionsProps, GaugeOptions, BasicGaugeColor } from '../../types';
|
||||
import { ColorPicker } from '../ColorPicker/ColorPicker';
|
||||
|
||||
interface State {
|
||||
thresholds: Threshold[];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RangeMap, Threshold, ValueMap } from '@grafana/ui';
|
||||
import { BasicGaugeColor, RangeMap, Threshold, ValueMap } from './panel';
|
||||
|
||||
export interface GaugeOptions {
|
||||
baseColor: string;
|
||||
@@ -14,3 +14,20 @@ export interface GaugeOptions {
|
||||
thresholds: Threshold[];
|
||||
unit: string;
|
||||
}
|
||||
|
||||
export const GaugePanelOptionsDefaultProps = {
|
||||
options: {
|
||||
baseColor: BasicGaugeColor.Green,
|
||||
minValue: 0,
|
||||
maxValue: 100,
|
||||
prefix: '',
|
||||
showThresholdMarkers: true,
|
||||
showThresholdLabels: false,
|
||||
suffix: '',
|
||||
decimals: 0,
|
||||
stat: 'avg',
|
||||
unit: 'none',
|
||||
mappings: [],
|
||||
thresholds: [],
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user