Commit b2ec89d5 by kevalbhatt

ATLAS-1548 : Create entity : Change PUT and POST object structure based on new API Changes

parent 8be1be67
...@@ -70,13 +70,8 @@ define(['require', ...@@ -70,13 +70,8 @@ define(['require',
return this.constructor.nonCrudOperation.call(this, url, 'GET', options); return this.constructor.nonCrudOperation.call(this, url, 'GET', options);
}, },
createOreditEntity: function(guid, options) { createOreditEntity: function(options) {
var url; var url = UrlLinks.entitiesApiUrl();
if (guid) {
url = UrlLinks.entitiesApiUrl(guid);
} else {
url = UrlLinks.entitiesApiUrl();
}
options = _.extend({ options = _.extend({
contentType: 'application/json', contentType: 'application/json',
dataType: 'json' dataType: 'json'
......
...@@ -136,17 +136,16 @@ define(['require', ...@@ -136,17 +136,16 @@ define(['require',
that.$('.fontLoader').hide(); that.$('.fontLoader').hide();
that.$('.auditTable').show(); that.$('.auditTable').show();
that.renderOffset(options); that.renderOffset(options);
if (that.entityCollection && (that.entityCollection.models.length < that.count && that.currPage == 1) && that.next == that.entityCollection.last().get('eventKey')) { if (that.entityCollection.models.length) {
options.next.attr('disabled', true); if (that.entityCollection && (that.entityCollection.models.length < that.count && that.currPage == 1) && that.next == that.entityCollection.last().get('eventKey')) {
options.previous.removeAttr("disabled"); options.next.attr('disabled', true);
} else { options.previous.removeAttr("disabled");
if (that.entityCollection.models.length > 0) { } else {
that.next = that.entityCollection.last().get('eventKey'); that.next = that.entityCollection.last().get('eventKey');
if (that.pervOld.length === 0) { if (that.pervOld.length === 0) {
options.previous.attr('disabled', true); options.previous.attr('disabled', true);
} }
} }
} }
that.renderTableLayoutView(); that.renderTableLayoutView();
}, },
...@@ -207,7 +206,7 @@ define(['require', ...@@ -207,7 +206,7 @@ define(['require',
sortable: false, sortable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, { formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) { fromRaw: function(rawValue, model) {
return '<div class="label label-success auditDetailBtn" data-id="auditCreate" data-action="' + Enums.auditAction[model.attributes.action] + '" data-modalId="' + model.get('eventKey') + '">Detail</div>'; return '<div class="label label-success auditDetailBtn" data-id="auditCreate" data-action="' + Enums.auditAction[model.get('action')] + '" data-modalId="' + model.get('eventKey') + '">Detail</div>';
} }
}) })
}, },
......
...@@ -65,15 +65,17 @@ define(['require', ...@@ -65,15 +65,17 @@ define(['require',
table = ""; table = "";
var detailObj = this.entityModel.get('details'); var detailObj = this.entityModel.get('details');
if (detailObj && detailObj.search(':') >= 0) { if (detailObj && detailObj.search(':') >= 0) {
var parseDetailsObject = detailObj; var parseDetailsObject = detailObj.split(':');
var appendedString = "{" + detailObj + "}"; if (parseDetailsObject.length > 1) {
var auditData = appendedString.split('"')[0].split(':')[0].split("{")[1]; parseDetailsObject.shift();
var auditData = parseDetailsObject.join(":");
}
try { try {
parseDetailsObject = JSON.parse(appendedString.replace("{" + auditData + ":", '{"' + auditData + '":'))[auditData]; parseDetailsObject = JSON.parse(auditData);
var name = _.escape(parseDetailsObject.typeName); var name = _.escape(parseDetailsObject.typeName);
} catch (err) { } catch (err) {
if (parseDetailsObject.search(':') >= 0) { if (_.isArray(parseDetailsObject)) {
var name = parseDetailsObject.split(":")[1]; var name = _.escape(parseDetailsObject[0]);
} }
} }
var values = parseDetailsObject.values; var values = parseDetailsObject.values;
......
...@@ -107,7 +107,7 @@ define(['require', ...@@ -107,7 +107,7 @@ define(['require',
}, },
noLineage: function() { noLineage: function() {
this.$('.fontLoader').hide(); this.$('.fontLoader').hide();
this.$('svg').height('100'); //this.$('svg').height('100');
this.$('svg').html('<text x="' + (this.$('svg').width() - 150) / 2 + '" y="' + this.$('svg').height() / 2 + '" fill="black">No lineage data found</text>'); this.$('svg').html('<text x="' + (this.$('svg').width() - 150) / 2 + '" y="' + this.$('svg').height() / 2 + '" fill="black">No lineage data found</text>');
}, },
generateData: function(relations, guidEntityMap) { generateData: function(relations, guidEntityMap) {
......
...@@ -9,6 +9,8 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ...@@ -9,6 +9,8 @@ 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-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)
ATLAS-1546 Hive hook should choose appropriate JAAS config when host uses kerberos ticket-cache (nixonrodrigues,gss2002 via mneethiraj) ATLAS-1546 Hive hook should choose appropriate JAAS config when host uses kerberos ticket-cache (nixonrodrigues,gss2002 via mneethiraj)
ATLAS-1539 Integration tests in projects which use the typesystem test jar (e.g. webapp) can now be run successfully when invoked in the project directory (dkantor) ATLAS-1539 Integration tests in projects which use the typesystem test jar (e.g. webapp) can now be run successfully when invoked in the project directory (dkantor)
ATLAS-1542 Atlas server fails to start if duplicate types are found during Typesystem bootstrap (svimal2106) ATLAS-1542 Atlas server fails to start if duplicate types are found during Typesystem bootstrap (svimal2106)
......
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