You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by gr...@apache.org on 2018/06/27 00:46:33 UTC
[incubator-superset] branch master updated: [dashboard fix] force
refresh charts under tabs (#5291)
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 4ee984c [dashboard fix] force refresh charts under tabs (#5291)
4ee984c is described below
commit 4ee984c6ded4b6e56566ae51683242bc2946c2a3
Author: Grace Guo <gr...@airbnb.com>
AuthorDate: Tue Jun 26 17:46:28 2018 -0700
[dashboard fix] force refresh charts under tabs (#5291)
---
superset/assets/src/chart/chartAction.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/superset/assets/src/chart/chartAction.js b/superset/assets/src/chart/chartAction.js
index 82c4250..ead1590 100644
--- a/superset/assets/src/chart/chartAction.js
+++ b/superset/assets/src/chart/chartAction.js
@@ -202,5 +202,10 @@ export function runQuery(formData, force = false, timeout = 60, key) {
}
export function refreshChart(chart, force, timeout) {
- return dispatch => dispatch(runQuery(chart.latestQueryFormData, force, timeout, chart.id));
+ return (dispatch) => {
+ if (!chart.latestQueryFormData || Object.keys(chart.latestQueryFormData).length === 0) {
+ return;
+ }
+ dispatch(runQuery(chart.latestQueryFormData, force, timeout, chart.id));
+ };
}