This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 9216639  [cache] Render label when cached (#7164)
9216639 is described below

commit 92166399da8c61bbb64c96604a3fe59a0c74159f
Author: John Bodley <[email protected]>
AuthorDate: Tue Apr 9 15:00:35 2019 -0700

    [cache] Render label when cached (#7164)
---
 superset/assets/src/explore/components/ExploreChartHeader.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/superset/assets/src/explore/components/ExploreChartHeader.jsx 
b/superset/assets/src/explore/components/ExploreChartHeader.jsx
index d2f3b98..cbaedb6 100644
--- a/superset/assets/src/explore/components/ExploreChartHeader.jsx
+++ b/superset/assets/src/explore/components/ExploreChartHeader.jsx
@@ -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}

Reply via email to