atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kbh...@apache.org
Subject incubator-atlas git commit: ATLAS-1559 : Regression - If a new tag is created then the earlier tags doesn't render properly
Date Wed, 15 Feb 2017 12:06:10 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master 42de59132 -> 58bbee4ce


ATLAS-1559 : Regression - If a new tag is created then the earlier tags doesn't render properly


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

Branch: refs/heads/master
Commit: 58bbee4ce1083c63a1f263b38daa0d5be776fa83
Parents: 42de591
Author: kevalbhatt <kbhatt@apache.org>
Authored: Wed Feb 15 15:39:34 2017 +0530
Committer: kevalbhatt <kbhatt@apache.org>
Committed: Wed Feb 15 17:33:31 2017 +0530

----------------------------------------------------------------------
 .../js/views/search/SearchResultLayoutView.js   | 15 ++++++++++--
 .../views/tag/TagAttributeDetailLayoutView.js   | 25 ++++++++++----------
 .../public/js/views/tag/TagLayoutView.js        |  4 ++--
 release-log.txt                                 |  3 +++
 4 files changed, 31 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/58bbee4c/dashboardv2/public/js/views/search/SearchResultLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 30453c4..71319b9 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -179,8 +179,18 @@ define(['require',
                         this.$('.searchResult').find(".inputAssignTag.multiSelectTag").hide();
                     }
                 });
-                this.listenTo(this.searchCollection, "error", function(value, responseData)
{
+                this.listenTo(this.searchCollection, "error", function(model, response) {
                     this.$('.fontLoader').hide();
+                    var responseJSON = response ? response.responseJSON : response;
+                    if (response && responseJSON && (responseJSON.errorMessage
|| responseJSON.message || responseJSON.error)) {
+                        Utils.notifyError({
+                            content: responseJSON.errorMessage || responseJSON.message ||
responseJSON.error
+                        });
+                    } else {
+                        Utils.notifyError({
+                            content: "Invalid Expression : " + model.queryParams.query
+                        });
+                    }
                 }, this);
             },
             onRender: function() {
@@ -217,7 +227,7 @@ define(['require',
                     return;
                 }
                 this.showLoader();
-                if (Globals.searchApiCallRef) {
+                if (Globals.searchApiCallRef && Globals.searchApiCallRef.readyState
=== 1) {
                     Globals.searchApiCallRef.abort();
                 }
                 $.extend(this.searchCollection.queryParams, { limit: this.limit });
@@ -233,6 +243,7 @@ define(['require',
                     _.extend(this.searchCollection.queryParams, { 'query': value.query.trim()
});
                 }
                 Globals.searchApiCallRef = this.searchCollection.fetch({
+                    skipDefaultError: true,
                     success: function() {
                         if (that.searchCollection.models.length < that.limit) {
                             that.ui.nextData.attr('disabled', true);

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/58bbee4c/dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js b/dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
index 0101646..49ab735 100644
--- a/dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
@@ -50,7 +50,7 @@ define(['require',
             /** ui events hash */
             events: function() {
                 var events = {};
-                events["click " + this.ui.addTagListBtn] = 'onClickAddTagBtn';
+                events["click " + this.ui.addTagListBtn] = 'onClickAddTagAttributeBtn';
                 events["click " + this.ui.editButton] = 'onEditButton';
                 return events;
             },
@@ -63,15 +63,16 @@ define(['require',
             },
             bindEvents: function() {
                 this.listenTo(this.collection, 'reset', function() {
-                    this.model = this.collection.fullCollection.findWhere({ name: this.tag
});
-                    /// this.model = this.collection.fullCollection.findWhere({ typeName:
$(".dataTypeSelector").val() });
-                    if (this.model) {
-                        this.renderTagDetail();
-                    } else {
-                        this.$('.fontLoader').hide();
-                        Utils.notifyError({
-                            content: 'Tag Not Found'
-                        });
+                    if (!this.model) {
+                        this.model = this.collection.fullCollection.findWhere({ name: this.tag
});
+                        if (this.model) {
+                            this.renderTagDetail();
+                        } else {
+                            this.$('.fontLoader').hide();
+                            Utils.notifyError({
+                                content: 'Tag Not Found'
+                            });
+                        }
                     }
                 }, this);
                 this.listenTo(this.tagCollection, 'error', function(error, response) {
@@ -149,7 +150,7 @@ define(['require',
                     }),
                     success: function(model, response) {
                         if (model.classificationDefs) {
-                            that.model.set(model.classificationDefs[0], { merge: true });
+                            that.model.set(model.classificationDefs[0]);
                         }
                         that.renderTagDetail();
                         Utils.notifySuccess({
@@ -159,7 +160,7 @@ define(['require',
                     }
                 });
             },
-            onClickAddTagBtn: function(e) {
+            onClickAddTagAttributeBtn: function(e) {
                 var that = this;
                 require(['views/tag/AddTagAttributeView',
                         'modules/Modal'

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/58bbee4c/dashboardv2/public/js/views/tag/TagLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/tag/TagLayoutView.js b/dashboardv2/public/js/views/tag/TagLayoutView.js
index a1e7ca5..87967c5 100644
--- a/dashboardv2/public/js/views/tag/TagLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagLayoutView.js
@@ -62,7 +62,7 @@ define(['require',
             },
             bindEvents: function() {
                 var that = this;
-                this.listenTo(this.collection, "reset", function() {
+                this.listenTo(this.collection, "reset add", function() {
                     this.tagsAndTypeGenerator('collection');
                 }, this);
                 this.ui.tagsParent.on('click', 'li.parent-node a', function() {
@@ -256,7 +256,7 @@ define(['require',
                     success: function(model, response) {
                         that.ui.createTag.removeAttr("disabled");
                         that.createTag = true;
-                        that.collection.reset(model.get('classificationDefs'));
+                        that.collection.add(model.get('classificationDefs'));
                         that.setUrl('#!/tag/tagAttribute/' + ref.ui.tagName.val(), true);
                         Utils.notifySuccess({
                             content: "Tag " + that.name + Messages.addSuccessMessage

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/58bbee4c/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index f3bbc06..38b85fb 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,7 +9,10 @@ ATLAS-1060 Add composite indexes for exact match performance improvements
for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1559 Regression - If a new tag is created then the earlier tags doesn't render properly
(kevalbhatt)
 ATLAS-1508 Make AtlasADAuthenticationProvider like Ranger ADLdap Methods (gss2002 via mneethiraj)
+ATLAS-1547 Add tests for DeleteHandlerV1 (sumasai via mneethiraj)
+ATLAS-1557 IDBased resolver should attempt unique-attribute match as well (mneethiraj)
 ATLAS-1555 Move classification endpoint from Entities API to Entity API and remove Entities
API (svimal2106)
 ATLAS-1548 Create entity : Change PUT and POST object structure based on new API Changes
(kevalbhatt)
 ATLAS-1522 entity type attributes (like hive_table.sd, hive_table.columns) should use AtlasObjectId
as value instead of entire entity contents (mneethiraj)


Mime
View raw message