Add warn status type to rawStatus

pull/1081/head
Andrew Watkins 2017-03-30 11:12:02 -07:00
parent b942b15aaf
commit 5eae6463ca
2 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,7 @@ const RawQueryEditor = React.createClass({
value={value}
placeholder="Blank query"
/>
<div>{rawStatus && rawStatus.error || rawStatus && rawStatus.success}</div>
<div>{rawStatus && rawStatus.error || rawStatus.warn || rawStatus.success}</div>
</div>
)
},

View File

@ -61,9 +61,9 @@ const ChronoTable = React.createClass({
const {data} = await fetchTimeSeries(query.host, undefined, query.text)
this.setState({isLoading: false})
const error = _.get(data, ['results', '0', 'error'], false)
if (error) {
return onEditRawStatus(query.id, {error})
const warn = _.get(data, ['results', '0', 'error'], false)
if (warn) {
return onEditRawStatus(query.id, {warn})
}
const cellData = _.get(data, ['results', '0', 'series', '0'], false)