[cache] Render label when cached (#7164)

This commit is contained in:
John Bodley 2019-04-09 15:00:35 -07:00 committed by GitHub
parent 149b31d296
commit 92166399da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ class ExploreChartHeader extends React.PureComponent {
chartUpdateStartTime,
latestQueryFormData,
queryResponse } = this.props.chart;
const chartSucceeded = ['success', 'rendered'].indexOf(this.props.chart.chartStatus) > 0;
const chartFinished = ['failed', 'rendered', 'success'].includes(this.props.chart.chartStatus);
return (
<div
id="slice-header"
@ -135,12 +135,12 @@ class ExploreChartHeader extends React.PureComponent {
/>
}
<div className="pull-right">
{chartSucceeded && queryResponse &&
{chartFinished && queryResponse &&
<RowCountLabel
rowcount={queryResponse.rowcount}
limit={formData.row_limit}
/>}
{chartSucceeded && queryResponse && queryResponse.is_cached &&
{chartFinished && queryResponse && queryResponse.is_cached &&
<CachedLabel
onClick={this.runQuery.bind(this)}
cachedTimestamp={queryResponse.cached_dttm}