You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/02/08 07:17:22 UTC
incubator-atlas git commit: ATLAS-1521 : Update UI to eliminate REST
calls to obtain schema data (#2)
Repository: incubator-atlas
Updated Branches:
refs/heads/master dd7447658 -> 15baa4da0
ATLAS-1521 : Update UI to eliminate REST calls to obtain schema data (#2)
Signed-off-by: Madhan Neethiraj <ma...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/15baa4da
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/15baa4da
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/15baa4da
Branch: refs/heads/master
Commit: 15baa4da02290f6a7bb257b9ee6c619581746568
Parents: dd74476
Author: kevalbhatt <kb...@apache.org>
Authored: Wed Feb 8 12:32:18 2017 +0530
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Tue Feb 7 23:08:17 2017 -0800
----------------------------------------------------------------------
dashboardv2/public/js/views/audit/AuditTableLayoutView.js | 4 ++--
.../public/js/views/audit/CreateAuditTableLayoutView.js | 9 +++++++--
.../public/js/views/detail_page/DetailPageLayoutView.js | 4 ++--
dashboardv2/public/js/views/schema/SchemaLayoutView.js | 2 +-
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js | 6 +++---
5 files changed, 15 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/15baa4da/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
index da8cfda..d0129f7 100644
--- a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
@@ -57,7 +57,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
- _.extend(this, _.pick(options, 'guid', 'entity'));
+ _.extend(this, _.pick(options, 'guid', 'entity', 'entityName'));
this.entityCollection = new VEntityList();
this.count = 26;
this.entityCollection.url = UrlLinks.entityCollectionaudit(this.guid);
@@ -224,7 +224,7 @@ define(['require',
that.action = $(e.target).data("action");
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, entity: that.entity });
+ view = new CreateAuditTableLayoutView({ guid: that.guid, entityModel: collectionModel, action: that.action, entity: that.entity, entityName: that.entityName });
var modal = new Modal({
title: that.action,
content: view,
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/15baa4da/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
index 0abff47..12244af 100644
--- a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
@@ -54,7 +54,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
- _.extend(this, _.pick(options, 'guid', 'entityModel', 'action', 'entity'));
+ _.extend(this, _.pick(options, 'guid', 'entityModel', 'action', 'entity', 'entityName'));
},
bindEvents: function() {},
onRender: function() {
@@ -79,7 +79,7 @@ define(['require',
var values = parseDetailsObject.values;
if (this.action && (Enums.auditAction.ENTITY_CREATE !== this.action && Enums.auditAction.ENTITY_UPDATE !== this.action) && name) {
this.ui.auditHeaderValue.html('<th>' + this.action + '</th>');
- this.ui.auditValue.html("<tr><td>" + name + "</td></tr>");
+ this.ui.auditValue.html("<tr><td>" + (name ? name : this.entityName) + "</td></tr>");
} else if (parseDetailsObject && parseDetailsObject.values) {
this.ui.auditHeaderValue.html('<th>Key</th><th>New Value</th>');
//CommonViewFunction.findAndmergeRefEntity(attributeObject, that.referredEntities);
@@ -93,6 +93,11 @@ define(['require',
this.ui.tableAudit.hide();
}
}
+ } else {
+ if (Enums.auditAction.ENTITY_DELETE === this.action) {
+ this.ui.auditHeaderValue.html('<th>' + this.action + '</th>');
+ this.ui.auditValue.html("<tr><td>" + (name ? name : this.entityName) + "</td></tr>");
+ }
}
},
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/15baa4da/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index 83918e7..6dc5343 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -166,7 +166,7 @@ define(['require',
entity: collectionJSON,
referredEntities: entityObject.referredEntities,
guid: this.id,
- assetName: this.name,
+ entityName: this.name,
entityDefCollection: this.entityDefCollection,
fetchCollection: this.fetchCollection.bind(that)
}
@@ -176,7 +176,7 @@ define(['require',
this.renderTermTableLayoutView(_.extend({}, obj, { term: true }));
this.renderLineageLayoutView(obj);
// To render Schema check attribute "schemaElementsAttribute"
- var schemaOptions = this.entityDefCollection.find({ name: collectionJSON.typeName }).get('options');
+ var schemaOptions = this.entityDefCollection.fullCollection.find({ name: collectionJSON.typeName }).get('options');
if (schemaOptions && schemaOptions.hasOwnProperty('schemaElementsAttribute') && schemaOptions.schemaElementsAttribute !== "") {
this.$('.schemaTable').show();
this.renderSchemaLayoutView(_.extend({}, obj, {
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/15baa4da/dashboardv2/public/js/views/schema/SchemaLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/schema/SchemaLayoutView.js b/dashboardv2/public/js/views/schema/SchemaLayoutView.js
index b15d206..6b6c3fd 100644
--- a/dashboardv2/public/js/views/schema/SchemaLayoutView.js
+++ b/dashboardv2/public/js/views/schema/SchemaLayoutView.js
@@ -144,7 +144,7 @@ define(['require',
onRender: function() {
var that = this;
_.each(this.attribute, function(obj) {
- var defObj = that.entityDefCollection.find({ name: obj.typeName });
+ var defObj = that.entityDefCollection.fullCollection.find({ name: obj.typeName });
if (defObj && defObj.get('options') && defObj.get('options').schemaAttributes) {
try {
var mapObj = JSON.parse(defObj.get('options').schemaAttributes);
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/15baa4da/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
index db6f338..ecdb1ee 100644
--- a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
@@ -60,7 +60,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
- _.extend(this, _.pick(options, 'entity', 'guid', 'term', 'assetName'));
+ _.extend(this, _.pick(options, 'entity', 'guid', 'term', 'entityName'));
this.collectionObject = this.entity;
this.tagTermCollection = new VTagList();
var tagorterm = _.toArray(this.collectionObject.classifications),
@@ -176,13 +176,13 @@ define(['require',
that = this;
if (that.term) {
var modal = CommonViewFunction.deleteTagModel({
- msg: "<div class='ellipsis'>Remove: " + "<b>" + _.escape(tagName) + "</b> assignment from" + " " + "<b>" + this.assetName + "?</b></div>",
+ msg: "<div class='ellipsis'>Remove: " + "<b>" + _.escape(tagName) + "</b> assignment from" + " " + "<b>" + this.entityName + "?</b></div>",
titleMessage: Messages.removeTerm,
buttonText: "Remove",
});
} else {
var modal = CommonViewFunction.deleteTagModel({
- msg: "<div class='ellipsis'>Remove: " + "<b>" + _.escape(tagName) + "</b> assignment from" + " " + "<b>" + this.assetName + "?</b></div>",
+ msg: "<div class='ellipsis'>Remove: " + "<b>" + _.escape(tagName) + "</b> assignment from" + " " + "<b>" + this.entityName + "?</b></div>",
titleMessage: Messages.removeTag,
buttonText: "Remove",
});