Merge pull request #2218 from influxdata/bugfix/no-results-legend

Bugfix/no results legend
pull/2204/merge
Andrew Watkins 2017-11-06 15:08:19 -08:00 committed by GitHub
commit 6e6203509a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 17 deletions

View File

@ -136,13 +136,6 @@ const AutoRefresh = ComposedComponent => {
return this.renderFetching(timeSeries)
}
if (
!this._resultsForQuery(timeSeries) ||
!this.state.lastQuerySuccessful
) {
return this.renderNoResults()
}
return (
<ComposedComponent
{...this.props}
@ -169,14 +162,6 @@ const AutoRefresh = ComposedComponent => {
)
}
renderNoResults = () => {
return (
<div className="graph-empty">
<p data-test="data-explorer-no-results">No Results</p>
</div>
)
}
_resultsForQuery = data =>
data.length
? data.every(({response}) =>

View File

@ -1,6 +1,7 @@
import React, {PropTypes} from 'react'
import _ from 'lodash'
import classnames from 'classnames'
import uuid from 'node-uuid'
import {makeLegendStyles} from 'shared/graphs/helpers'
@ -68,7 +69,6 @@ const DygraphLegend = ({
<div className="sort-btn--bottom">9</div>
</button>
)
return (
<div
className={`dygraph-legend ${hidden}`}
@ -118,7 +118,7 @@ const DygraphLegend = ({
? 'dygraph-legend--row highlight'
: 'dygraph-legend--row'
return (
<div key={label + color} className={seriesClass}>
<div key={uuid.v4()} className={seriesClass}>
<span style={{color}}>
{isSnipped ? removeMeasurement(label) : label}
</span>