Commit bb789550 by Keval Bhatt Committed by Suma Shivaprasad

ATLAS-1071 : Regression - UI - Details Button under Audits Tab is not working.

parent 6078c9ae
......@@ -39,7 +39,7 @@
"noty": "^2.3.8",
"requirejs": "^2.1.16",
"requirejs-text": "^2.0.12",
"select2": "^4.0.2",
"select2": "^4.0.3",
"underscore": "^1.8.3"
},
"devDependencies": {
......
......@@ -198,7 +198,9 @@ define(function(require) {
if (cb) {
self.on('ok', cb);
}
$el.one('shown.bs.modal', function() {
self.trigger('shownModal');
});
return this;
},
......
......@@ -29,7 +29,7 @@
{{#if create}}
<span class="row-margin-bottom">Select tags to inherit attributes(optional)</span>
<p class="attributeText">Attributes define additional properties for the tag</p>
<select class="form-control tagList" data-id="parentTag" multiple="multiple"></select>
<select class="form-control" data-id="parentTagList" multiple="multiple"></select>
{{/if}}
</div>
</form>
......@@ -223,9 +223,10 @@ define(['require',
'modules/Modal',
'views/audit/CreateAuditTableLayoutView',
], function(Modal, CreateAuditTableLayoutView) {
var collectionModel = that.entityCollection.findWhere({ 'eventKey': $(e.currentTarget).data('modalid') });
var eventModel = that.entityCollection.findWhere({ 'eventKey': $(e.currentTarget).data('modalid') }).toJSON(),
collectionModel = new that.entityCollection.model(eventModel),
view = new CreateAuditTableLayoutView({ guid: that.guid, entityModel: collectionModel, action: that.action });
that.action = $(e.target).data("action");
var view = new CreateAuditTableLayoutView({ guid: that.guid, model: collectionModel, action: that.action });
var modal = new Modal({
title: that.action,
content: view,
......
......@@ -53,7 +53,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
_.extend(this, _.pick(options, 'globalVent', 'guid', 'model', 'action'));
_.extend(this, _.pick(options, 'globalVent', 'guid', 'entityModel', 'action'));
},
bindEvents: function() {},
onRender: function() {
......@@ -62,8 +62,8 @@ define(['require',
auditTableGenerate: function() {
var that = this,
table = "";
if (this.model.get('details').search('{') >= 0) {
var appendedString = "{" + this.model.get('details') + "}";
if (this.entityModel.get('details').search('{') >= 0) {
var appendedString = "{" + this.entityModel.get('details') + "}";
var auditData = appendedString.split('"')[0].split(':')[0].split("{")[1];
var detailsObject = JSON.parse(appendedString.replace("{" + auditData + ":", '{"' + auditData + '":'))[auditData];
//Append string for JSON parse
......@@ -84,7 +84,7 @@ define(['require',
}
}
} else if (this.action == Globals.auditAction.TAG_DELETE) {
var appendedString = this.model.get('details').split(':');
var appendedString = this.entityModel.get('details').split(':');
this.ui.auditHeaderValue.html('<th>Tag</th>');
this.ui.auditValue.html("<tr><td>" + appendedString[1] + "</td></tr>");
}
......
......@@ -42,7 +42,7 @@ define(['require',
/** ui selector cache */
ui: {
tagName: "[data-id='tagName']",
parentTag: "[data-id='parentTag']",
parentTag: "[data-id='parentTagList']",
description: "[data-id='description']",
title: "[data-id='title']"
},
......@@ -74,17 +74,13 @@ define(['require',
}
},
tagCollectionList: function() {
var str = '',
that = this;
this.ui.parentTag.empty();
var str = '';
for (var i = 0; i < this.tagCollection.fullCollection.models.length; i++) {
var tags = this.tagCollection.fullCollection.models[i].get("tags");
str += '<option>' + tags + '</option>';
this.ui.parentTag.html(str);
}
this.ui.parentTag.select2({
placeholder: "Search Tags",
allowClear: true
this.tagCollection.each(function(val) {
str += '<option>' + val.get("tags") + '</option>';
});
that.ui.parentTag.html(str);
}
});
return CreateTagLayoutView;
......
......@@ -202,6 +202,13 @@ define(['require',
modal.$el.find('button.ok').attr("disabled", "true");
}
});
modal.on('shownModal', function() {
view.ui.parentTag.select2({
multiple: true,
placeholder: "Search Tags",
allowClear: true
});
})
modal.on('ok', function() {
that.onCreateButton(view);
});
......
......@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL CHANGES:
ATLAS-1071 Regression - UI - Details Button under Audits Tab is not working.(kevalbhatt18 via sumasai)
ATLAS-965 Old lineage still exists after dropping tables and re-creating tables with same name. (shwethags via sumasai)
ATLAS-1048 TestMetadata.py test in distro project fails on Windows (jnhagelb via shwethags)
ATLAS-1026 StoreBackedTypeCache issues (dkantor via shwethags)
......
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