Skip to content

Commit

Permalink
chore: Truncate progressbar percentage decimals (apache#7499) (apache…
Browse files Browse the repository at this point in the history
…#7517)

This change makes the query progress bar only show
whole number percentage changes, instead of numbers
like 12.13168276%.
  • Loading branch information
Alex Berghage committed May 15, 2019
1 parent fda1002 commit bf20577
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions superset/assets/src/SqlLab/components/QueryTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ const propTypes = {
const defaultProps = {
columns: ['started', 'duration', 'rows'],
queries: [],
onUserClicked: () => {},
onDbClicked: () => {},
onUserClicked: () => { },
onDbClicked: () => { },
};

class QueryTable extends React.PureComponent {
Expand Down Expand Up @@ -169,7 +169,7 @@ class QueryTable extends React.PureComponent {
style={{ width: '75px' }}
striped
now={q.progress}
label={`${q.progress}%`}
label={`${q.progress.toFixed(0)}%`}
/>
);
let errorTooltip;
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 @@ -241,7 +241,7 @@ export default class ResultSet extends React.PureComponent {
<ProgressBar
striped
now={query.progress}
label={`${query.progress}%`}
label={`${query.progress.toFixed(0)}%`}
/>);
}
if (query.trackingUrl) {
Expand Down

0 comments on commit bf20577

Please sign in to comment.