superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grace...@apache.org
Subject [incubator-superset] branch master updated: [fix] should allow force refresh when having charts under tab (#6181)
Date Wed, 24 Oct 2018 22:34:41 GMT
This is an automated email from the ASF dual-hosted git repository.

graceguo 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 ca5be1c  [fix] should allow force refresh when having charts under tab (#6181)
ca5be1c is described below

commit ca5be1c1e2d9b6dd55f5ee571147a9fd13a64af4
Author: Grace Guo <grace.guo@airbnb.com>
AuthorDate: Wed Oct 24 15:34:36 2018 -0700

    [fix] should allow force refresh when having charts under tab (#6181)
---
 superset/assets/cypress/integration/dashboard/controls.js | 5 +++--
 superset/assets/src/dashboard/util/isDashboardLoading.js  | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/superset/assets/cypress/integration/dashboard/controls.js b/superset/assets/cypress/integration/dashboard/controls.js
index 0f163ee..129a84c 100644
--- a/superset/assets/cypress/integration/dashboard/controls.js
+++ b/superset/assets/cypress/integration/dashboard/controls.js
@@ -57,9 +57,10 @@ export default () => describe('top-level controls', () => {
   });
 
   it('should allow dashboard level force refresh', () => {
-    // should not show dashobard level force refresh
+    // when charts are not start loading, for example, under a secondary tab,
+    // should allow force refresh
     cy.get('#save-dash-split-button').trigger('click');
-    cy.contains('Force refresh dashboard').parent().should('have.class', 'disabled');
+    cy.contains('Force refresh dashboard').parent().not('have.class', 'disabled');
 
     // wait the all dash finish loading.
     cy.wait(sliceRequests);
diff --git a/superset/assets/src/dashboard/util/isDashboardLoading.js b/superset/assets/src/dashboard/util/isDashboardLoading.js
index 01054f5..e23f457 100644
--- a/superset/assets/src/dashboard/util/isDashboardLoading.js
+++ b/superset/assets/src/dashboard/util/isDashboardLoading.js
@@ -1,5 +1,5 @@
 export default function isDashboardLoading(charts) {
   return Object.values(charts).some(
-    chart => chart.chartUpdateStartTime >= (chart.chartUpdateEndTime || 0),
+    chart => chart.chartUpdateStartTime > (chart.chartUpdateEndTime || 0),
   );
 }


Mime
View raw message