Skip to content

Commit

Permalink
fix sqlab progress bar and status inconsistency (#5848)
Browse files Browse the repository at this point in the history
  • Loading branch information
youngyjd authored and betodealmeida committed Sep 20, 2018
1 parent 8c83b72 commit a0e7c17
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion superset/assets/src/SqlLab/components/QueryAutoRefresh.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}
Expand Down
2 changes: 1 addition & 1 deletion superset/assets/src/SqlLab/components/ResultSet.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions superset/assets/src/SqlLab/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const STATE_BSSTYLE_MAP = {
fetching: 'info',
running: 'warning',
stopped: 'danger',
rendering: 'info',
success: 'success',
};

Expand Down
2 changes: 1 addition & 1 deletion superset/assets/src/SqlLab/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit a0e7c17

Please sign in to comment.