Skip to content

Commit

Permalink
[cache] Render label when cached
Browse files Browse the repository at this point in the history
  • Loading branch information
John Bodley committed Apr 9, 2019
1 parent 36a6fad commit 79e467d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions superset/assets/src/explore/components/ExploreChartHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 79e467d

Please sign in to comment.