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

sarath pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 76610de  ATLAS-3478: UI: Entity Icon loading improved
76610de is described below

commit 76610de6c1a1de045d1797dee1ae46a302eaa837
Author: kevalbhatt <[email protected]>
AuthorDate: Fri Oct 18 17:29:06 2019 +0530

    ATLAS-3478: UI: Entity Icon loading improved
    
    Signed-off-by: Sarath Subramanian <[email protected]>
    (cherry picked from commit d57f5d8a43395767c03a086907a63aedef3c3e29)
---
 dashboardv2/public/css/scss/graph.scss                    |  4 ++--
 .../public/js/views/glossary/GlossaryDetailLayoutView.js  | 10 +++++-----
 dashboardv2/public/js/views/graph/LineageLayoutView.js    | 11 +++++++----
 dashboardv2/public/js/views/graph/LineageUtils.js         |  4 +++-
 .../public/js/views/search/SearchResultLayoutView.js      |  3 ++-
 dashboardv3/public/css/scss/graph.scss                    |  4 ++--
 .../public/js/views/glossary/GlossaryDetailLayoutView.js  |  8 ++++----
 dashboardv3/public/js/views/graph/LineageLayoutView.js    | 11 +++++++----
 dashboardv3/public/js/views/graph/LineageUtils.js         |  4 +++-
 .../public/js/views/search/SearchResultLayoutView.js      |  3 ++-
 .../public/js/views/search/save/SaveModalLayoutView.js    | 15 ++++++++++-----
 11 files changed, 47 insertions(+), 30 deletions(-)

diff --git a/dashboardv2/public/css/scss/graph.scss 
b/dashboardv2/public/css/scss/graph.scss
index 1225751..4cb61ee 100644
--- a/dashboardv2/public/css/scss/graph.scss
+++ b/dashboardv2/public/css/scss/graph.scss
@@ -32,7 +32,7 @@
         font-family: $font_1;
     }
 
-    transition: opacity 0.3s linear;
+    //transition: opacity 0.3s linear;
 
     rect {
         stroke: $color_mountain_mist_approx;
@@ -362,7 +362,7 @@ span#zoom_in {
     width: 100%;
     right: 0;
     padding: 0 !important;
-    z-index: 999;
+    z-index: 9999;
     overflow: hidden !important;
 
     .resizeGraph {
diff --git a/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js 
b/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js
index f605a80..aaae651 100644
--- a/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js
+++ b/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js
@@ -281,7 +281,7 @@ define(['require',
                     categories = "";
                 _.each(data, function(val) {
                     var name = _.escape(val.displayText);
-                    categories += '<span data-guid="' + val.categoryGuid + '"" 
class="btn btn-action btn-sm btn-icon btn-blue" title=' + _.escape(name) + ' 
data-id="categoryClick"><span>' + name + '</span><i class="fa fa-close" 
data-id="removeCategory" data-type="category" title="Remove 
Category"></i></span>';
+                    categories += '<span data-guid="' + val.categoryGuid + '"" 
class="btn btn-action btn-sm btn-icon btn-blue" data-id="categoryClick"><span 
title=' + name + '>' + name + '</span><i class="fa fa-close" 
data-id="removeCategory" data-type="category" title="Remove 
Category"></i></span>';
                 });
                 this.ui.categoryList.find("span.btn").remove();
                 this.ui.categoryList.prepend(categories);
@@ -291,7 +291,7 @@ define(['require',
                     terms = "";
                 _.each(data, function(val) {
                     var name = _.escape(val.displayText);
-                    terms += '<span data-guid="' + val.termGuid + '"" 
class="btn btn-action btn-sm btn-icon btn-blue" title=' + _.escape(name) + ' 
data-id="termClick"><span>' + name + '</span><i class="fa fa-close" 
data-id="removeTerm" data-type="term" title="Remove Term"></i></span>';
+                    terms += '<span data-guid="' + val.termGuid + '"" 
class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick"><span 
title=' + name + '>' + name + '</span><i class="fa fa-close" 
data-id="removeTerm" data-type="term" title="Remove Term"></i></span>';
                 });
                 this.ui.termList.find("span.btn").remove();
                 this.ui.termList.prepend(terms);
@@ -301,7 +301,7 @@ define(['require',
                 var that = this,
                     tagData = "";
                 _.each(tagObject, function(val) {
-                    tagData += '<span class="btn btn-action btn-sm btn-icon 
btn-blue" title=' + val.typeName + ' data-id="tagClickTerm"><span>' + 
val.typeName + '</span><i class="fa fa-close" data-id="removeTagTerm" 
data-type="tag" title="Remove Tag"></i></span>';
+                    tagData += '<span class="btn btn-action btn-sm btn-icon 
btn-blue"  data-id="tagClickTerm"><span title=' + val.typeName + '>' + 
val.typeName + '</span><i class="fa fa-close" data-id="removeTagTerm" 
data-type="tag" title="Remove Tag"></i></span>';
                 });
                 this.ui.tagList.find("span.btn").remove();
                 this.ui.tagList.prepend(tagData);
@@ -389,7 +389,7 @@ define(['require',
                     tagName = $(e.currentTarget).text(),
                     termName = this.data.name;
                 CommonViewFunction.deleteTag(_.extend({}, {
-                    msg: "<div class='ellipsis-with-margin'>Remove: " + "<b>" 
+ _.escape(tagName) + "</b> assignment from" + " " + "<b>" + termName + 
"?</b></div>",
+                    msg: "<div class='ellipsis-with-margin'>Remove: " + "<b>" 
+ _.escape(tagName) + "</b> assignment from" + " " + "<b>" + _.escape(termName) 
+ "?</b></div>",
                     titleMessage: Messages.removeTag,
                     okText: "Remove",
                     showLoader: that.showLoader.bind(that),
@@ -410,7 +410,7 @@ define(['require',
                     selectedGuid: guid,
                     model: that.data,
                     collection: that.glossaryCollection,
-                    msg: "<div class='ellipsis-with-margin'>Remove: " + "<b>" 
+ _.escape(name) + "</b> assignment from" + " " + "<b>" + that.data.name + 
"?</b></div>",
+                    msg: "<div class='ellipsis-with-margin'>Remove: " + "<b>" 
+ _.escape(name) + "</b> assignment from" + " " + "<b>" + 
_.escape(that.data.name) + "?</b></div>",
                     titleMessage: Messages.glossary[that.isTermView ? 
"removeCategoryfromTerm" : "removeTermfromCategory"],
                     isCategoryView: that.isCategoryView,
                     isTermView: that.isTermView,
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js 
b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index d638a73..af406b9 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -495,9 +495,11 @@ define(['require',
                     "translate(" + this.zoom.translate() + ")" +
                     "scale(" + this.zoom.scale() + ")"
                 );
-                LineageUtils.refreshGraphForIE({
-                    edgeEl: this.$('svg .edgePath')
-                });
+                if (platform.name === "IE") {
+                    LineageUtils.refreshGraphForIE({
+                        edgeEl: this.$('svg .edgePath')
+                    });
+                }
             },
             interpolateZoom: function(translate, scale, that, zoom) {
                 return d3.transition().duration(350).tween("zoom", function() {
@@ -584,7 +586,8 @@ define(['require',
                                     var imagePath = options.imagePath,
                                         ajaxOptions = {
                                             "url": imagePath,
-                                            "method": "get"
+                                            "method": "get",
+                                            "cache": true
                                         }
 
                                     if (platform.name !== "IE") {
diff --git a/dashboardv2/public/js/views/graph/LineageUtils.js 
b/dashboardv2/public/js/views/graph/LineageUtils.js
index d2da39a..e1363a5 100644
--- a/dashboardv2/public/js/views/graph/LineageUtils.js
+++ b/dashboardv2/public/js/views/graph/LineageUtils.js
@@ -231,7 +231,9 @@ define(['require'], function(require) {
                 zoomListener.translate([xa, ya]);
                 zoom.scale(scale);
                 afterCenterZoomed({ newScale: scale, newTranslate: [xa, ya] });
-                LinegaeUtils.refreshGraphForIE({ "edgeEl": edgePathEl })
+                if (platform.name === "IE") {
+                    LinegaeUtils.refreshGraphForIE({ "edgeEl": edgePathEl })
+                }
             }
         }
     }
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js 
b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 5d33d37..d82ed97 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -683,7 +683,8 @@ define(['require',
                                     returnImgUrl = null;
                                 $.ajax({
                                         "url": imagePath,
-                                        "method": "get"
+                                        "method": "get",
+                                        "cache": true
                                     })
                                     .always(function(data, status, xhr) {
                                         if (data.status == 404) {
diff --git a/dashboardv3/public/css/scss/graph.scss 
b/dashboardv3/public/css/scss/graph.scss
index 101024c..71e5e57 100644
--- a/dashboardv3/public/css/scss/graph.scss
+++ b/dashboardv3/public/css/scss/graph.scss
@@ -25,7 +25,7 @@
         font-family: $font_1;
     }
 
-    transition: opacity 0.3s linear;
+    //transition: opacity 0.3s linear;
 
     rect {
         stroke: $color_mountain_mist_approx;
@@ -355,7 +355,7 @@ span#zoom_in {
     width: 100%;
     right: 0;
     padding: 0 !important;
-    z-index: 999;
+    z-index: 9999;
     overflow: hidden !important;
 
     .resizeGraph {
diff --git a/dashboardv3/public/js/views/glossary/GlossaryDetailLayoutView.js 
b/dashboardv3/public/js/views/glossary/GlossaryDetailLayoutView.js
index 1216a9d..821769a 100644
--- a/dashboardv3/public/js/views/glossary/GlossaryDetailLayoutView.js
+++ b/dashboardv3/public/js/views/glossary/GlossaryDetailLayoutView.js
@@ -296,7 +296,7 @@ define(['require',
                     categories = "";
                 _.each(data, function(val) {
                     var name = _.escape(val.displayText);
-                    categories += '<span data-guid="' + val.categoryGuid + '"" 
class="btn btn-action btn-sm btn-icon btn-blue" data-id="categoryClick"><span  
title=' + _.escape(name) + '>' + name + '</span><i class="fa fa-close" 
data-id="removeCategory" data-type="category" title="Remove 
Category"></i></span>';
+                    categories += '<span data-guid="' + val.categoryGuid + '"" 
class="btn btn-action btn-sm btn-icon btn-blue" data-id="categoryClick"><span  
title=' + name + '>' + name + '</span><i class="fa fa-close" 
data-id="removeCategory" data-type="category" title="Remove 
Category"></i></span>';
                 });
                 this.ui.categoryList.find("span.btn").remove();
                 this.ui.categoryList.prepend(categories);
@@ -306,7 +306,7 @@ define(['require',
                     terms = "";
                 _.each(data, function(val) {
                     var name = _.escape(val.displayText);
-                    terms += '<span data-guid="' + val.termGuid + '"" 
class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick"><span 
title=' + _.escape(name) + '>' + name + '</span><i class="fa fa-close" 
data-id="removeTerm" data-type="term" title="Remove Term"></i></span>';
+                    terms += '<span data-guid="' + val.termGuid + '"" 
class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick"><span 
title=' + name + '>' + name + '</span><i class="fa fa-close" 
data-id="removeTerm" data-type="term" title="Remove Term"></i></span>';
                 });
                 this.ui.termList.find("span.btn").remove();
                 this.ui.termList.prepend(terms);
@@ -407,7 +407,7 @@ define(['require',
                     tagName = $(e.currentTarget).text(),
                     termName = this.data.name;
                 CommonViewFunction.deleteTag(_.extend({}, {
-                    msg: "<div class='ellipsis-with-margin'>Remove: " + "<b>" 
+ _.escape(tagName) + "</b> assignment from" + " " + "<b>" + termName + 
"?</b></div>",
+                    msg: "<div class='ellipsis-with-margin'>Remove: " + "<b>" 
+ _.escape(tagName) + "</b> assignment from" + " " + "<b>" + _.escape(termName) 
+ "?</b></div>",
                     titleMessage: Messages.removeTag,
                     okText: "Remove",
                     showLoader: that.showLoader.bind(that),
@@ -431,7 +431,7 @@ define(['require',
                     selectedGuid: guid,
                     model: that.data,
                     collection: that.glossaryCollection,
-                    msg: "<div class='ellipsis-with-margin'>Remove: " + "<b>" 
+ _.escape(name) + "</b> assignment from" + " " + "<b>" + that.data.name + 
"?</b></div>",
+                    msg: "<div class='ellipsis-with-margin'>Remove: " + "<b>" 
+ _.escape(name) + "</b> assignment from" + " " + "<b>" + 
_.escape(that.data.name) + "?</b></div>",
                     titleMessage: Messages.glossary[that.isTermView ? 
"removeCategoryfromTerm" : "removeTermfromCategory"],
                     isCategoryView: that.isCategoryView,
                     isTermView: that.isTermView,
diff --git a/dashboardv3/public/js/views/graph/LineageLayoutView.js 
b/dashboardv3/public/js/views/graph/LineageLayoutView.js
index 541eb84..4fc3fce 100644
--- a/dashboardv3/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv3/public/js/views/graph/LineageLayoutView.js
@@ -510,9 +510,11 @@ define(['require',
                     "translate(" + this.zoom.translate() + ")" +
                     "scale(" + this.zoom.scale() + ")"
                 );
-                LineageUtils.refreshGraphForIE({
-                    edgeEl: this.$('svg .edgePath')
-                });
+                if (platform.name === "IE") {
+                    LineageUtils.refreshGraphForIE({
+                        edgeEl: this.$('svg .edgePath')
+                    });
+                }
             },
             interpolateZoom: function(translate, scale, that, zoom) {
                 return d3.transition().duration(350).tween("zoom", function() {
@@ -599,7 +601,8 @@ define(['require',
                                     var imagePath = options.imagePath,
                                         ajaxOptions = {
                                             "url": imagePath,
-                                            "method": "get"
+                                            "method": "get",
+                                            "cache": true
                                         }
 
                                     if (platform.name !== "IE") {
diff --git a/dashboardv3/public/js/views/graph/LineageUtils.js 
b/dashboardv3/public/js/views/graph/LineageUtils.js
index d2da39a..e1363a5 100644
--- a/dashboardv3/public/js/views/graph/LineageUtils.js
+++ b/dashboardv3/public/js/views/graph/LineageUtils.js
@@ -231,7 +231,9 @@ define(['require'], function(require) {
                 zoomListener.translate([xa, ya]);
                 zoom.scale(scale);
                 afterCenterZoomed({ newScale: scale, newTranslate: [xa, ya] });
-                LinegaeUtils.refreshGraphForIE({ "edgeEl": edgePathEl })
+                if (platform.name === "IE") {
+                    LinegaeUtils.refreshGraphForIE({ "edgeEl": edgePathEl })
+                }
             }
         }
     }
diff --git a/dashboardv3/public/js/views/search/SearchResultLayoutView.js 
b/dashboardv3/public/js/views/search/SearchResultLayoutView.js
index 45b3f75..cb0c6be 100644
--- a/dashboardv3/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv3/public/js/views/search/SearchResultLayoutView.js
@@ -695,7 +695,8 @@ define(['require',
                                     returnImgUrl = null;
                                 $.ajax({
                                         "url": imagePath,
-                                        "method": "get"
+                                        "method": "get",
+                                        "cache": true
                                     })
                                     .always(function(data, status, xhr) {
                                         if (data.status == 404) {
diff --git a/dashboardv3/public/js/views/search/save/SaveModalLayoutView.js 
b/dashboardv3/public/js/views/search/save/SaveModalLayoutView.js
index 6d788ff..ac31a00 100644
--- a/dashboardv3/public/js/views/search/save/SaveModalLayoutView.js
+++ b/dashboardv3/public/js/views/search/save/SaveModalLayoutView.js
@@ -38,7 +38,7 @@ define(['require',
         },
         templateHelpers: function() {
             return {
-                selectedModel: this.selectedModel ? 
this.selectedModel.toJSON() : null
+                selectedModel: this.selectedModel ? this.selectedModel : null
             };
         },
         events: function() {
@@ -48,6 +48,11 @@ define(['require',
         initialize: function(options) {
             var that = this;
             _.extend(this, _.pick(options, 'selectedModel', 'collection', 
'getValue', 'isBasic', 'saveObj'));
+            if (this.selectedModel) {
+                var modelDetail = this.selectedModel.toJSON();
+                modelDetail.name = _.unescape(modelDetail.name);
+                this.selectedModel = modelDetail;
+            }
 
             this.model = new VSearch();
             if (this.saveObj) {
@@ -82,10 +87,10 @@ define(['require',
         },
         onCreateButton: function(modal) {
             var that = this,
-                obj = { name: this.ui.saveAsName.val ? 
this.ui.saveAsName.val() : null };
+                obj = { name: this.ui.saveAsName.val ? 
_.escape(this.ui.saveAsName.val()) : null };
             if (this.selectedModel) {
                 // Update Name only.
-                var saveObj = this.selectedModel.toJSON();
+                var saveObj = this.selectedModel;
                 saveObj.name = obj.name;
             } else {
                 obj.value = this.getValue();
@@ -111,12 +116,12 @@ define(['require',
                                 collectionRef.set(data);
                             }
                             Utils.notifySuccess({
-                                content: obj.name + Messages.editSuccessMessage
+                                content: _.unescape(obj.name) + 
Messages.editSuccessMessage
                             });
                         } else {
                             that.collection.add(data);
                             Utils.notifySuccess({
-                                content: obj.name + Messages.addSuccessMessage
+                                content: _.unescape(obj.name) + 
Messages.addSuccessMessage
                             });
                         }
                     }

Reply via email to