[dashboard fix] force refresh charts under tabs (#5291)

This commit is contained in:
Grace Guo 2018-06-26 17:46:28 -07:00 committed by GitHub
parent 05a39b395a
commit 4ee984c6de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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));
};
}