Commit 105d6b7f by Abhishek Kadam Committed by nixonrodrigues

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

parent e9869cfe
...@@ -49,7 +49,7 @@ define(['require', ...@@ -49,7 +49,7 @@ define(['require',
return this.constructor.nonCrudOperation.call(this, url, 'DELETE', options); return this.constructor.nonCrudOperation.call(this, url, 'DELETE', options);
}, },
deleteTag: function(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); return this.constructor.nonCrudOperation.call(this, url, 'DELETE', options);
}, },
saveTagAttribute: function(options) { saveTagAttribute: function(options) {
......
...@@ -41,11 +41,16 @@ define(['require', 'utils/Enums', 'utils/Utils', 'underscore'], function(require ...@@ -41,11 +41,16 @@ define(['require', 'utils/Enums', 'utils/Utils', 'underscore'], function(require
return this.getDefApiUrl('enum', name); return this.getDefApiUrl('enum', name);
}, },
getDefApiUrl: function(type, name) { getDefApiUrl: function(type, name) {
var defApiUrl = this.typedefsUrl(); var defApiUrl = this.typedefsUrl(), defUrl;
if (name) { if (name) {
return defApiUrl.def + '/name/' + name + '?type=' + type; defUrl = defApiUrl.def + '/name/' + name;
} else { } else {
return defApiUrl.defs + '?excludeInternalTypesAndReferences=true&type=' + type; defUrl = defApiUrl.defs;
}
if (type) {
return defUrl += '?type=' + type;
} else {
return defUrl;
} }
}, },
entitiesApiUrl: function(options) { entitiesApiUrl: function(options) {
......
...@@ -569,14 +569,7 @@ define(['require', ...@@ -569,14 +569,7 @@ define(['require',
}, },
onNotifyOk: function(data) { onNotifyOk: function(data) {
var that = this, var that = this,
deleteTagData = this.collection.fullCollection.findWhere({ name: this.tag }), deleteTagData = this.collection.fullCollection.findWhere({ name: this.tag });
classificationData = deleteTagData.toJSON(),
deleteJson = {
classificationDefs: [classificationData],
entityDefs: [],
enumDefs: [],
structDefs: []
};
deleteTagData.deleteTag({ deleteTagData.deleteTag({
typeName: that.tag, typeName: that.tag,
success: function() { success: function() {
......
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