diff --git a/ui/src/data_explorer/components/FieldListItem.js b/ui/src/data_explorer/components/FieldListItem.js index 38ffad0785..bfe67dd701 100644 --- a/ui/src/data_explorer/components/FieldListItem.js +++ b/ui/src/data_explorer/components/FieldListItem.js @@ -5,7 +5,9 @@ import _ from 'lodash' import FunctionSelector from 'shared/components/FunctionSelector' import {firstFieldName} from 'shared/reducers/helpers/fields' +import {ErrorHandling} from 'src/shared/decorators/errors' +@ErrorHandling class FieldListItem extends Component { constructor(props) { super(props) diff --git a/ui/src/data_explorer/components/QueryEditor.js b/ui/src/data_explorer/components/QueryEditor.js index 22c06e59b2..abc6a4b4dc 100644 --- a/ui/src/data_explorer/components/QueryEditor.js +++ b/ui/src/data_explorer/components/QueryEditor.js @@ -4,7 +4,9 @@ import PropTypes from 'prop-types' import Dropdown from 'shared/components/Dropdown' import {QUERY_TEMPLATES} from 'src/data_explorer/constants' import QueryStatus from 'shared/components/QueryStatus' +import {ErrorHandling} from 'src/shared/decorators/errors' +@ErrorHandling class QueryEditor extends Component { constructor(props) { super(props) diff --git a/ui/src/data_explorer/components/QueryMakerTab.tsx b/ui/src/data_explorer/components/QueryMakerTab.tsx index a5b7f336cd..d5d913de29 100644 --- a/ui/src/data_explorer/components/QueryMakerTab.tsx +++ b/ui/src/data_explorer/components/QueryMakerTab.tsx @@ -1,5 +1,6 @@ import React, {PureComponent} from 'react' import classnames from 'classnames' +import {ErrorHandling} from 'src/shared/decorators/errors' interface Query { rawText: string @@ -14,6 +15,7 @@ interface Props { queryIndex: number } +@ErrorHandling class QueryMakerTab extends PureComponent { public render() { return ( diff --git a/ui/src/data_explorer/components/Table.js b/ui/src/data_explorer/components/Table.js index 64dc2417f6..2a0af628a6 100644 --- a/ui/src/data_explorer/components/Table.js +++ b/ui/src/data_explorer/components/Table.js @@ -11,9 +11,11 @@ import TabItem from 'src/data_explorer/components/TableTabItem' import {TEMPLATES} from 'src/shared/constants' import {fetchTimeSeriesAsync} from 'shared/actions/timeSeries' +import {ErrorHandling} from 'src/shared/decorators/errors' const emptySeries = {columns: [], values: []} +@ErrorHandling class ChronoTable extends Component { constructor(props) { super(props) diff --git a/ui/src/data_explorer/components/Visualization.js b/ui/src/data_explorer/components/Visualization.js index 230078c97a..4c07702b9d 100644 --- a/ui/src/data_explorer/components/Visualization.js +++ b/ui/src/data_explorer/components/Visualization.js @@ -6,9 +6,11 @@ import VisView from 'src/data_explorer/components/VisView' import {GRAPH, TABLE} from 'shared/constants' import buildQueries from 'utils/buildQueriesForGraphs' import _ from 'lodash' +import {ErrorHandling} from 'src/shared/decorators/errors' const META_QUERY_REGEX = /^(show|create|drop)/i +@ErrorHandling class Visualization extends Component { constructor(props) { super(props) diff --git a/ui/src/data_explorer/components/WriteDataForm.js b/ui/src/data_explorer/components/WriteDataForm.js index 631510628c..20e2743505 100644 --- a/ui/src/data_explorer/components/WriteDataForm.js +++ b/ui/src/data_explorer/components/WriteDataForm.js @@ -7,8 +7,10 @@ import WriteDataBody from 'src/data_explorer/components/WriteDataBody' import WriteDataHeader from 'src/data_explorer/components/WriteDataHeader' import {OVERLAY_TECHNOLOGY} from 'shared/constants/classNames' +import {ErrorHandling} from 'src/shared/decorators/errors' let dragCounter = 0 +@ErrorHandling class WriteDataForm extends Component { constructor(props) { super(props) diff --git a/ui/src/data_explorer/containers/DataExplorer.tsx b/ui/src/data_explorer/containers/DataExplorer.tsx index 16e2e58253..3c1e0ca787 100644 --- a/ui/src/data_explorer/containers/DataExplorer.tsx +++ b/ui/src/data_explorer/containers/DataExplorer.tsx @@ -28,6 +28,7 @@ import {buildRawText} from 'src/utils/influxql' import defaultQueryConfig from 'src/utils/defaultQueryConfig' import {Source, Query, TimeRange} from 'src/types' +import {ErrorHandling} from 'src/shared/decorators/errors' interface Props { source: Source @@ -49,6 +50,7 @@ interface State { showWriteForm: boolean } +@ErrorHandling export class DataExplorer extends PureComponent { public static childContextTypes = { source: PropTypes.shape({ diff --git a/ui/src/data_explorer/containers/DataExplorerPage.tsx b/ui/src/data_explorer/containers/DataExplorerPage.tsx index a4a422478f..ac2b866faa 100644 --- a/ui/src/data_explorer/containers/DataExplorerPage.tsx +++ b/ui/src/data_explorer/containers/DataExplorerPage.tsx @@ -2,11 +2,13 @@ import React, {PureComponent} from 'react' import DataExplorer from './DataExplorer' import {Source} from 'src/types' +import {ErrorHandling} from 'src/shared/decorators/errors' interface Props { source: Source } +@ErrorHandling class DataExplorerPage extends PureComponent { public render() { return ( diff --git a/ui/src/hosts/components/HostRow.js b/ui/src/hosts/components/HostRow.js index 7814931e78..a74819666c 100644 --- a/ui/src/hosts/components/HostRow.js +++ b/ui/src/hosts/components/HostRow.js @@ -5,7 +5,9 @@ import {Link} from 'react-router' import classnames from 'classnames' import {HOSTS_TABLE} from 'src/hosts/constants/tableSizing' +import {ErrorHandling} from 'src/shared/decorators/errors' +@ErrorHandling class HostRow extends Component { constructor(props) { super(props) diff --git a/ui/src/hosts/components/HostsTable.js b/ui/src/hosts/components/HostsTable.js index f26cf7aa8e..9d59e280a2 100644 --- a/ui/src/hosts/components/HostsTable.js +++ b/ui/src/hosts/components/HostsTable.js @@ -7,7 +7,9 @@ import HostRow from 'src/hosts/components/HostRow' import InfiniteScroll from 'shared/components/InfiniteScroll' import {HOSTS_TABLE} from 'src/hosts/constants/tableSizing' +import {ErrorHandling} from 'src/shared/decorators/errors' +@ErrorHandling class HostsTable extends Component { constructor(props) { super(props) diff --git a/ui/src/hosts/components/SearchBar.js b/ui/src/hosts/components/SearchBar.js index 269ecf608e..9f23025c76 100644 --- a/ui/src/hosts/components/SearchBar.js +++ b/ui/src/hosts/components/SearchBar.js @@ -1,7 +1,9 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import _ from 'lodash' +import {ErrorHandling} from 'src/shared/decorators/errors' +@ErrorHandling class SearchBar extends Component { constructor(props) { super(props) diff --git a/ui/src/hosts/containers/HostPage.js b/ui/src/hosts/containers/HostPage.js index 7e84151bdf..6e23d8a94e 100644 --- a/ui/src/hosts/containers/HostPage.js +++ b/ui/src/hosts/containers/HostPage.js @@ -20,7 +20,9 @@ import { import {setAutoRefresh} from 'shared/actions/app' import {presentationButtonDispatcher} from 'shared/dispatchers' +import {ErrorHandling} from 'src/shared/decorators/errors' +@ErrorHandling class HostPage extends Component { constructor(props) { super(props) diff --git a/ui/src/hosts/containers/HostsPage.js b/ui/src/hosts/containers/HostsPage.js index 2183c456b6..a0a93d1796 100644 --- a/ui/src/hosts/containers/HostsPage.js +++ b/ui/src/hosts/containers/HostsPage.js @@ -18,7 +18,9 @@ import { notifyUnableToGetHosts, notifyUnableToGetApps, } from 'shared/copy/notifications' +import {ErrorHandling} from 'src/shared/decorators/errors' +@ErrorHandling class HostsPage extends Component { constructor(props) { super(props) diff --git a/ui/src/ifql/components/FuncArg.tsx b/ui/src/ifql/components/FuncArg.tsx index 8eb77a898b..6a228cea0f 100644 --- a/ui/src/ifql/components/FuncArg.tsx +++ b/ui/src/ifql/components/FuncArg.tsx @@ -2,6 +2,7 @@ import React, {PureComponent} from 'react' import FuncArgInput, {OnChangeArg} from 'src/ifql/components/FuncArgInput' import * as types from 'src/ifql/constants/argumentTypes' +import {ErrorHandling} from 'src/shared/decorators/errors' interface Props { funcID: string @@ -12,6 +13,7 @@ interface Props { onGenerateScript: () => void } +@ErrorHandling class FuncArg extends PureComponent { public render() { const { diff --git a/ui/src/ifql/components/FuncArgInput.tsx b/ui/src/ifql/components/FuncArgInput.tsx index c7840c4ae9..b0a2324588 100644 --- a/ui/src/ifql/components/FuncArgInput.tsx +++ b/ui/src/ifql/components/FuncArgInput.tsx @@ -1,4 +1,5 @@ import React, {PureComponent, ChangeEvent, KeyboardEvent} from 'react' +import {ErrorHandling} from 'src/shared/decorators/errors' export type OnChangeArg = (inputArg: InputArg) => void @@ -17,6 +18,7 @@ interface Props { onGenerateScript: () => void } +@ErrorHandling class FuncArgInput extends PureComponent { public render() { const {argKey, value, type} = this.props diff --git a/ui/src/ifql/components/FuncArgs.tsx b/ui/src/ifql/components/FuncArgs.tsx index b57dcf1401..39df3f610f 100644 --- a/ui/src/ifql/components/FuncArgs.tsx +++ b/ui/src/ifql/components/FuncArgs.tsx @@ -1,6 +1,7 @@ import React, {PureComponent} from 'react' import FuncArg from 'src/ifql/components/FuncArg' import {OnChangeArg} from 'src/ifql/components/FuncArgInput' +import {ErrorHandling} from 'src/shared/decorators/errors' interface Arg { key: string @@ -21,6 +22,7 @@ interface Props { onGenerateScript: () => void } +@ErrorHandling export default class FuncArgs extends PureComponent { public render() { const {func, onChangeArg, onGenerateScript} = this.props diff --git a/ui/src/ifql/components/FuncListItem.tsx b/ui/src/ifql/components/FuncListItem.tsx index 5dc8876a7e..320f163064 100644 --- a/ui/src/ifql/components/FuncListItem.tsx +++ b/ui/src/ifql/components/FuncListItem.tsx @@ -1,4 +1,5 @@ import React, {PureComponent} from 'react' +import {ErrorHandling} from 'src/shared/decorators/errors' interface Props { name: string @@ -7,6 +8,7 @@ interface Props { onSetSelectedFunc: (name: string) => void } +@ErrorHandling export default class FuncListItem extends PureComponent { public render() { return ( diff --git a/ui/src/ifql/components/FuncNode.tsx b/ui/src/ifql/components/FuncNode.tsx index eb8c24ed97..112a4e0e8d 100644 --- a/ui/src/ifql/components/FuncNode.tsx +++ b/ui/src/ifql/components/FuncNode.tsx @@ -2,6 +2,7 @@ import React, {PureComponent, MouseEvent} from 'react' import FuncArgs from 'src/ifql/components/FuncArgs' import {Func} from 'src/ifql/components/FuncArgs' import {OnChangeArg} from 'src/ifql/components/FuncArgInput' +import {ErrorHandling} from 'src/shared/decorators/errors' interface Props { func: Func @@ -14,6 +15,7 @@ interface State { isOpen: boolean } +@ErrorHandling export default class FuncNode extends PureComponent { constructor(props) { super(props) diff --git a/ui/src/ifql/components/FuncSelector.tsx b/ui/src/ifql/components/FuncSelector.tsx index f152e1f5dc..8ea077936a 100644 --- a/ui/src/ifql/components/FuncSelector.tsx +++ b/ui/src/ifql/components/FuncSelector.tsx @@ -3,6 +3,7 @@ import _ from 'lodash' import {ClickOutside} from 'src/shared/components/ClickOutside' import FuncList from 'src/ifql/components/FuncList' +import {ErrorHandling} from 'src/shared/decorators/errors' interface State { isOpen: boolean @@ -15,6 +16,7 @@ interface Props { onAddNode: (name: string) => void } +@ErrorHandling export class FuncSelector extends PureComponent { constructor(props) { super(props) diff --git a/ui/src/ifql/components/TimeMachine.tsx b/ui/src/ifql/components/TimeMachine.tsx index 2b02ec8fc7..cad7831213 100644 --- a/ui/src/ifql/components/TimeMachine.tsx +++ b/ui/src/ifql/components/TimeMachine.tsx @@ -5,6 +5,7 @@ import TimeMachineEditor from 'src/ifql/components/TimeMachineEditor' import {Func} from 'src/ifql/components/FuncArgs' import {OnChangeArg} from 'src/ifql/components/FuncArgInput' +import {ErrorHandling} from 'src/shared/decorators/errors' export interface Suggestion { name: string @@ -25,6 +26,7 @@ interface Props { onGenerateScript: () => void } +@ErrorHandling class TimeMachine extends PureComponent { public render() { const { diff --git a/ui/src/ifql/components/TimeMachineEditor.tsx b/ui/src/ifql/components/TimeMachineEditor.tsx index ad68103456..70a0b6e5d1 100644 --- a/ui/src/ifql/components/TimeMachineEditor.tsx +++ b/ui/src/ifql/components/TimeMachineEditor.tsx @@ -2,6 +2,7 @@ import React, {PureComponent} from 'react' import {Controlled as CodeMirror, IInstance} from 'react-codemirror2' import {EditorChange} from 'codemirror' import 'src/external/codemirror' +import {ErrorHandling} from 'src/shared/decorators/errors' interface Props { script: string @@ -9,6 +10,7 @@ interface Props { onSubmitScript: (script: string) => void } +@ErrorHandling class TimeMachineEditor extends PureComponent { constructor(props) { super(props) diff --git a/ui/src/ifql/containers/IFQLPage.tsx b/ui/src/ifql/containers/IFQLPage.tsx index c5395d25fa..417c7e6c97 100644 --- a/ui/src/ifql/containers/IFQLPage.tsx +++ b/ui/src/ifql/containers/IFQLPage.tsx @@ -11,6 +11,7 @@ import {InputArg} from 'src/ifql/components/FuncArgInput' import {getSuggestions, getAST} from 'src/ifql/apis' import * as argTypes from 'src/ifql/constants/argumentTypes' +import {ErrorHandling} from 'src/shared/decorators/errors' interface Links { self: string @@ -29,6 +30,7 @@ interface State { script: string } +@ErrorHandling export class IFQLPage extends PureComponent { constructor(props) { super(props)