Commit 4c9d8cba by kevalbhatt Committed by Madhan Neethiraj

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

parent 08c49867
...@@ -91,17 +91,19 @@ define(['require', ...@@ -91,17 +91,19 @@ define(['require',
events["change " + this.ui.propagationState] = function(e) { events["change " + this.ui.propagationState] = function(e) {
this.modalEdited = true; this.modalEdited = true;
this.modal.$el.find('button.ok').attr("disabled", false); 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) { if (e.target.checked) {
this.propagatedClassifications = _.reject(this.propagatedClassifications, function(val, key) { this.propagatedClassifications = _.reject(this.propagatedClassifications, function(val, key) {
if (val.entityGuid == entityguid) { if (val.entityGuid == entityguid && classificationName == val.typeName) {
that.blockedPropagatedClassifications.push(val); that.blockedPropagatedClassifications.push(val);
return true; return true;
} }
}); });
} else { } else {
this.blockedPropagatedClassifications = _.reject(this.blockedPropagatedClassifications, function(val, key) { this.blockedPropagatedClassifications = _.reject(this.blockedPropagatedClassifications, function(val, key) {
if (val.entityGuid == entityguid) { if (val.entityGuid == entityguid && classificationName == val.typeName) {
that.propagatedClassifications.push(val); that.propagatedClassifications.push(val);
return true; return true;
} }
...@@ -247,12 +249,8 @@ define(['require', ...@@ -247,12 +249,8 @@ define(['require',
} }
} else { } else {
relationshipProp = { relationshipProp = {
"blockedPropagatedClassifications": _.uniq(this.blockedPropagatedClassifications, function(val, key) { "blockedPropagatedClassifications": this.blockedPropagatedClassifications,
return val.entityGuid; "propagatedClassifications": this.propagatedClassifications
}),
"propagatedClassifications": _.uniq(this.propagatedClassifications, function(val, key) {
return val.entityGuid;
})
}; };
} }
this.showLoader(); this.showLoader();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment