Fix linter errors

pull/1081/head
Andrew Watkins 2017-03-30 09:38:36 -07:00
parent fc4a5c57a9
commit 0fd98ee1d1
4 changed files with 19 additions and 18 deletions

View File

@ -136,5 +136,5 @@ export function editRawQueryStatus(queryID, rawStatus) {
queryID,
rawStatus,
},
};
}
}

View File

@ -49,14 +49,14 @@ const MultiTable = React.createClass({
},
renderTable() {
const {height, onEditRawStatus} = this.props;
const query = this.getActiveQuery();
const noQuery = !query || !query.text;
const {height, onEditRawStatus} = this.props
const query = this.getActiveQuery()
const noQuery = !query || !query.text
if (noQuery) {
return null
}
return <Table key={query.text} query={query} height={height} onEditRawStatus={onEditRawStatus} />;
return <Table key={query.text} query={query} height={height} onEditRawStatus={onEditRawStatus} />
},
renderTabs() {

View File

@ -5,7 +5,7 @@ import fetchTimeSeries from 'shared/apis/timeSeries'
import _ from 'lodash'
import moment from 'moment'
const {oneOfType, number, string, shape, arrayOf, func} = PropTypes;
const {oneOfType, number, string, shape, arrayOf, func} = PropTypes
const CustomCell = React.createClass({
propTypes: {
@ -54,7 +54,7 @@ const ChronoTable = React.createClass({
},
async fetchCellData(query) {
this.setState({isLoading: true});
this.setState({isLoading: true})
const {onEditRawStatus} = this.props
// second param is db, we want to leave this blank
try {
@ -66,7 +66,7 @@ const ChronoTable = React.createClass({
return onEditRawStatus(query.id, {error})
}
const cellData = _.get(data, ['results', '0', 'series', '0'], false);
const cellData = _.get(data, ['results', '0', 'series', '0'], false)
onEditRawStatus(query.id, {success: 'Success!'})
if (!cellData) {

View File

@ -5,6 +5,7 @@ import AutoRefresh from 'shared/components/AutoRefresh'
import LineGraph from 'shared/components/LineGraph'
import SingleStat from 'shared/components/SingleStat'
import MultiTable from './MultiTable'
import VisHeader from 'src/data_explorer/components/VisHeader'
const RefreshingLineGraph = AutoRefresh(LineGraph)
const RefreshingSingleStat = AutoRefresh(SingleStat)
@ -53,18 +54,18 @@ const Visualization = React.createClass({
},
render() {
const {queryConfigs, timeRange, height, heightPixels, onEditRawStatus} = this.props;
const {source} = this.context;
const proxyLink = source.links.proxy;
const {view} = this.state;
const {queryConfigs, timeRange, height, heightPixels, onEditRawStatus} = this.props
const {source} = this.context
const proxyLink = source.links.proxy
const {view} = this.state
const statements = queryConfigs.map((query) => {
const text = query.rawText || buildInfluxQLQuery(timeRange, query);
return {text, id: query.id};
});
const text = query.rawText || buildInfluxQLQuery(timeRange, query)
return {text, id: query.id}
})
const queries = statements.filter((s) => s.text !== null).map((s) => {
return {host: [proxyLink], text: s.text, id: s.id};
});
return {host: [proxyLink], text: s.text, id: s.id}
})
return (
<div className={classNames("graph", {active: true})} style={{height}}>
@ -73,7 +74,7 @@ const Visualization = React.createClass({
{this.renderVisualization(view, queries, heightPixels, onEditRawStatus)}
</div>
</div>
);
)
},
renderVisualization(view, queries, heightPixels, onEditRawStatus) {