This is an automated email from the ASF dual-hosted git repository.
beto 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 a0e7c17 fix sqlab progress bar and status inconsistency (#5848)
a0e7c17 is described below
commit a0e7c176e956611abae6fd8192f0729f3bfff89c
Author: Junda Yang <[email protected]>
AuthorDate: Thu Sep 20 11:20:36 2018 -0700
fix sqlab progress bar and status inconsistency (#5848)
---
superset/assets/src/SqlLab/components/QueryAutoRefresh.jsx | 2 +-
superset/assets/src/SqlLab/components/ResultSet.jsx | 2 +-
superset/assets/src/SqlLab/constants.js | 1 +
superset/assets/src/SqlLab/reducers.js | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/superset/assets/src/SqlLab/components/QueryAutoRefresh.jsx
b/superset/assets/src/SqlLab/components/QueryAutoRefresh.jsx
index 4bd034e..0839c25 100644
--- a/superset/assets/src/SqlLab/components/QueryAutoRefresh.jsx
+++ b/superset/assets/src/SqlLab/components/QueryAutoRefresh.jsx
@@ -23,7 +23,7 @@ class QueryAutoRefresh extends React.PureComponent {
const now = new Date().getTime();
return Object.values(queries)
.some(
- q => ['running', 'started', 'pending', 'fetching'].indexOf(q.state) >=
0 &&
+ q => ['running', 'started', 'pending', 'fetching',
'rendering'].indexOf(q.state) >= 0 &&
now - q.startDttm < MAX_QUERY_AGE_TO_POLL,
);
}
diff --git a/superset/assets/src/SqlLab/components/ResultSet.jsx
b/superset/assets/src/SqlLab/components/ResultSet.jsx
index 6fa6a27..6fa8200 100644
--- a/superset/assets/src/SqlLab/components/ResultSet.jsx
+++ b/superset/assets/src/SqlLab/components/ResultSet.jsx
@@ -200,7 +200,7 @@ export default class ResultSet extends React.PureComponent {
}
let progressBar;
let trackingUrl;
- if (query.progress > 0 && query.state === 'running') {
+ if (query.progress > 0) {
progressBar = (
<ProgressBar
striped
diff --git a/superset/assets/src/SqlLab/constants.js
b/superset/assets/src/SqlLab/constants.js
index ce69704..2a34112 100644
--- a/superset/assets/src/SqlLab/constants.js
+++ b/superset/assets/src/SqlLab/constants.js
@@ -4,6 +4,7 @@ export const STATE_BSSTYLE_MAP = {
fetching: 'info',
running: 'warning',
stopped: 'danger',
+ rendering: 'info',
success: 'success',
};
diff --git a/superset/assets/src/SqlLab/reducers.js
b/superset/assets/src/SqlLab/reducers.js
index 7fa60b1..537f4be 100644
--- a/superset/assets/src/SqlLab/reducers.js
+++ b/superset/assets/src/SqlLab/reducers.js
@@ -158,7 +158,7 @@ export const sqlLabReducer = function (state = {}, action) {
progress: 100,
results: action.results,
rows,
- state: action.query.state,
+ state: 'rendering',
errorMessage: null,
cached: false,
};