Commit 49453f28 by kalyanikk Committed by Madhan Neethiraj

ATLAS-1437: UI update to disallow tag association changes to deleted entities

parent cc08c517
...@@ -310,6 +310,11 @@ ul { ...@@ -310,6 +310,11 @@ ul {
display: none; display: none;
} }
} }
button {
&.editbutton[data-id="editButton"] {
display: none;
}
}
} }
@media (min-width: 768px) { @media (min-width: 768px) {
......
...@@ -15,14 +15,13 @@ ...@@ -15,14 +15,13 @@
* limitations under the License. * limitations under the License.
--> -->
<form name="tagDefinitionform" class="css-form" onsubmit="return false;"> <form name="tagDefinitionform" class="css-form" onsubmit="return false;">
<!-- <h4 style="margin-bottom:30px">Add Term</h4> -->
<div class="form-group"> <div class="form-group">
{{#if defaultTerm}} {{#if defaultTerm}}
<input class="form-control" data-id="termName" placeholder="Enter Taxonomy Name" autofocus> <input class="form-control" data-id="termName" placeholder="Enter Taxonomy Name" autofocus>
<p class='alertTerm' style='display:none'>Taxonomy name should not have spaces</p> <p class='alertTerm' style='display:none'>Taxonomy name should not have spaces</p>
{{else}} {{else}}
<input class="form-control" data-id="termName" placeholder="Name(Required)" autofocus> <input class="form-control" data-id="termName" placeholder="Name(Required)" autofocus>
<p class='alertTerm' style='display:none'>Term name should not have spaces</p> <p class='alertTerm' style='display:none'>Term name should not have spaces</p>
{{/if}} {{/if}}
</div> </div>
<div class="form-group"> <div class="form-group">
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
<a target="_blank" href="http://atlas.incubator.apache.org/"><i class="fa fa-question-circle"></i></a> <a target="_blank" href="http://atlas.incubator.apache.org/"><i class="fa fa-question-circle"></i></a>
<a href="javascript:void(0);" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user user-circle"></i><span class="userName"></span></a> <a href="javascript:void(0);" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user user-circle"></i><span class="userName"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<!-- <li><a href="#">Edit Profile</a></li>
<li><a href="#">Change Password</a></li> -->
<li class="aboutAtlas"><a href="javascript:void(0)">About</a></li> <li class="aboutAtlas"><a href="javascript:void(0)">About</a></li>
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
<li><a href="logout.html"><i class="fa fa-sign-out"></i>Logout</a></li> <li><a href="logout.html"><i class="fa fa-sign-out"></i>Logout</a></li>
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
* limitations under the License. * limitations under the License.
--> -->
<form name="entityDefinitionform" class="css-form"> <form name="entityDefinitionform" class="css-form">
<!-- <h4 style="margin-bottom:30px"></h4> -->
<div class="form-group"> <div class="form-group">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="row"> <div class="row">
......
...@@ -14,9 +14,6 @@ ...@@ -14,9 +14,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
--> -->
<!-- <div class="panel-heading">
<h3 class="panel-title">Lineage</h3>
</div> -->
<div class="panel-body graph-bg resize-graph" align="center"> <div class="panel-body graph-bg resize-graph" align="center">
<div class="graph" id="tree-container"> <div class="graph" id="tree-container">
</div> </div>
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
<a target="_blank" href="http://atlas.incubator.apache.org/"><i class="fa fa-question-circle"></i></a> <a target="_blank" href="http://atlas.incubator.apache.org/"><i class="fa fa-question-circle"></i></a>
<a href="javascript:void(0);" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="user-dropdown"><i class="fa fa-user user-circle "></i><span class="userName"></span></a> <a href="javascript:void(0);" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="user-dropdown"><i class="fa fa-user user-circle "></i><span class="userName"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<!-- <li><a href="#">Edit Profile</a></li>
<li><a href="#">Change Password</a></li> -->
<li class="aboutAtlas"><a href="javascript:void(0)">About</a></li> <li class="aboutAtlas"><a href="javascript:void(0)">About</a></li>
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
<li> <li>
......
...@@ -15,9 +15,8 @@ ...@@ -15,9 +15,8 @@
* limitations under the License. * limitations under the License.
--> -->
<div> <div>
<!-- <button class="add-tag btn btn-success pull-right" data-id="addTag" style="margin-bottom:10px">Add Tag</button> -->
</div> </div>
<div class="fontLoader"> <div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i> <i class="fa fa-refresh fa-spin-custom"></i>
</div> </div>
<div id="r_tagTermTableLayoutView"></div> <div id="r_tagTermTableLayoutView"></div>
\ No newline at end of file
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
* limitations under the License. * limitations under the License.
--> -->
<form name="tagDefinitionform" class="css-form" data-id="createTagForm"> <form name="tagDefinitionform" class="css-form" data-id="createTagForm">
<!-- <h4 style="margin-bottom:30px"></h4> -->
<div class="form-group"> <div class="form-group">
{{#if create}} {{#if create}}
<input class="form-control row-margin-bottom" data-id="tagName" placeholder="Name(required)" autofocus> <input class="form-control row-margin-bottom" data-id="tagName" placeholder="Name(required)" autofocus>
......
...@@ -80,7 +80,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -80,7 +80,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
success: function(data) { success: function(data) {
var value = "", var value = "",
deleteButton = ""; deleteButton = "";
if (data && data.attributes) { if (data && data.attributes) {
if (data.attributes.name) { if (data.attributes.name) {
value = data.attributes.name; value = data.attributes.name;
...@@ -92,11 +91,10 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -92,11 +91,10 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
} }
var id = ""; var id = "";
if (data.guid) { if (data.guid) {
if (Enums.entityStateReadOnly[data.attributes.state]) { if (Enums.entityStateReadOnly[data.status]) {
deleteButton += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'; deleteButton += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
} }
id = data.guid; id = data.guid;
} }
if (value.length > 1) { if (value.length > 1) {
scope.$('td div[data-id="' + id + '"]').html('<a href="#!/detailPage/' + id + '">' + _.escape(value) + '</a>'); scope.$('td div[data-id="' + id + '"]').html('<a href="#!/detailPage/' + id + '">' + _.escape(value) + '</a>');
...@@ -131,6 +129,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -131,6 +129,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
id = inputOutputField.guid || inputOutputField.id, id = inputOutputField.guid || inputOutputField.id,
tempLink = "", tempLink = "",
readOnly = false; readOnly = false;
if (Enums.entityStateReadOnly[inputOutputField.status]) {
readOnly = inputOutputField.status
}
if (_.isString(inputOutputField) || _.isBoolean(inputOutputField) || _.isNumber(inputOutputField)) { if (_.isString(inputOutputField) || _.isBoolean(inputOutputField) || _.isNumber(inputOutputField)) {
if (inputOutputField.indexOf("$") == -1) { if (inputOutputField.indexOf("$") == -1) {
valueOfArray.push('<span>' + _.escape(inputOutputField) + '</span>'); valueOfArray.push('<span>' + _.escape(inputOutputField) + '</span>');
...@@ -169,7 +170,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -169,7 +170,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
tempLink += '<div data-id="' + fetchId + '"></div>'; tempLink += '<div data-id="' + fetchId + '"></div>';
} }
} }
if (readOnly) { if (readOnly) {
if (!fetch) { if (!fetch) {
tempLink += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'; tempLink += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
...@@ -364,10 +364,10 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -364,10 +364,10 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
require(['models/VCatalog'], function(Vcatalog) { require(['models/VCatalog'], function(Vcatalog) {
var VCatalog = new Vcatalog(); var VCatalog = new Vcatalog();
var name = options.termName; var name = options.termName;
++that.asyncFetchCounter;
VCatalog.url = function() { VCatalog.url = function() {
return "api/atlas/v1/entities/" + options.guid + "/tags/" + name; return "api/atlas/v1/entities/" + options.guid + "/tags/" + name;
}; };
++that.asyncFetchCounter;
VCatalog.save(null, { VCatalog.save(null, {
success: function(data) { success: function(data) {
Utils.notifySuccess({ Utils.notifySuccess({
......
...@@ -20,8 +20,6 @@ define(['require'], function(require) { ...@@ -20,8 +20,6 @@ define(['require'], function(require) {
'use strict'; 'use strict';
var Globals = {}; var Globals = {};
//Globals.baseURL = '/api/atlas';
Globals.settings = {}; Globals.settings = {};
Globals.settings.PAGE_SIZE = 25; Globals.settings.PAGE_SIZE = 25;
Globals.saveApplicationState = { Globals.saveApplicationState = {
...@@ -38,6 +36,5 @@ define(['require'], function(require) { ...@@ -38,6 +36,5 @@ define(['require'], function(require) {
status: false, status: false,
response: {} response: {}
} }
return Globals; return Globals;
}); });
...@@ -33,7 +33,8 @@ define(['require'], function(require) { ...@@ -33,7 +33,8 @@ define(['require'], function(require) {
addAttributeSuccessMessage: "Tag attribute is added successfully", addAttributeSuccessMessage: "Tag attribute is added successfully",
updateTagDescriptionMessage: "Tag description is updated successfully", updateTagDescriptionMessage: "Tag description is updated successfully",
updateTermDescriptionMessage: "Term description is updated successfully", updateTermDescriptionMessage: "Term description is updated successfully",
editSuccessMessage: " has been updated successfully" editSuccessMessage: " has been updated successfully",
assignDeletedEntity: " entity is deleted, Tag cannot be assign"
}; };
return Messages; return Messages;
}); });
...@@ -181,30 +181,6 @@ define(['require', ...@@ -181,30 +181,6 @@ define(['require',
this.collection.trigger("sort"); this.collection.trigger("sort");
}); });
/*this.listenTo(this.collection, 'remove', function(model, collection, response){
if (model.isNew() || !this.includePagination) {
return;
}
if (this.collection.state && this.collection.state.totalRecords>0) {
this.collection.state.totalRecords-=1;
}
if (this.collection.length===0 && this.collection.state && this.collection.state.totalRecords>0) {
if (this.collection.state.totalRecords>this.collection.state.currentPage*this.collection.state.pageSize) {
this.collection.fetch({reset:true});
} else {
if (this.collection.state.currentPage>0) {
this.collection.state.currentPage-=1;
this.collection.fetch({reset:true});
}
}
} else if (this.collection.length===0 && this.collection.state && this.collection.state.totalRecords===0) {
this.collection.state.currentPage=0;
this.collection.fetch({reset:true});
}
}, this);*/
// It will show tool tip when td has ellipsis Property // It will show tool tip when td has ellipsis Property
this.listenTo(this.collection, "backgrid:refresh", function() { this.listenTo(this.collection, "backgrid:refresh", function() {
/*this.$('.table td').bind('mouseenter', function() { /*this.$('.table td').bind('mouseenter', function() {
......
...@@ -39,7 +39,6 @@ define(['require', ...@@ -39,7 +39,6 @@ define(['require',
/** ui selector cache */ /** ui selector cache */
ui: { ui: {
auditValue: "[data-id='auditValue']",
auditCreate: "[data-id='auditCreate']", auditCreate: "[data-id='auditCreate']",
previousAuditData: "[data-id='previousAuditData']", previousAuditData: "[data-id='previousAuditData']",
nextAuditData: "[data-id='nextAuditData']", nextAuditData: "[data-id='nextAuditData']",
...@@ -80,8 +79,6 @@ define(['require', ...@@ -80,8 +79,6 @@ define(['require',
}; };
this.currPage = 1; this.currPage = 1;
this.bindEvents(); this.bindEvents();
// this.pageFrom = 1;
// this.pageTo = this.count;
}, },
onRender: function() { onRender: function() {
$.extend(this.entityCollection.queryParams, { count: this.count }); $.extend(this.entityCollection.queryParams, { count: this.count });
......
...@@ -23,8 +23,9 @@ define(['require', ...@@ -23,8 +23,9 @@ define(['require',
'modules/Modal', 'modules/Modal',
'collection/VCatalogList', 'collection/VCatalogList',
'utils/CommonViewFunction', 'utils/CommonViewFunction',
'utils/Messages' 'utils/Messages',
], function(require, Backbone, AddTermToEntityLayoutViewTmpl, Utils, Modal, VCatalogList, CommonViewFunction, Messages) { 'utils/Enums'
], function(require, Backbone, AddTermToEntityLayoutViewTmpl, Utils, Modal, VCatalogList, CommonViewFunction, Messages, Enums) {
'use strict'; 'use strict';
var AddTermToEntityLayoutView = Backbone.Marionette.LayoutView.extend( var AddTermToEntityLayoutView = Backbone.Marionette.LayoutView.extend(
...@@ -50,7 +51,7 @@ define(['require', ...@@ -50,7 +51,7 @@ define(['require',
* @constructs * @constructs
*/ */
initialize: function(options) { initialize: function(options) {
_.extend(this, _.pick(options, 'guid', 'modalCollection', 'callback', 'multiple', 'showLoader')); _.extend(this, _.pick(options, 'guid', 'modalCollection', 'callback', 'multiple', 'showLoader', 'hideLoader'));
this.vCatalogList = new VCatalogList(); this.vCatalogList = new VCatalogList();
var that = this; var that = this;
this.modal = new Modal({ this.modal = new Modal({
...@@ -73,9 +74,21 @@ define(['require', ...@@ -73,9 +74,21 @@ define(['require',
} }
var obj = { var obj = {
termName: termName, termName: termName,
guid: that.multiple[i].id.id guid: that.multiple[i].id.id,
deletedEntity: Enums.entityStateReadOnly[that.multiple[i].id.state],
entityName: that.multiple[i].model.get('name')
}; };
CommonViewFunction.saveTermToAsset(obj, that); if (obj.deletedEntity) {
Utils.notifyError({
content: obj.entityName + Messages.assignDeletedEntity
});
if (that.multiple.length === 1 || (that.multiple.length == (i + 1) && that.asyncFetchCounter == 0)) {
that.hideLoader();
}
} else {
CommonViewFunction.saveTermToAsset(obj, that);
}
} }
} else { } else {
that.asyncFetchCounter = 0; that.asyncFetchCounter = 0;
......
...@@ -31,7 +31,6 @@ define(['require', ...@@ -31,7 +31,6 @@ define(['require',
initialize: function(options) { initialize: function(options) {
_.extend(this, _.pick(options, 'globalVent', 'url', 'collection')); _.extend(this, _.pick(options, 'globalVent', 'url', 'collection'));
this.value = []; this.value = [];
}, },
/** /**
* After Page Render createBrudCrum called. * After Page Render createBrudCrum called.
......
...@@ -67,7 +67,9 @@ define(['require', ...@@ -67,7 +67,9 @@ define(['require',
/** ui events hash */ /** ui events hash */
events: function() { events: function() {
var events = {}; var events = {};
events["click " + this.ui.editButton] = 'onClickEditEntity'; if (Globals.entityCrud) {
events["click " + this.ui.editButton] = 'onClickEditEntity';
}
events["click " + this.ui.tagClick] = function(e) { events["click " + this.ui.tagClick] = function(e) {
if (e.target.nodeName.toLocaleLowerCase() != "i") { if (e.target.nodeName.toLocaleLowerCase() != "i") {
var scope = $(e.currentTarget); var scope = $(e.currentTarget);
...@@ -111,9 +113,15 @@ define(['require', ...@@ -111,9 +113,15 @@ define(['require',
var collectionJSON = this.collection.first().toJSON(); var collectionJSON = this.collection.first().toJSON();
if (collectionJSON && collectionJSON.guid) { if (collectionJSON && collectionJSON.guid) {
var tagGuid = collectionJSON.guid; var tagGuid = collectionJSON.guid;
this.readOnly = Enums.entityStateReadOnly[collectionJSON.status];
} else { } else {
var tagGuid = this.id; var tagGuid = this.id;
} }
if (this.readOnly) {
this.$el.addClass('readOnly');
} else {
this.$el.removeClass('readOnly');
}
if (collectionJSON) { if (collectionJSON) {
if (collectionJSON.attributes) { if (collectionJSON.attributes) {
if (collectionJSON.attributes.name) { if (collectionJSON.attributes.name) {
......
...@@ -209,9 +209,7 @@ define(['require', ...@@ -209,9 +209,7 @@ define(['require',
if (value && (value.query === undefined || value.query.trim() === "")) { if (value && (value.query === undefined || value.query.trim() === "")) {
return; return;
} }
this.$('.fontLoader').show(); this.showLoader();
this.$('.searchTable').hide();
this.$('.searchResult').hide();
if (Globals.searchApiCallRef) { if (Globals.searchApiCallRef) {
Globals.searchApiCallRef.abort(); Globals.searchApiCallRef.abort();
} }
...@@ -312,9 +310,7 @@ define(['require', ...@@ -312,9 +310,7 @@ define(['require',
checkTableFetch: function() { checkTableFetch: function() {
if (this.asyncFetchCounter <= 0) { if (this.asyncFetchCounter <= 0) {
this.$('div[data-id="r_tableSpinner"]').removeClass('show'); this.$('div[data-id="r_tableSpinner"]').removeClass('show');
this.$('.fontLoader').hide(); this.hideLoader();
this.$('.searchTable').show();
this.$('.searchResult').show();
} }
}, },
getEntityTableColumns: function() { getEntityTableColumns: function() {
...@@ -453,7 +449,9 @@ define(['require', ...@@ -453,7 +449,9 @@ define(['require',
nameHtml += '<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'; nameHtml += '<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
return '<div class="readOnly readOnlyLink">' + nameHtml + '</div>'; return '<div class="readOnly readOnlyLink">' + nameHtml + '</div>';
} else { } else {
nameHtml += '<button title="Edit" data-id="editEntityButton" data-giud= "' + (model.get('$id$').id || model.get('$id$')) + '" class="btn btn-atlasAction btn-atlas editBtn"><i class="fa fa-pencil"></i></button>' if (Globals.entityCrud) {
nameHtml += '<button title="Edit" data-id="editEntityButton" data-giud= "' + (model.get('$id$').id || model.get('$id$')) + '" class="btn btn-atlasAction btn-atlas editBtn"><i class="fa fa-pencil"></i></button>'
}
return nameHtml; return nameHtml;
} }
} }
...@@ -563,16 +561,24 @@ define(['require', ...@@ -563,16 +561,24 @@ define(['require',
that.fetchCollection(); that.fetchCollection();
that.arr = []; that.arr = [];
}, },
showLoader: function() { showLoader: that.showLoader.bind(that),
that.$('.fontLoader').show(); hideLoader: that.hideLoader.bind(that)
that.$('.searchTable').hide();
}
}); });
// view.saveTagData = function() { // view.saveTagData = function() {
//override saveTagData function //override saveTagData function
// } // }
}); });
}, },
showLoader: function() {
this.$('.fontLoader').show();
this.$('.searchTable').hide();
this.$('.searchResult').hide();
},
hideLoader: function() {
this.$('.fontLoader').hide();
this.$('.searchTable').show();
this.$('.searchResult').show();
},
checkedValue: function(e) { checkedValue: function(e) {
var guid = "", var guid = "",
that = this; that = this;
...@@ -605,10 +611,8 @@ define(['require', ...@@ -605,10 +611,8 @@ define(['require',
that.fetchCollection(); that.fetchCollection();
that.arr = []; that.arr = [];
}, },
showLoader: function() { showLoader: that.showLoader.bind(that),
that.$('.fontLoader').show(); hideLoader: that.hideLoader.bind(that)
that.$('.searchTable').hide();
}
}); });
}); });
}, },
......
...@@ -72,9 +72,7 @@ define(['require', ...@@ -72,9 +72,7 @@ define(['require',
collection: that.collection collection: that.collection
})); }));
}); });
}, }
}); });
return TagDetailLayoutView; return TagDetailLayoutView;
}); });
...@@ -19,13 +19,11 @@ ...@@ -19,13 +19,11 @@
define(['require', define(['require',
'backbone', 'backbone',
'hbs!tmpl/tag/TagLayoutView_tmpl', 'hbs!tmpl/tag/TagLayoutView_tmpl',
'collection/VTagList',
'collection/VEntityList',
'utils/Utils', 'utils/Utils',
'utils/Messages', 'utils/Messages',
'utils/Globals', 'utils/Globals',
'utils/UrlLinks' 'utils/UrlLinks'
], function(require, Backbone, TagLayoutViewTmpl, VTagList, VEntityList, Utils, Messages, Globals, UrlLinks) { ], function(require, Backbone, TagLayoutViewTmpl, Utils, Messages, Globals, UrlLinks) {
'use strict'; 'use strict';
var TagLayoutView = Backbone.Marionette.LayoutView.extend( var TagLayoutView = Backbone.Marionette.LayoutView.extend(
...@@ -44,7 +42,6 @@ define(['require', ...@@ -44,7 +42,6 @@ define(['require',
createTag: "[data-id='createTag']", createTag: "[data-id='createTag']",
tags: "[data-id='tags']", tags: "[data-id='tags']",
offLineSearchTag: "[data-id='offlineSearchTag']", offLineSearchTag: "[data-id='offlineSearchTag']",
deleteTerm: "[data-id='deleteTerm']",
refreshTag: '[data-id="refreshTag"]' refreshTag: '[data-id="refreshTag"]'
}, },
/** ui events hash */ /** ui events hash */
...@@ -53,7 +50,6 @@ define(['require', ...@@ -53,7 +50,6 @@ define(['require',
events["click " + this.ui.createTag] = 'onClickCreateTag'; events["click " + this.ui.createTag] = 'onClickCreateTag';
events["click " + this.ui.tags] = 'onTagList'; events["click " + this.ui.tags] = 'onTagList';
events["keyup " + this.ui.offLineSearchTag] = 'offlineSearchTag'; events["keyup " + this.ui.offLineSearchTag] = 'offlineSearchTag';
events["click " + this.ui.deleteTerm] = 'onDeleteTerm';
events['click ' + this.ui.refreshTag] = 'fetchCollections'; events['click ' + this.ui.refreshTag] = 'fetchCollections';
return events; return events;
}, },
...@@ -265,7 +261,6 @@ define(['require', ...@@ -265,7 +261,6 @@ define(['require',
} }
}); });
}, },
setUrl: function(url, create) { setUrl: function(url, create) {
Utils.setUrl({ Utils.setUrl({
url: url, url: url,
...@@ -277,10 +272,6 @@ define(['require', ...@@ -277,10 +272,6 @@ define(['require',
}); });
}, },
onTagList: function(e, toggle) { onTagList: function(e, toggle) {
/*if (toggle) {
var assetUl = $(e.currentTarget).siblings('.tagAsset')
assetUl.slideToggle("slow");
}*/
this.ui.tagsParent.find('li').removeClass("active"); this.ui.tagsParent.find('li').removeClass("active");
$(e.currentTarget).addClass("active"); $(e.currentTarget).addClass("active");
}, },
......
...@@ -23,8 +23,10 @@ define(['require', ...@@ -23,8 +23,10 @@ define(['require',
'modules/Modal', 'modules/Modal',
'models/VEntity', 'models/VEntity',
'utils/Utils', 'utils/Utils',
'utils/UrlLinks' 'utils/UrlLinks',
], function(require, AddTagModalViewTmpl, VTagList, VCommonList, Modal, VEntity, Utils, UrlLinks) { 'utils/Enums',
'utils/Messages',
], function(require, AddTagModalViewTmpl, VTagList, VCommonList, Modal, VEntity, Utils, UrlLinks, Enums, Messages) {
'use strict'; 'use strict';
var AddTagModel = Marionette.LayoutView.extend({ var AddTagModel = Marionette.LayoutView.extend({
...@@ -46,7 +48,7 @@ define(['require', ...@@ -46,7 +48,7 @@ define(['require',
*/ */
initialize: function(options) { initialize: function(options) {
var that = this; var that = this;
_.extend(this, _.pick(options, 'vent', 'modalCollection', 'guid', 'callback', 'multiple', 'showLoader')); _.extend(this, _.pick(options, 'vent', 'modalCollection', 'guid', 'callback', 'multiple', 'showLoader', 'hideLoader'));
this.collection = new VTagList(); this.collection = new VTagList();
this.commonCollection = new VTagList(); this.commonCollection = new VTagList();
this.asyncAttrFetchCounter = 0; this.asyncAttrFetchCounter = 0;
...@@ -76,9 +78,20 @@ define(['require', ...@@ -76,9 +78,20 @@ define(['require',
var obj = { var obj = {
tagName: tagName, tagName: tagName,
tagAttributes: tagAttributes, tagAttributes: tagAttributes,
guid: (_.isObject(that.multiple[i].id) ? that.multiple[i].id.id : that.multiple[i].id) guid: (_.isObject(that.multiple[i].id) ? that.multiple[i].id.id : that.multiple[i].id),
deletedEntity: Enums.entityStateReadOnly[that.multiple[i].id.state],
entityName: that.multiple[i].model.get('name')
}
if (obj.deletedEntity) {
Utils.notifyError({
content: obj.entityName + Messages.assignDeletedEntity
});
if (that.multiple.length === 1 || (that.multiple.length == (i + 1) && that.asyncFetchCounter == 0)) {
that.hideLoader();
}
} else {
that.saveTagData(obj);
} }
that.saveTagData(obj);
} }
} else { } else {
that.asyncFetchCounter = 0; that.asyncFetchCounter = 0;
......
...@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ...@@ -9,6 +9,7 @@ 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) ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES: ALL CHANGES:
ATLAS-1437 UI update to disallow tag association changes to deleted entities (Kalyanikashikar via mneethiraj)
ATLAS-1352 fix for error in redirecting to Knox gateway URL (nixonrodrigues via mneethiraj) ATLAS-1352 fix for error in redirecting to Knox gateway URL (nixonrodrigues via mneethiraj)
ATLAS-1467 instance create/full-Update implementation (sumasai via mneethiraj) ATLAS-1467 instance create/full-Update implementation (sumasai via mneethiraj)
ATLAS-1463 option to exclude specific entity attributes in audit records (sarath.kum4r@gmail.com via mneethiraj) ATLAS-1463 option to exclude specific entity attributes in audit records (sarath.kum4r@gmail.com via mneethiraj)
......
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