superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From christ...@apache.org
Subject [incubator-superset] branch master updated: chore: Truncate progressbar percentage decimals (#7499) (#7517) (#7519)
Date Wed, 15 May 2019 22:33:36 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 9423e9a  chore: Truncate progressbar percentage decimals (#7499) (#7517) (#7519)
9423e9a is described below

commit 9423e9a8be1c0fc0bad8fbd2f04fe298d08469bf
Author: Alex Berghage <bearcage@lyft.com>
AuthorDate: Wed May 15 16:33:30 2019 -0600

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


Mime
View raw message