Add error handling to shared components
parent
8b29d1873c
commit
ce4d482634
|
@ -1,7 +1,9 @@
|
||||||
import React, {Component} from 'react'
|
import React, {Component} from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import onClickOutside from 'react-onclickoutside'
|
import onClickOutside from 'react-onclickoutside'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class AnnotationInput extends Component {
|
class AnnotationInput extends Component {
|
||||||
state = {
|
state = {
|
||||||
isEditing: false,
|
isEditing: false,
|
||||||
|
|
|
@ -11,7 +11,9 @@ import {ANNOTATION_MIN_DELTA, EDITING} from 'shared/annotations/helpers'
|
||||||
import * as schema from 'shared/schemas'
|
import * as schema from 'shared/schemas'
|
||||||
import * as actions from 'shared/actions/annotations'
|
import * as actions from 'shared/actions/annotations'
|
||||||
import AnnotationTooltip from 'shared/components/AnnotationTooltip'
|
import AnnotationTooltip from 'shared/components/AnnotationTooltip'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class AnnotationPoint extends React.Component {
|
class AnnotationPoint extends React.Component {
|
||||||
state = {
|
state = {
|
||||||
isMouseOver: false,
|
isMouseOver: false,
|
||||||
|
|
|
@ -12,7 +12,9 @@ import * as schema from 'shared/schemas'
|
||||||
import * as actions from 'shared/actions/annotations'
|
import * as actions from 'shared/actions/annotations'
|
||||||
import AnnotationTooltip from 'shared/components/AnnotationTooltip'
|
import AnnotationTooltip from 'shared/components/AnnotationTooltip'
|
||||||
import AnnotationWindow from 'shared/components/AnnotationWindow'
|
import AnnotationWindow from 'shared/components/AnnotationWindow'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class AnnotationSpan extends React.Component {
|
class AnnotationSpan extends React.Component {
|
||||||
state = {
|
state = {
|
||||||
isDragging: null,
|
isDragging: null,
|
||||||
|
|
|
@ -7,6 +7,7 @@ import classnames from 'classnames'
|
||||||
import AnnotationInput from 'src/shared/components/AnnotationInput'
|
import AnnotationInput from 'src/shared/components/AnnotationInput'
|
||||||
import * as schema from 'shared/schemas'
|
import * as schema from 'shared/schemas'
|
||||||
import * as actions from 'shared/actions/annotations'
|
import * as actions from 'shared/actions/annotations'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
const TimeStamp = ({time}) => (
|
const TimeStamp = ({time}) => (
|
||||||
<div className="annotation-tooltip--timestamp">
|
<div className="annotation-tooltip--timestamp">
|
||||||
|
@ -14,6 +15,7 @@ const TimeStamp = ({time}) => (
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class AnnotationTooltip extends Component {
|
class AnnotationTooltip extends Component {
|
||||||
state = {
|
state = {
|
||||||
annotation: this.props.annotation,
|
annotation: this.props.annotation,
|
||||||
|
|
|
@ -17,7 +17,9 @@ import {
|
||||||
mouseLeaveTempAnnotation,
|
mouseLeaveTempAnnotation,
|
||||||
} from 'src/shared/actions/annotations'
|
} from 'src/shared/actions/annotations'
|
||||||
import {visibleAnnotations} from 'src/shared/annotations/helpers'
|
import {visibleAnnotations} from 'src/shared/annotations/helpers'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class Annotations extends Component {
|
class Annotations extends Component {
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -4,7 +4,9 @@ import classnames from 'classnames'
|
||||||
import OnClickOutside from 'shared/components/OnClickOutside'
|
import OnClickOutside from 'shared/components/OnClickOutside'
|
||||||
|
|
||||||
import autoRefreshItems from 'shared/data/autoRefreshes'
|
import autoRefreshItems from 'shared/data/autoRefreshes'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class AutoRefreshDropdown extends Component {
|
class AutoRefreshDropdown extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import React, {PureComponent, ReactElement} from 'react'
|
import React, {PureComponent, ReactElement} from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children: ReactElement<any>
|
children: ReactElement<any>
|
||||||
onClickOutside: () => void
|
onClickOutside: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
export class ClickOutside extends PureComponent<Props> {
|
export class ClickOutside extends PureComponent<Props> {
|
||||||
public componentDidMount() {
|
public componentDidMount() {
|
||||||
document.addEventListener('click', this.handleClickOutside, true)
|
document.addEventListener('click', this.handleClickOutside, true)
|
||||||
|
|
|
@ -2,7 +2,9 @@ import React, {Component} from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
import onClickOutside from 'shared/components/OnClickOutside'
|
import onClickOutside from 'shared/components/OnClickOutside'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class ClickOutsideInput extends Component {
|
class ClickOutsideInput extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -4,7 +4,9 @@ import PropTypes from 'prop-types'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import OnClickOutside from 'shared/components/OnClickOutside'
|
import OnClickOutside from 'shared/components/OnClickOutside'
|
||||||
import FancyScrollbar from 'shared/components/FancyScrollbar'
|
import FancyScrollbar from 'shared/components/FancyScrollbar'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class ColorDropdown extends Component {
|
class ColorDropdown extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -7,7 +7,9 @@ import OnClickOutside from 'shared/components/OnClickOutside'
|
||||||
import FancyScrollbar from 'shared/components/FancyScrollbar'
|
import FancyScrollbar from 'shared/components/FancyScrollbar'
|
||||||
|
|
||||||
import {LINE_COLOR_SCALES} from 'src/shared/constants/graphColorPalettes'
|
import {LINE_COLOR_SCALES} from 'src/shared/constants/graphColorPalettes'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class ColorScaleDropdown extends Component {
|
class ColorScaleDropdown extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React, {PureComponent} from 'react'
|
import React, {PureComponent} from 'react'
|
||||||
import {ClickOutside} from 'src/shared/components/ClickOutside'
|
import {ClickOutside} from 'src/shared/components/ClickOutside'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
text?: string
|
text?: string
|
||||||
|
@ -17,6 +18,7 @@ interface State {
|
||||||
expanded: boolean
|
expanded: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class ConfirmButton extends PureComponent<Props, State> {
|
class ConfirmButton extends PureComponent<Props, State> {
|
||||||
public static defaultProps: Partial<Props> = {
|
public static defaultProps: Partial<Props> = {
|
||||||
confirmText: 'Confirm',
|
confirmText: 'Confirm',
|
||||||
|
|
|
@ -3,6 +3,7 @@ import React, {PureComponent, SFC} from 'react'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
|
|
||||||
import OnClickOutside from 'src/shared/components/OnClickOutside'
|
import OnClickOutside from 'src/shared/components/OnClickOutside'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
type Item = object | string
|
type Item = object | string
|
||||||
|
|
||||||
|
@ -74,6 +75,7 @@ export const Cancel: SFC<CancelProps> = ({
|
||||||
</button>
|
</button>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class ConfirmOrCancel extends PureComponent<ConfirmOrCancelProps, {}> {
|
class ConfirmOrCancel extends PureComponent<ConfirmOrCancelProps, {}> {
|
||||||
public static defaultProps: Partial<ConfirmOrCancelProps> = {
|
public static defaultProps: Partial<ConfirmOrCancelProps> = {
|
||||||
buttonSize: 'btn-sm',
|
buttonSize: 'btn-sm',
|
||||||
|
|
|
@ -4,7 +4,9 @@ import classnames from 'classnames'
|
||||||
|
|
||||||
import {DYGRAPH_CONTAINER_XLABEL_MARGIN} from 'shared/constants'
|
import {DYGRAPH_CONTAINER_XLABEL_MARGIN} from 'shared/constants'
|
||||||
import {NULL_HOVER_TIME} from 'shared/constants/tableGraph'
|
import {NULL_HOVER_TIME} from 'shared/constants/tableGraph'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class Crosshair extends PureComponent {
|
class Crosshair extends PureComponent {
|
||||||
shouldCompnentUpdate(nextProps) {
|
shouldCompnentUpdate(nextProps) {
|
||||||
return this.props.hoverTime !== nextProps.hoverTime
|
return this.props.hoverTime !== nextProps.hoverTime
|
||||||
|
|
|
@ -4,8 +4,10 @@ import rome from 'rome'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
|
||||||
import shortcuts from 'shared/data/timeRangeShortcuts'
|
import shortcuts from 'shared/data/timeRangeShortcuts'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
const dateFormat = 'YYYY-MM-DD HH:mm'
|
const dateFormat = 'YYYY-MM-DD HH:mm'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class CustomTimeRange extends Component {
|
class CustomTimeRange extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -4,6 +4,7 @@ import classnames from 'classnames'
|
||||||
|
|
||||||
import {ClickOutside} from 'src/shared/components/ClickOutside'
|
import {ClickOutside} from 'src/shared/components/ClickOutside'
|
||||||
import CustomTimeRange from 'src/shared/components/CustomTimeRange'
|
import CustomTimeRange from 'src/shared/components/CustomTimeRange'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
expanded: boolean
|
expanded: boolean
|
||||||
|
@ -17,6 +18,7 @@ interface Props {
|
||||||
onApplyTimeRange: () => void
|
onApplyTimeRange: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class CustomTimeRangeDropdown extends PureComponent<Props, State> {
|
class CustomTimeRangeDropdown extends PureComponent<Props, State> {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -3,7 +3,9 @@ import PropTypes from 'prop-types'
|
||||||
import OnClickOutside from 'react-onclickoutside'
|
import OnClickOutside from 'react-onclickoutside'
|
||||||
|
|
||||||
import CustomTimeRange from 'shared/components/CustomTimeRange'
|
import CustomTimeRange from 'shared/components/CustomTimeRange'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class CustomTimeRangeOverlay extends Component {
|
class CustomTimeRangeOverlay extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -4,8 +4,10 @@ import Dropdown from 'shared/components/Dropdown'
|
||||||
|
|
||||||
import {showDatabases} from 'shared/apis/metaQuery'
|
import {showDatabases} from 'shared/apis/metaQuery'
|
||||||
import parsers from 'shared/parsing'
|
import parsers from 'shared/parsing'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
const {databases: showDatabasesParser} = parsers
|
const {databases: showDatabasesParser} = parsers
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class DatabaseDropdown extends Component {
|
class DatabaseDropdown extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -12,6 +12,7 @@ import showRetentionPoliciesParser from 'src/shared/parsing/showRetentionPolicie
|
||||||
|
|
||||||
import DatabaseListItem from 'src/shared/components/DatabaseListItem'
|
import DatabaseListItem from 'src/shared/components/DatabaseListItem'
|
||||||
import FancyScrollbar from 'src/shared/components/FancyScrollbar'
|
import FancyScrollbar from 'src/shared/components/FancyScrollbar'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface DatabaseListProps {
|
interface DatabaseListProps {
|
||||||
query: Query
|
query: Query
|
||||||
|
@ -26,6 +27,7 @@ interface DatabaseListState {
|
||||||
|
|
||||||
const {shape} = PropTypes
|
const {shape} = PropTypes
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class DatabaseList extends PureComponent<DatabaseListProps, DatabaseListState> {
|
class DatabaseList extends PureComponent<DatabaseListProps, DatabaseListState> {
|
||||||
public static contextTypes = {
|
public static contextTypes = {
|
||||||
source: shape({
|
source: shape({
|
||||||
|
|
|
@ -5,7 +5,9 @@ import OnClickOutside from 'shared/components/OnClickOutside'
|
||||||
import DropdownMenu, {DropdownMenuEmpty} from 'shared/components/DropdownMenu'
|
import DropdownMenu, {DropdownMenuEmpty} from 'shared/components/DropdownMenu'
|
||||||
import DropdownInput from 'shared/components/DropdownInput'
|
import DropdownInput from 'shared/components/DropdownInput'
|
||||||
import DropdownHead from 'shared/components/DropdownHead'
|
import DropdownHead from 'shared/components/DropdownHead'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
export class Dropdown extends Component {
|
export class Dropdown extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -24,12 +24,14 @@ import {
|
||||||
CHAR_PIXELS,
|
CHAR_PIXELS,
|
||||||
barPlotter,
|
barPlotter,
|
||||||
} from 'src/shared/graphs/helpers'
|
} from 'src/shared/graphs/helpers'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
import {getLineColorsHexes} from 'src/shared/constants/graphColorPalettes'
|
import {getLineColorsHexes} from 'src/shared/constants/graphColorPalettes'
|
||||||
const {LINEAR, LOG, BASE_10, BASE_2} = AXES_SCALE_OPTIONS
|
const {LINEAR, LOG, BASE_10, BASE_2} = AXES_SCALE_OPTIONS
|
||||||
|
|
||||||
import {colorsStringSchema} from 'shared/schemas'
|
import {colorsStringSchema} from 'shared/schemas'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class Dygraph extends Component {
|
class Dygraph extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -5,7 +5,9 @@ import classnames from 'classnames'
|
||||||
import uuid from 'uuid'
|
import uuid from 'uuid'
|
||||||
|
|
||||||
import {makeLegendStyles, removeMeasurement} from 'shared/graphs/helpers'
|
import {makeLegendStyles, removeMeasurement} from 'shared/graphs/helpers'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class DygraphLegend extends Component {
|
class DygraphLegend extends Component {
|
||||||
state = {
|
state = {
|
||||||
legend: {
|
legend: {
|
||||||
|
|
|
@ -2,7 +2,9 @@ import React, {Component} from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import {Scrollbars} from 'react-custom-scrollbars'
|
import {Scrollbars} from 'react-custom-scrollbars'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class FancyScrollbar extends Component {
|
class FancyScrollbar extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -14,7 +14,9 @@ import {
|
||||||
getFieldsWithName,
|
getFieldsWithName,
|
||||||
getFuncsByFieldName,
|
getFuncsByFieldName,
|
||||||
} from 'shared/reducers/helpers/fields'
|
} from 'shared/reducers/helpers/fields'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class FieldList extends Component {
|
class FieldList extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -5,7 +5,9 @@ import Dropdown from 'shared/components/Dropdown'
|
||||||
import {NULL_STRING, NUMBER} from 'shared/constants/queryFillOptions'
|
import {NULL_STRING, NUMBER} from 'shared/constants/queryFillOptions'
|
||||||
|
|
||||||
import queryFills from 'shared/data/queryFills'
|
import queryFills from 'shared/data/queryFills'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class FillQuery extends Component {
|
class FillQuery extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -3,7 +3,9 @@ import PropTypes from 'prop-types'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import {INFLUXQL_FUNCTIONS} from 'src/data_explorer/constants'
|
import {INFLUXQL_FUNCTIONS} from 'src/data_explorer/constants'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class FunctionSelector extends Component {
|
class FunctionSelector extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -11,7 +11,9 @@ import {
|
||||||
} from 'shared/constants/thresholds'
|
} from 'shared/constants/thresholds'
|
||||||
|
|
||||||
import {colorsStringSchema} from 'shared/schemas'
|
import {colorsStringSchema} from 'shared/schemas'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class Gauge extends Component {
|
class Gauge extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -6,6 +6,7 @@ import _ from 'lodash'
|
||||||
import {DEFAULT_GAUGE_COLORS} from 'src/shared/constants/thresholds'
|
import {DEFAULT_GAUGE_COLORS} from 'src/shared/constants/thresholds'
|
||||||
import {stringifyColorValues} from 'src/shared/constants/colorOperations'
|
import {stringifyColorValues} from 'src/shared/constants/colorOperations'
|
||||||
import {DASHBOARD_LAYOUT_ROW_HEIGHT} from 'src/shared/constants'
|
import {DASHBOARD_LAYOUT_ROW_HEIGHT} from 'src/shared/constants'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface Color {
|
interface Color {
|
||||||
type: string
|
type: string
|
||||||
|
@ -30,6 +31,7 @@ interface Props {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class GaugeChart extends PureComponent<Props> {
|
class GaugeChart extends PureComponent<Props> {
|
||||||
public static defaultProps: Partial<Props> = {
|
public static defaultProps: Partial<Props> = {
|
||||||
colors: stringifyColorValues(DEFAULT_GAUGE_COLORS),
|
colors: stringifyColorValues(DEFAULT_GAUGE_COLORS),
|
||||||
|
|
|
@ -3,9 +3,11 @@ import PropTypes from 'prop-types'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import {Scrollbars} from 'react-custom-scrollbars'
|
import {Scrollbars} from 'react-custom-scrollbars'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
const {arrayOf, number, shape, string} = PropTypes
|
const {arrayOf, number, shape, string} = PropTypes
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class InfiniteScroll extends Component {
|
class InfiniteScroll extends Component {
|
||||||
// Cache values from Scrollbars events that need to be independent of render
|
// Cache values from Scrollbars events that need to be independent of render
|
||||||
// Should not be setState as need not trigger a re-render
|
// Should not be setState as need not trigger a re-render
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React, {ChangeEvent, KeyboardEvent, PureComponent} from 'react'
|
import React, {ChangeEvent, KeyboardEvent, PureComponent} from 'react'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
wrapperClass: string
|
wrapperClass: string
|
||||||
|
@ -16,6 +17,7 @@ interface State {
|
||||||
initialValue: string
|
initialValue: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class InputClickToEdit extends PureComponent<Props, State> {
|
class InputClickToEdit extends PureComponent<Props, State> {
|
||||||
public static defaultProps: Partial<Props> = {
|
public static defaultProps: Partial<Props> = {
|
||||||
tabIndex: 0,
|
tabIndex: 0,
|
||||||
|
|
|
@ -9,6 +9,7 @@ import {IS_STATIC_LEGEND} from 'src/shared/constants'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
|
||||||
import {colorsStringSchema} from 'shared/schemas'
|
import {colorsStringSchema} from 'shared/schemas'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
const getSource = (cell, source, sources, defaultSource) => {
|
const getSource = (cell, source, sources, defaultSource) => {
|
||||||
const s = _.get(cell, ['queries', '0', 'source'], null)
|
const s = _.get(cell, ['queries', '0', 'source'], null)
|
||||||
|
@ -19,6 +20,7 @@ const getSource = (cell, source, sources, defaultSource) => {
|
||||||
return sources.find(src => src.links.self === s) || defaultSource
|
return sources.find(src => src.links.self === s) || defaultSource
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class LayoutState extends Component {
|
class LayoutState extends Component {
|
||||||
state = {
|
state = {
|
||||||
celldata: [],
|
celldata: [],
|
||||||
|
|
|
@ -10,7 +10,9 @@ import {notify} from 'src/shared/actions/notifications'
|
||||||
import {notifyCSVDownloadFailed} from 'src/shared/copy/notifications'
|
import {notifyCSVDownloadFailed} from 'src/shared/copy/notifications'
|
||||||
import {dashboardtoCSV} from 'shared/parsing/resultsToCSV'
|
import {dashboardtoCSV} from 'shared/parsing/resultsToCSV'
|
||||||
import download from 'src/external/download.js'
|
import download from 'src/external/download.js'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class LayoutCell extends Component {
|
class LayoutCell extends Component {
|
||||||
handleDeleteCell = cell => () => {
|
handleDeleteCell = cell => () => {
|
||||||
this.props.onDeleteCell(cell)
|
this.props.onDeleteCell(cell)
|
||||||
|
|
|
@ -16,7 +16,9 @@ import {
|
||||||
editingAnnotation,
|
editingAnnotation,
|
||||||
dismissEditingAnnotation,
|
dismissEditingAnnotation,
|
||||||
} from 'src/shared/actions/annotations'
|
} from 'src/shared/actions/annotations'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class LayoutCellMenu extends Component {
|
class LayoutCellMenu extends Component {
|
||||||
state = {
|
state = {
|
||||||
subMenuIsOpen: false,
|
subMenuIsOpen: false,
|
||||||
|
|
|
@ -15,9 +15,11 @@ import {
|
||||||
LAYOUT_MARGIN,
|
LAYOUT_MARGIN,
|
||||||
DASHBOARD_LAYOUT_ROW_HEIGHT,
|
DASHBOARD_LAYOUT_ROW_HEIGHT,
|
||||||
} from 'shared/constants'
|
} from 'shared/constants'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
const GridLayout = WidthProvider(ReactGridLayout)
|
const GridLayout = WidthProvider(ReactGridLayout)
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class LayoutRenderer extends Component {
|
class LayoutRenderer extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -7,7 +7,9 @@ import SingleStat from 'src/shared/components/SingleStat'
|
||||||
import timeSeriesToDygraph from 'utils/timeSeriesTransformers'
|
import timeSeriesToDygraph from 'utils/timeSeriesTransformers'
|
||||||
|
|
||||||
import {colorsStringSchema} from 'shared/schemas'
|
import {colorsStringSchema} from 'shared/schemas'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class LineGraph extends Component {
|
class LineGraph extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -7,7 +7,9 @@ import ColorScaleDropdown from 'shared/components/ColorScaleDropdown'
|
||||||
|
|
||||||
import {updateLineColors} from 'src/dashboards/actions/cellEditorOverlay'
|
import {updateLineColors} from 'src/dashboards/actions/cellEditorOverlay'
|
||||||
import {colorsStringSchema} from 'shared/schemas'
|
import {colorsStringSchema} from 'shared/schemas'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class LineGraphColorSelector extends Component {
|
class LineGraphColorSelector extends Component {
|
||||||
handleSelectColors = colorScale => {
|
handleSelectColors = colorScale => {
|
||||||
const {handleUpdateLineColors} = this.props
|
const {handleUpdateLineColors} = this.props
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {Query, Source} from 'src/types'
|
||||||
import FancyScrollbar from 'src/shared/components/FancyScrollbar'
|
import FancyScrollbar from 'src/shared/components/FancyScrollbar'
|
||||||
import MeasurementListFilter from 'src/shared/components/MeasurementListFilter'
|
import MeasurementListFilter from 'src/shared/components/MeasurementListFilter'
|
||||||
import MeasurementListItem from 'src/shared/components/MeasurementListItem'
|
import MeasurementListItem from 'src/shared/components/MeasurementListItem'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
query: Query
|
query: Query
|
||||||
|
@ -29,6 +30,7 @@ interface State {
|
||||||
|
|
||||||
const {shape} = PropTypes
|
const {shape} = PropTypes
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class MeasurementList extends PureComponent<Props, State> {
|
class MeasurementList extends PureComponent<Props, State> {
|
||||||
public static contextTypes = {
|
public static contextTypes = {
|
||||||
source: shape({
|
source: shape({
|
||||||
|
|
|
@ -2,6 +2,7 @@ import _ from 'lodash'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import React, {PureComponent, MouseEvent} from 'react'
|
import React, {PureComponent, MouseEvent} from 'react'
|
||||||
import TagList from 'src/shared/components/TagList'
|
import TagList from 'src/shared/components/TagList'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface SourceLinks {
|
interface SourceLinks {
|
||||||
proxy: string
|
proxy: string
|
||||||
|
@ -44,6 +45,7 @@ interface State {
|
||||||
isOpen: boolean
|
isOpen: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class MeasurementListItem extends PureComponent<Props, State> {
|
class MeasurementListItem extends PureComponent<Props, State> {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -2,7 +2,9 @@ import React, {Component} from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import OnClickOutside from 'react-onclickoutside'
|
import OnClickOutside from 'react-onclickoutside'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class MenuTooltipButton extends Component {
|
class MenuTooltipButton extends Component {
|
||||||
state = {
|
state = {
|
||||||
expanded: false,
|
expanded: false,
|
||||||
|
|
|
@ -5,7 +5,9 @@ import {showDatabases, showRetentionPolicies} from 'shared/apis/metaQuery'
|
||||||
import showDatabasesParser from 'shared/parsing/showDatabases'
|
import showDatabasesParser from 'shared/parsing/showDatabases'
|
||||||
import showRetentionPoliciesParser from 'shared/parsing/showRetentionPolicies'
|
import showRetentionPoliciesParser from 'shared/parsing/showRetentionPolicies'
|
||||||
import MultiSelectDropdown from 'shared/components/MultiSelectDropdown'
|
import MultiSelectDropdown from 'shared/components/MultiSelectDropdown'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class MultiSelectDBDropdown extends Component {
|
class MultiSelectDBDropdown extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -7,6 +7,7 @@ import _ from 'lodash'
|
||||||
import OnClickOutside from 'shared/components/OnClickOutside'
|
import OnClickOutside from 'shared/components/OnClickOutside'
|
||||||
import FancyScrollbar from 'shared/components/FancyScrollbar'
|
import FancyScrollbar from 'shared/components/FancyScrollbar'
|
||||||
import {DROPDOWN_MENU_MAX_HEIGHT} from 'shared/constants/index'
|
import {DROPDOWN_MENU_MAX_HEIGHT} from 'shared/constants/index'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
const labelText = ({localSelectedItems, isOpen, label}) => {
|
const labelText = ({localSelectedItems, isOpen, label}) => {
|
||||||
if (localSelectedItems.length) {
|
if (localSelectedItems.length) {
|
||||||
|
@ -25,6 +26,7 @@ const labelText = ({localSelectedItems, isOpen, label}) => {
|
||||||
return 'None'
|
return 'None'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class MultiSelectDropdown extends Component {
|
class MultiSelectDropdown extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -10,7 +10,9 @@ import * as schema from 'shared/schemas'
|
||||||
import * as actions from 'shared/actions/annotations'
|
import * as actions from 'shared/actions/annotations'
|
||||||
|
|
||||||
import {DYGRAPH_CONTAINER_XLABEL_MARGIN} from 'shared/constants'
|
import {DYGRAPH_CONTAINER_XLABEL_MARGIN} from 'shared/constants'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class NewAnnotation extends Component {
|
class NewAnnotation extends Component {
|
||||||
state = {
|
state = {
|
||||||
isMouseOver: false,
|
isMouseOver: false,
|
||||||
|
|
|
@ -8,7 +8,9 @@ import classnames from 'classnames'
|
||||||
import {dismissNotification as dismissNotificationAction} from 'shared/actions/notifications'
|
import {dismissNotification as dismissNotificationAction} from 'shared/actions/notifications'
|
||||||
|
|
||||||
import {NOTIFICATION_TRANSITION} from 'shared/constants/index'
|
import {NOTIFICATION_TRANSITION} from 'shared/constants/index'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class Notification extends Component {
|
class Notification extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -5,7 +5,9 @@ import classnames from 'classnames'
|
||||||
import uuid from 'uuid'
|
import uuid from 'uuid'
|
||||||
|
|
||||||
import ClickOutsideInput from 'shared/components/ClickOutsideInput'
|
import ClickOutsideInput from 'shared/components/ClickOutsideInput'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class OptIn extends Component {
|
class OptIn extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
|
|
||||||
import ResizeHandle from 'shared/components/ResizeHandle'
|
import ResizeHandle from 'shared/components/ResizeHandle'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
const maximumNumChildren = 2
|
const maximumNumChildren = 2
|
||||||
const defaultMinTopHeight = 200
|
const defaultMinTopHeight = 200
|
||||||
|
@ -10,6 +11,7 @@ const defaultMinBottomHeight = 200
|
||||||
const defaultInitialTopHeight = '50%'
|
const defaultInitialTopHeight = '50%'
|
||||||
const defaultInitialBottomHeight = '50%'
|
const defaultInitialBottomHeight = '50%'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class ResizeContainer extends Component {
|
class ResizeContainer extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -8,7 +8,9 @@ import {SMALL_CELL_HEIGHT} from 'shared/graphs/helpers'
|
||||||
import {DYGRAPH_CONTAINER_V_MARGIN} from 'shared/constants'
|
import {DYGRAPH_CONTAINER_V_MARGIN} from 'shared/constants'
|
||||||
import {generateThresholdsListHexs} from 'shared/constants/colorOperations'
|
import {generateThresholdsListHexs} from 'shared/constants/colorOperations'
|
||||||
import {colorsStringSchema} from 'shared/schemas'
|
import {colorsStringSchema} from 'shared/schemas'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class SingleStat extends PureComponent {
|
class SingleStat extends PureComponent {
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import React, {Component} from 'react'
|
import React, {Component} from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class SlideToggle extends Component {
|
class SlideToggle extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import uuid from 'uuid'
|
import uuid from 'uuid'
|
||||||
import {removeMeasurement} from 'shared/graphs/helpers'
|
import {removeMeasurement} from 'shared/graphs/helpers'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
const staticLegendItemClassname = (visibilities, i, hoverEnabled) => {
|
const staticLegendItemClassname = (visibilities, i, hoverEnabled) => {
|
||||||
if (visibilities.length) {
|
if (visibilities.length) {
|
||||||
|
@ -15,6 +16,7 @@ const staticLegendItemClassname = (visibilities, i, hoverEnabled) => {
|
||||||
return 'static-legend--item'
|
return 'static-legend--item'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class StaticLegend extends Component {
|
class StaticLegend extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React, {PureComponent} from 'react'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
|
||||||
import Tags from 'src/shared/components/Tags'
|
import Tags from 'src/shared/components/Tags'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface Item {
|
interface Item {
|
||||||
text?: string
|
text?: string
|
||||||
|
@ -15,6 +16,7 @@ interface Props {
|
||||||
disableTest: () => void
|
disableTest: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class TagInput extends PureComponent<Props> {
|
class TagInput extends PureComponent<Props> {
|
||||||
private input: HTMLInputElement
|
private input: HTMLInputElement
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import TagListItem from 'src/shared/components/TagListItem'
|
||||||
import {showTagKeys, showTagValues} from 'src/shared/apis/metaQuery'
|
import {showTagKeys, showTagValues} from 'src/shared/apis/metaQuery'
|
||||||
import showTagKeysParser from 'src/shared/parsing/showTagKeys'
|
import showTagKeysParser from 'src/shared/parsing/showTagKeys'
|
||||||
import showTagValuesParser from 'src/shared/parsing/showTagValues'
|
import showTagValuesParser from 'src/shared/parsing/showTagValues'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
const {shape} = PropTypes
|
const {shape} = PropTypes
|
||||||
|
|
||||||
|
@ -45,6 +46,7 @@ interface State {
|
||||||
tags: {}
|
tags: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class TagList extends PureComponent<Props, State> {
|
class TagList extends PureComponent<Props, State> {
|
||||||
public static contextTypes = {
|
public static contextTypes = {
|
||||||
source: shape({
|
source: shape({
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import React, {PureComponent, MouseEvent} from 'react'
|
import React, {PureComponent, MouseEvent} from 'react'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface Tag {
|
interface Tag {
|
||||||
key: string
|
key: string
|
||||||
|
@ -21,6 +22,7 @@ interface State {
|
||||||
filterText: string
|
filterText: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class TagListItem extends PureComponent<Props, State> {
|
class TagListItem extends PureComponent<Props, State> {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React, {PureComponent, SFC} from 'react'
|
||||||
import TagsAddButton from 'src/shared/components/TagsAddButton'
|
import TagsAddButton from 'src/shared/components/TagsAddButton'
|
||||||
import ConfirmButton from 'src/shared/components/ConfirmButton'
|
import ConfirmButton from 'src/shared/components/ConfirmButton'
|
||||||
import uuid from 'uuid'
|
import uuid from 'uuid'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface Item {
|
interface Item {
|
||||||
text?: string
|
text?: string
|
||||||
|
@ -38,6 +39,7 @@ interface TagProps {
|
||||||
onDelete: (item: Item) => void
|
onDelete: (item: Item) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class Tag extends PureComponent<TagProps> {
|
class Tag extends PureComponent<TagProps> {
|
||||||
public render() {
|
public render() {
|
||||||
const {item} = this.props
|
const {item} = this.props
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import React, {PureComponent} from 'react'
|
import React, {PureComponent} from 'react'
|
||||||
|
import uuid from 'uuid'
|
||||||
|
|
||||||
import {ClickOutside} from 'src/shared/components/ClickOutside'
|
import {ClickOutside} from 'src/shared/components/ClickOutside'
|
||||||
import uuid from 'uuid'
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
items: Item[]
|
items: Item[]
|
||||||
|
@ -17,6 +18,7 @@ interface State {
|
||||||
open: boolean
|
open: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class TagsAddButton extends PureComponent<Props, State> {
|
class TagsAddButton extends PureComponent<Props, State> {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
|
@ -19,12 +19,14 @@ import {
|
||||||
MAX_THRESHOLDS,
|
MAX_THRESHOLDS,
|
||||||
THRESHOLD_TYPE_BASE,
|
THRESHOLD_TYPE_BASE,
|
||||||
} from 'shared/constants/thresholds'
|
} from 'shared/constants/thresholds'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
const formatColor = color => {
|
const formatColor = color => {
|
||||||
const {hex, name} = color
|
const {hex, name} = color
|
||||||
return {hex, name}
|
return {hex, name}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class ThresholdsList extends Component {
|
class ThresholdsList extends Component {
|
||||||
handleAddThreshold = () => {
|
handleAddThreshold = () => {
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -9,7 +9,9 @@ import {
|
||||||
THRESHOLD_TYPE_TEXT,
|
THRESHOLD_TYPE_TEXT,
|
||||||
THRESHOLD_TYPE_BG,
|
THRESHOLD_TYPE_BG,
|
||||||
} from 'shared/constants/thresholds'
|
} from 'shared/constants/thresholds'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class ThresholdsListTypeToggle extends Component {
|
class ThresholdsListTypeToggle extends Component {
|
||||||
handleToggleThresholdsListType = newType => () => {
|
handleToggleThresholdsListType = newType => () => {
|
||||||
const {handleUpdateThresholdsListType} = this.props
|
const {handleUpdateThresholdsListType} = this.props
|
||||||
|
|
|
@ -9,11 +9,13 @@ import CustomTimeRangeOverlay from 'shared/components/CustomTimeRangeOverlay'
|
||||||
|
|
||||||
import {timeRanges} from 'shared/data/timeRanges'
|
import {timeRanges} from 'shared/data/timeRanges'
|
||||||
import {DROPDOWN_MENU_MAX_HEIGHT} from 'shared/constants/index'
|
import {DROPDOWN_MENU_MAX_HEIGHT} from 'shared/constants/index'
|
||||||
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
const dateFormat = 'YYYY-MM-DD HH:mm'
|
const dateFormat = 'YYYY-MM-DD HH:mm'
|
||||||
const emptyTime = {lower: '', upper: ''}
|
const emptyTime = {lower: '', upper: ''}
|
||||||
const format = t => moment(t.replace(/\'/g, '')).format(dateFormat)
|
const format = t => moment(t.replace(/\'/g, '')).format(dateFormat)
|
||||||
|
|
||||||
|
@ErrorHandling
|
||||||
class TimeRangeDropdown extends Component {
|
class TimeRangeDropdown extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
Loading…
Reference in New Issue