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

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

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

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


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

commit a4bddc6da958a162b169b3a9df1a65072f210670
Author: Alex Berghage <be...@lyft.com>
AuthorDate: Tue May 14 09:43:56 2019 -0600

    chore: Truncate progressbar percentage decimals (#7499)
    
    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) {