mirror of
https://github.com/grafana/grafana.git
synced 2025-01-15 19:22:34 -06:00
Moved Thresholds and styles to grafana/ui/components
This commit is contained in:
parent
dc9b83030f
commit
1581662a6c
@ -1,10 +1,10 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { shallow } from 'enzyme';
|
import { shallow } from 'enzyme';
|
||||||
import Thresholds from './Thresholds';
|
|
||||||
import { defaultProps } from './GaugePanelOptions';
|
|
||||||
import { BasicGaugeColor } from 'app/types';
|
|
||||||
import { PanelOptionsProps } from '@grafana/ui';
|
import { PanelOptionsProps } from '@grafana/ui';
|
||||||
import { Options } from './types';
|
import { defaultProps } from 'app/plugins/panel/gauge/GaugePanelOptions';
|
||||||
|
import { Options } from 'app/plugins/panel/gauge/types';
|
||||||
|
import { BasicGaugeColor } from 'app/types';
|
||||||
|
import { Thresholds } from './Thresholds';
|
||||||
|
|
||||||
const setup = (propOverrides?: object) => {
|
const setup = (propOverrides?: object) => {
|
||||||
const props: PanelOptionsProps<Options> = {
|
const props: PanelOptionsProps<Options> = {
|
@ -1,16 +1,16 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
import tinycolor from 'tinycolor2';
|
import tinycolor from 'tinycolor2';
|
||||||
import { ColorPicker } from '@grafana/ui';
|
import { ColorPicker } from '@grafana/ui';
|
||||||
import { BasicGaugeColor, Threshold } from 'app/types';
|
import { BasicGaugeColor } from 'app/types';
|
||||||
import { PanelOptionsProps } from '@grafana/ui';
|
import { PanelOptionsProps, Threshold } from '@grafana/ui';
|
||||||
import { Options } from './types';
|
import { Options } from 'app/plugins/panel/gauge/types';
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
thresholds: Threshold[];
|
thresholds: Threshold[];
|
||||||
baseColor: string;
|
baseColor: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Thresholds extends PureComponent<PanelOptionsProps<Options>, State> {
|
export class Thresholds extends PureComponent<PanelOptionsProps<Options>, State> {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -1,3 +1,4 @@
|
|||||||
@import 'CustomScrollbar/CustomScrollbar';
|
@import 'CustomScrollbar/CustomScrollbar';
|
||||||
@import 'DeleteButton/DeleteButton';
|
@import 'DeleteButton/DeleteButton';
|
||||||
|
@import 'Thresholds/Thresholds';
|
||||||
@import 'Tooltip/Tooltip';
|
@import 'Tooltip/Tooltip';
|
||||||
|
@ -5,3 +5,4 @@ export { CustomScrollbar } from './CustomScrollbar/CustomScrollbar';
|
|||||||
export { ColorPicker } from './ColorPicker/ColorPicker';
|
export { ColorPicker } from './ColorPicker/ColorPicker';
|
||||||
export { SeriesColorPickerPopover } from './ColorPicker/SeriesColorPickerPopover';
|
export { SeriesColorPickerPopover } from './ColorPicker/SeriesColorPickerPopover';
|
||||||
export { SeriesColorPicker } from './ColorPicker/SeriesColorPicker';
|
export { SeriesColorPicker } from './ColorPicker/SeriesColorPicker';
|
||||||
|
export { Thresholds } from './Thresholds/Thresholds';
|
||||||
|
@ -29,3 +29,9 @@ export interface PanelMenuItem {
|
|||||||
shortcut?: string;
|
shortcut?: string;
|
||||||
subMenu?: PanelMenuItem[];
|
subMenu?: PanelMenuItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Threshold {
|
||||||
|
index: number;
|
||||||
|
value: number;
|
||||||
|
color?: string;
|
||||||
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
import ValueOptions from 'app/plugins/panel/gauge/ValueOptions';
|
import ValueOptions from 'app/plugins/panel/gauge/ValueOptions';
|
||||||
import Thresholds from 'app/plugins/panel/gauge/Thresholds';
|
|
||||||
import { BasicGaugeColor } from 'app/types';
|
import { BasicGaugeColor } from 'app/types';
|
||||||
import { PanelOptionsProps } from '@grafana/ui';
|
import { PanelOptionsProps, Thresholds } from '@grafana/ui';
|
||||||
import ValueMappings from 'app/plugins/panel/gauge/ValueMappings';
|
import ValueMappings from 'app/plugins/panel/gauge/ValueMappings';
|
||||||
import { Options } from './types';
|
import { Options } from './types';
|
||||||
import GaugeOptions from './GaugeOptions';
|
import GaugeOptions from './GaugeOptions';
|
||||||
|
@ -9,7 +9,7 @@ import { ApiKey, ApiKeysState, NewApiKey } from './apiKeys';
|
|||||||
import { Invitee, OrgUser, User, UsersState, UserState } from './user';
|
import { Invitee, OrgUser, User, UsersState, UserState } from './user';
|
||||||
import { DataSource, DataSourceSelectItem, DataSourcesState } from './datasources';
|
import { DataSource, DataSourceSelectItem, DataSourcesState } from './datasources';
|
||||||
import { DataQuery, DataQueryResponse, DataQueryOptions } from './series';
|
import { DataQuery, DataQueryResponse, DataQueryOptions } from './series';
|
||||||
import { BasicGaugeColor, MappingType, RangeMap, Threshold, ValueMap } from './panel';
|
import { BasicGaugeColor, MappingType, RangeMap, ValueMap } from './panel';
|
||||||
import { PluginDashboard, PluginMeta, Plugin, PanelPlugin, PluginsState } from './plugins';
|
import { PluginDashboard, PluginMeta, Plugin, PanelPlugin, PluginsState } from './plugins';
|
||||||
import { Organization, OrganizationState } from './organization';
|
import { Organization, OrganizationState } from './organization';
|
||||||
import {
|
import {
|
||||||
@ -20,6 +20,7 @@ import {
|
|||||||
} from './appNotifications';
|
} from './appNotifications';
|
||||||
import { DashboardSearchHit } from './search';
|
import { DashboardSearchHit } from './search';
|
||||||
import { ValidationEvents, ValidationRule } from './form';
|
import { ValidationEvents, ValidationRule } from './form';
|
||||||
|
import { Threshold } from '@grafana/ui';
|
||||||
export {
|
export {
|
||||||
Team,
|
Team,
|
||||||
TeamsState,
|
TeamsState,
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
export interface Threshold {
|
|
||||||
index: number;
|
|
||||||
value: number;
|
|
||||||
color?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum MappingType {
|
export enum MappingType {
|
||||||
ValueToText = 1,
|
ValueToText = 1,
|
||||||
RangeToText = 2,
|
RangeToText = 2,
|
||||||
|
@ -102,7 +102,6 @@
|
|||||||
@import 'components/toolbar';
|
@import 'components/toolbar';
|
||||||
@import 'components/add_data_source.scss';
|
@import 'components/add_data_source.scss';
|
||||||
@import 'components/page_loader';
|
@import 'components/page_loader';
|
||||||
@import 'components/thresholds';
|
|
||||||
@import 'components/toggle_button_group';
|
@import 'components/toggle_button_group';
|
||||||
@import 'components/value-mappings';
|
@import 'components/value-mappings';
|
||||||
@import 'components/popover-box';
|
@import 'components/popover-box';
|
||||||
|
Loading…
Reference in New Issue
Block a user