Repository: atlas Updated Branches: refs/heads/master 6e02ec5b3 -> 65c6f9c8e
ATLAS-2504 : UI , Tag propagation : When an entity has the same tag propagated and directly associated , update window shows the values of propagated tags. Signed-off-by: nixonrodrigues <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/6ad7a5a8 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/6ad7a5a8 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/6ad7a5a8 Branch: refs/heads/master Commit: 6ad7a5a86b9877d8f5958d3a6b696b2f07a9282d Parents: 6e02ec5 Author: pratik24mac <[email protected]> Authored: Mon Mar 19 15:32:41 2018 +0530 Committer: nixonrodrigues <[email protected]> Committed: Wed Mar 21 20:13:20 2018 +0530 ---------------------------------------------------------------------- .../public/js/views/tag/TagDetailTableLayoutView.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/6ad7a5a8/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js index 2296dad..9125fc8 100644 --- a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js +++ b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js @@ -119,8 +119,8 @@ define(['require', sortable: false, formatter: _.extend({}, Backgrid.CellFormatter.prototype, { fromRaw: function(rawValue, model) { - if (that.guid !== model.get('entityGuid') ) { - var propagtedFrom = ' <span class="btn btn-action btn-sm btn-icon btn-blue" title="Propagated From" data-guid='+ model.get('entityGuid') +' data-id="propagatedFromClick"><span> Propagated From </span></span>'; + if (that.guid !== model.get('entityGuid')) { + var propagtedFrom = ' <span class="btn btn-action btn-sm btn-icon btn-blue" title="Propagated From" data-guid=' + model.get('entityGuid') + ' data-id="propagatedFromClick"><span> Propagated From </span></span>'; return '<a title="" href="#!/tag/tagAttribute/' + model.get('typeName') + '">' + model.get('typeName') + '</a>' + propagtedFrom; } else { return '<a title="' + model.get('typeName') + '" href="#!/tag/tagAttribute/' + model.get('typeName') + '">' + model.get('typeName') + '</a>'; @@ -233,7 +233,9 @@ define(['require', editTagDataModal: function(e) { var that = this, tagName = $(e.currentTarget).data('name'), - tagModel = _.findWhere(that.collectionObject.classifications, { typeName: tagName }); + tagModel = _.find(that.collectionObject.classifications, function(tag) { + return (tagName === tag.typeName && that.guid === tag.entityGuid); + }); require([ 'views/tag/AddTagModalView' ], function(AddTagModalView) { @@ -256,10 +258,10 @@ define(['require', if (e.target.checked) { that.tagCollection.reset(tags); } else { - unPropagatedTags = _.filter(tags,function(val){ - return that.guid === val.entityGuid; + unPropagatedTags = _.filter(tags, function(val) { + return that.guid === val.entityGuid; }); - that.tagCollection.reset(unPropagatedTags); + that.tagCollection.reset(unPropagatedTags); } } });
