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, queryID,
rawStatus, rawStatus,
}, },
}; }
} }

View File

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

View File

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

View File

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