You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2019/05/15 21:22:59 UTC

[incubator-superset] branch lyft-develop updated: chore: Truncate progressbar percentage decimals (#7499) (#7517)

This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch lyft-develop
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/lyft-develop by this push:
     new bfa5250  chore: Truncate progressbar percentage decimals (#7499) (#7517)
bfa5250 is described below

commit bfa5250c1121910c5347268aef21076b0d196c2c
Author: Alex Berghage <be...@lyft.com>
AuthorDate: Wed May 15 15:22:53 2019 -0600

    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 92045bd..5cf122d 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 22b6b0d..443eb16 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 {
         <ProgressBar
           striped
           now={query.progress}
-          label={`${query.progress}%`}
+          label={`${query.progress.toFixed(0)}%`}
         />);
     }
     if (query.trackingUrl) {