You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2020/07/15 06:42:16 UTC

[incubator-superset] branch 0.37 updated (522ed20 -> 791d787)

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

villebro pushed a change to branch 0.37
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


    from 522ed20  fix: fix csv and query result type and QueryObject schema (#10312)
     new 8d0e667  fix: leave null timestamp unformatted in view results table (#10313)
     new 791d787  fix: Bump FAB to 3.0.1 fix superset init (#10310)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 requirements.txt                                         |  2 +-
 setup.py                                                 |  2 +-
 superset-frontend/spec/javascripts/utils/common_spec.jsx | 12 ++++++++----
 superset-frontend/src/utils/common.js                    |  8 ++++++--
 4 files changed, 16 insertions(+), 8 deletions(-)


[incubator-superset] 02/02: fix: Bump FAB to 3.0.1 fix superset init (#10310)

Posted by vi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 791d787256291cfd6952e33ed06644d107a457f0
Author: Daniel Vaz Gaspar <da...@gmail.com>
AuthorDate: Tue Jul 14 15:16:45 2020 +0100

    fix: Bump FAB to 3.0.1 fix superset init (#10310)
---
 requirements.txt | 2 +-
 setup.py         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/requirements.txt b/requirements.txt
index 20579d8..15c45f3 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -29,7 +29,7 @@ decorator==4.4.2          # via retry
 defusedxml==0.6.0         # via python3-openid
 dnspython==1.16.0         # via email-validator
 email-validator==1.1.0    # via flask-appbuilder
-flask-appbuilder==3.0.0   # via apache-superset (setup.py)
+flask-appbuilder==3.0.1   # via apache-superset (setup.py)
 flask-babel==1.0.0        # via flask-appbuilder
 flask-caching==1.8.0      # via apache-superset (setup.py)
 flask-compress==1.5.0     # via apache-superset (setup.py)
diff --git a/setup.py b/setup.py
index 200d902..7a6c5d9 100644
--- a/setup.py
+++ b/setup.py
@@ -78,7 +78,7 @@ setup(
         "cryptography>=2.4.2",
         "dataclasses<0.7",
         "flask>=1.1.0, <2.0.0",
-        "flask-appbuilder>=3.0.0, <4.0.0",
+        "flask-appbuilder>=3.0.1, <4.0.0",
         "flask-caching",
         "flask-compress",
         "flask-talisman",


[incubator-superset] 01/02: fix: leave null timestamp unformatted in view results table (#10313)

Posted by vi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8d0e6676efbbfb2e23be633bdcc7a5e7c39eaca3
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Tue Jul 14 19:12:06 2020 +0300

    fix: leave null timestamp unformatted in view results table (#10313)
---
 superset-frontend/spec/javascripts/utils/common_spec.jsx | 12 ++++++++----
 superset-frontend/src/utils/common.js                    |  8 ++++++--
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/superset-frontend/spec/javascripts/utils/common_spec.jsx b/superset-frontend/spec/javascripts/utils/common_spec.jsx
index 08c0097..b47f423 100644
--- a/superset-frontend/spec/javascripts/utils/common_spec.jsx
+++ b/superset-frontend/spec/javascripts/utils/common_spec.jsx
@@ -72,12 +72,16 @@ describe('utils/common', () => {
     });
     it('changes formatting of temporal column', () => {
       const originalData = [
-        { __timestamp: 1594285437771, column1: 'lorem' },
-        { __timestamp: 1594285441675, column1: 'ipsum' },
+        { __timestamp: null, column1: 'lorem' },
+        { __timestamp: 0, column1: 'ipsum' },
+        { __timestamp: 1594285437771, column1: 'dolor' },
+        { __timestamp: 1594285441675, column1: 'sit' },
       ];
       const expectedData = [
-        { __timestamp: '2020-07-09 09:03:57', column1: 'lorem' },
-        { __timestamp: '2020-07-09 09:04:01', column1: 'ipsum' },
+        { __timestamp: null, column1: 'lorem' },
+        { __timestamp: '1970-01-01 00:00:00', column1: 'ipsum' },
+        { __timestamp: '2020-07-09 09:03:57', column1: 'dolor' },
+        { __timestamp: '2020-07-09 09:04:01', column1: 'sit' },
       ];
       expect(applyFormattingToTabularData(originalData)).toEqual(expectedData);
     });
diff --git a/superset-frontend/src/utils/common.js b/superset-frontend/src/utils/common.js
index 81b820e..521ad90 100644
--- a/superset-frontend/src/utils/common.js
+++ b/superset-frontend/src/utils/common.js
@@ -128,7 +128,11 @@ export function applyFormattingToTabularData(data) {
   }
   return data.map(row => ({
     ...row,
-    // eslint-disable-next-line no-underscore-dangle
-    __timestamp: DATETIME_FORMATTER(new Date(row.__timestamp)),
+    /* eslint-disable no-underscore-dangle */
+    __timestamp:
+      row.__timestamp === 0 || row.__timestamp
+        ? DATETIME_FORMATTER(new Date(row.__timestamp))
+        : row.__timestamp,
+    /* eslint-enable no-underscore-dangle */
   }));
 }