ATLAS-2892: DeleteTag UI Fix for the issue of appending type=classification to 
the query string.

Signed-off-by: nixonrodrigues <ni...@apache.org>


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

Branch: refs/heads/branch-1.0
Commit: bb733db4fd0db22d9bfa591e32f858314d8c6cf5
Parents: dd4574e
Author: Abhishek Kadam <abhishek.kada...@gmail.com>
Authored: Fri Oct 12 15:50:39 2018 +0530
Committer: Ashutosh Mestry <ames...@hortonworks.com>
Committed: Thu Nov 1 15:42:57 2018 -0700

----------------------------------------------------------------------
 dashboardv2/public/js/models/VTag.js             |  2 +-
 dashboardv2/public/js/utils/UrlLinks.js          | 11 ++++++++---
 dashboardv2/public/js/views/tag/TagLayoutView.js |  9 +--------
 3 files changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/bb733db4/dashboardv2/public/js/models/VTag.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/models/VTag.js 
b/dashboardv2/public/js/models/VTag.js
index d436bb5..bde77e9 100644
--- a/dashboardv2/public/js/models/VTag.js
+++ b/dashboardv2/public/js/models/VTag.js
@@ -49,7 +49,7 @@ define(['require',
             return this.constructor.nonCrudOperation.call(this, url, 'DELETE', 
options);
         },
         deleteTag: function(options) {
-            var url = UrlLinks.classificationDefApiUrl(options.typeName);
+            var url = UrlLinks.getDefApiUrl(null, options.typeName);
             return this.constructor.nonCrudOperation.call(this, url, 'DELETE', 
options);
         },
         saveTagAttribute: function(options) {

http://git-wip-us.apache.org/repos/asf/atlas/blob/bb733db4/dashboardv2/public/js/utils/UrlLinks.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/UrlLinks.js 
b/dashboardv2/public/js/utils/UrlLinks.js
index d3d2a58..b2ae619 100644
--- a/dashboardv2/public/js/utils/UrlLinks.js
+++ b/dashboardv2/public/js/utils/UrlLinks.js
@@ -41,11 +41,16 @@ define(['require', 'utils/Enums', 'utils/Utils', 
'underscore'], function(require
             return this.getDefApiUrl('enum', name);
         },
         getDefApiUrl: function(type, name) {
-            var defApiUrl = this.typedefsUrl();
+            var defApiUrl = this.typedefsUrl(), defUrl;
             if (name) {
-                return defApiUrl.def + '/name/' + name + '?type=' + type;
+                defUrl = defApiUrl.def + '/name/' + name;
             } else {
-                return defApiUrl.defs + 
'?excludeInternalTypesAndReferences=true&type=' + type;
+                defUrl = defApiUrl.defs;
+            }
+            if (type) {
+                return defUrl += '?type=' + type;
+            } else {
+                return defUrl;
             }
         },
         entitiesApiUrl: function(options) {

http://git-wip-us.apache.org/repos/asf/atlas/blob/bb733db4/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 a5df515..2869656 100644
--- a/dashboardv2/public/js/views/tag/TagLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagLayoutView.js
@@ -569,14 +569,7 @@ define(['require',
             },
             onNotifyOk: function(data) {
                 var that = this,
-                    deleteTagData = this.collection.fullCollection.findWhere({ 
name: this.tag }),
-                    classificationData = deleteTagData.toJSON(),
-                    deleteJson = {
-                        classificationDefs: [classificationData],
-                        entityDefs: [],
-                        enumDefs: [],
-                        structDefs: []
-                    };
+                    deleteTagData = this.collection.fullCollection.findWhere({ 
name: this.tag });
                 deleteTagData.deleteTag({
                     typeName: that.tag,
                     success: function() {

Reply via email to