superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] graceguo-supercat closed pull request #5313: Fix flaky unit test - remove 'Markup' object in data
Date Mon, 02 Jul 2018 03:13:39 GMT
graceguo-supercat closed pull request #5313: Fix flaky unit test - remove 'Markup' object in
data
URL: https://github.com/apache/incubator-superset/pull/5313
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/src/dashboard/actions/sliceEntities.js b/superset/assets/src/dashboard/actions/sliceEntities.js
index 516a5144d1..b635ea05f5 100644
--- a/superset/assets/src/dashboard/actions/sliceEntities.js
+++ b/superset/assets/src/dashboard/actions/sliceEntities.js
@@ -56,9 +56,7 @@ export function fetchAllSlices(userId) {
                 description: slice.description,
                 description_markdown: slice.description_markeddown,
                 viz_type: slice.viz_type,
-                modified: slice.modified
-                  ? slice.modified.replace(/<[^>]*>/g, '')
-                  : '',
+                modified: slice.modified,
               };
             }
           });
diff --git a/superset/assets/src/dashboard/components/dnd/AddSliceDragPreview.jsx b/superset/assets/src/dashboard/components/dnd/AddSliceDragPreview.jsx
index 485e4e3171..1a50d4872a 100644
--- a/superset/assets/src/dashboard/components/dnd/AddSliceDragPreview.jsx
+++ b/superset/assets/src/dashboard/components/dnd/AddSliceDragPreview.jsx
@@ -54,9 +54,7 @@ function AddSliceDragPreview({ dragItem, slices, isDragging, currentOffset
}) {
         transform: `translate(${currentOffset.x}px, ${currentOffset.y}px)`,
       }}
       sliceName={slice.slice_name}
-      lastModified={
-        slice.modified ? slice.modified.replace(/<[^>]*>/g, '') : ''
-      }
+      lastModified={slice.modified}
       visType={slice.viz_type}
       datasourceLink={slice.datasource_link}
     />
diff --git a/superset/assets/src/dashboard/reducers/getInitialState.js b/superset/assets/src/dashboard/reducers/getInitialState.js
index 13283ec136..59695636ce 100644
--- a/superset/assets/src/dashboard/reducers/getInitialState.js
+++ b/superset/assets/src/dashboard/reducers/getInitialState.js
@@ -92,7 +92,7 @@ export default function(bootstrapData) {
         datasource: slice.form_data.datasource,
         description: slice.description,
         description_markeddown: slice.description_markeddown,
-        modified: slice.modified ? slice.modified.replace(/<[^>]*>/g, '') : '',
+        modified: slice.modified,
         changed_on: new Date(slice.changed_on).getTime(),
       };
 
diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index 4b2976a996..113ec39911 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -282,8 +282,7 @@ def changed_on_(self):
 
     @renders('modified')
     def modified(self):
-        s = humanize.naturaltime(datetime.now() - self.changed_on)
-        return Markup('<span class="no-wrap">{}</span>'.format(s))
+        return humanize.naturaltime(datetime.now() - self.changed_on)
 
     @property
     def icons(self):


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Mime
View raw message