You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2018/05/03 16:16:26 UTC

[2/2] atlas git commit: ATLAS-2579: UI updates to block selected classifications in lineage edge

ATLAS-2579: UI updates to block selected classifications in lineage edge

Signed-off-by: Madhan Neethiraj <ma...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/4c9d8cba
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/4c9d8cba
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/4c9d8cba

Branch: refs/heads/master
Commit: 4c9d8cba8ce680f7c4f69ad67e56390f33880729
Parents: 08c4986
Author: kevalbhatt <kb...@apache.org>
Authored: Thu May 3 20:32:40 2018 +0530
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Thu May 3 09:16:17 2018 -0700

----------------------------------------------------------------------
 .../js/views/graph/PropagationPropertyModal.js      | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/4c9d8cba/dashboardv2/public/js/views/graph/PropagationPropertyModal.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/graph/PropagationPropertyModal.js b/dashboardv2/public/js/views/graph/PropagationPropertyModal.js
index bb7d1d7..5972ea8 100644
--- a/dashboardv2/public/js/views/graph/PropagationPropertyModal.js
+++ b/dashboardv2/public/js/views/graph/PropagationPropertyModal.js
@@ -91,17 +91,19 @@ define(['require',
             events["change " + this.ui.propagationState] = function(e) {
                 this.modalEdited = true;
                 this.modal.$el.find('button.ok').attr("disabled", false);
-                var entityguid = $(e.currentTarget).parents('tr').data("entityguid");
+                var $el = $(e.currentTarget).parents('tr'),
+                    entityguid = $el.data("entityguid"),
+                    classificationName = $el.find('[data-name]').data('name');
                 if (e.target.checked) {
                     this.propagatedClassifications = _.reject(this.propagatedClassifications, function(val, key) {
-                        if (val.entityGuid == entityguid) {
+                        if (val.entityGuid == entityguid && classificationName == val.typeName) {
                             that.blockedPropagatedClassifications.push(val);
                             return true;
                         }
                     });
                 } else {
                     this.blockedPropagatedClassifications = _.reject(this.blockedPropagatedClassifications, function(val, key) {
-                        if (val.entityGuid == entityguid) {
+                        if (val.entityGuid == entityguid && classificationName == val.typeName) {
                             that.propagatedClassifications.push(val);
                             return true;
                         }
@@ -247,12 +249,8 @@ define(['require',
                 }
             } else {
                 relationshipProp = {
-                    "blockedPropagatedClassifications": _.uniq(this.blockedPropagatedClassifications, function(val, key) {
-                        return val.entityGuid;
-                    }),
-                    "propagatedClassifications": _.uniq(this.propagatedClassifications, function(val, key) {
-                        return val.entityGuid;
-                    })
+                    "blockedPropagatedClassifications": this.blockedPropagatedClassifications,
+                    "propagatedClassifications": this.propagatedClassifications
                 };
             }
             this.showLoader();