From bf205770f0de65851003792a2e509dad16d0ffca Mon Sep 17 00:00:00 2001 From: Alex Berghage Date: Wed, 15 May 2019 15:22:53 -0600 Subject: [PATCH] chore: Truncate progressbar percentage decimals (#7499) (#7517) This change makes the query progress bar only show whole number percentage changes, instead of numbers like 12.13168276%. --- superset/assets/src/SqlLab/components/QueryTable.jsx | 6 +++--- superset/assets/src/SqlLab/components/ResultSet.jsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/superset/assets/src/SqlLab/components/QueryTable.jsx b/superset/assets/src/SqlLab/components/QueryTable.jsx index 92045bd2ee277..5cf122d03652e 100644 --- a/superset/assets/src/SqlLab/components/QueryTable.jsx +++ b/superset/assets/src/SqlLab/components/QueryTable.jsx @@ -41,8 +41,8 @@ const propTypes = { const defaultProps = { columns: ['started', 'duration', 'rows'], queries: [], - onUserClicked: () => {}, - onDbClicked: () => {}, + onUserClicked: () => { }, + onDbClicked: () => { }, }; class QueryTable extends React.PureComponent { @@ -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; diff --git a/superset/assets/src/SqlLab/components/ResultSet.jsx b/superset/assets/src/SqlLab/components/ResultSet.jsx index 22b6b0d46d55f..443eb16b29998 100644 --- a/superset/assets/src/SqlLab/components/ResultSet.jsx +++ b/superset/assets/src/SqlLab/components/ResultSet.jsx @@ -241,7 +241,7 @@ export default class ResultSet extends React.PureComponent { ); } if (query.trackingUrl) {