You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sa...@apache.org on 2019/03/04 17:55:18 UTC
[atlas] branch branch-1.0 updated: ATLAS-3062: UI : Add
relationship table inside relationships tab #2 fix date format
This is an automated email from the ASF dual-hosted git repository.
sarath pushed a commit to branch branch-1.0
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-1.0 by this push:
new d53facc ATLAS-3062: UI : Add relationship table inside relationships tab #2 fix date format
d53facc is described below
commit d53facc9105fafe11e633412cba9372711dff030
Author: Sarath Subramanian <ss...@hortonworks.com>
AuthorDate: Mon Mar 4 09:54:13 2019 -0800
ATLAS-3062: UI : Add relationship table inside relationships tab #2 fix date format
(cherry picked from commit efb6a36563103f6908c0e16c87990412b4d869ac)
---
dashboardv2/public/css/scss/graph.scss | 8 +++++
dashboardv2/public/js/utils/CommonViewFunction.js | 8 ++++-
.../public/js/views/graph/LineageLayoutView.js | 39 +++++++++++++++++++---
3 files changed, 49 insertions(+), 6 deletions(-)
diff --git a/dashboardv2/public/css/scss/graph.scss b/dashboardv2/public/css/scss/graph.scss
index fd2867e..77fc53e 100644
--- a/dashboardv2/public/css/scss/graph.scss
+++ b/dashboardv2/public/css/scss/graph.scss
@@ -411,4 +411,12 @@ span#zoom_in {
g.edgePath.hover-active-node {
opacity: 1 !important;
}
+}
+
+.lineage-node-detail {
+ .table-quickMenu {
+ td {
+ word-break: break-all;
+ }
+ }
}
\ No newline at end of file
diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js
index 390e523..8532d49 100644
--- a/dashboardv2/public/js/utils/CommonViewFunction.js
+++ b/dashboardv2/public/js/utils/CommonViewFunction.js
@@ -73,6 +73,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
};
CommonViewFunction.propertyTable = function(options) {
var scope = options.scope,
+ sortBy = options.sortBy,
valueObject = options.valueObject,
extractJSON = options.extractJSON,
isTable = _.isUndefined(options.isTable) ? true : options.isTable,
@@ -215,7 +216,12 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
}
return subLink;
}
- _.sortBy(_.keys(valueObject)).map(function(key) {
+ var valueObjectKeysList = _.keys(valueObject);
+ if (_.isUndefined(sortBy) || sortBy == true) {
+ valueObjectKeysList = _.sortBy(valueObjectKeysList);
+ }
+ valueObjectKeysList.map(function(key) {
+
key = _.escape(key);
if (key == "profileData") {
return;
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index c26928a..790e8cf 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -271,12 +271,13 @@ define(['require',
},
getNestedSuperTypes: function(options) {
var entityDef = options.entityDef;
- return Utils.getNestedSuperTypes({ data: entityDef.toJSON(), collection: this.entityDefCollection })
+ return Utils.getNestedSuperTypes({ data: entityDef, collection: this.entityDefCollection })
},
getEntityDef: function(typeName) {
var entityDef = null;
if (typeName) {
entityDef = this.entityDefCollection.fullCollection.find({ name: typeName });
+ entityDef = entityDef ? entityDef.toJSON() : entityDef;
}
return entityDef;
},
@@ -289,7 +290,7 @@ define(['require',
serviceType = null;
if (typeName) {
if (entityDef) {
- serviceType = entityDef.get("serviceType") || null;
+ serviceType = entityDef.serviceType || null;
}
}
return serviceType;
@@ -836,11 +837,39 @@ define(['require',
},
updateRelationshipDetails: function(options) {
var that = this,
- data = that.guidEntityMap[options.guid],
- typeName = data.typeName || options.guid;
+ guid = options.guid,
+ initialData = that.guidEntityMap[guid],
+ typeName = initialData.typeName || guid,
+ attributeDefs = that.g._nodes[guid] && that.g._nodes[guid].entityDef ? that.g._nodes[guid].entityDef.attributeDefs : null;
this.$("[data-id='typeName']").text(typeName);
this.entityModel = new VEntity({});
- this.ui.nodeDetailTable.html(CommonViewFunction.propertyTable({ scope: this, valueObject: data, attributeDefs: that.attributeDefs }));
+ var config = {
+ guid: 'guid',
+ typeName: 'typeName',
+ name: 'name',
+ qualifiedName: 'qualifiedName',
+ owner: 'owner',
+ createTime: 'createTime',
+ status: 'status',
+ classificationNames: 'classifications',
+ meanings: 'term'
+ };
+ var data = {};
+ _.each(config, function(valKey, key) {
+ var val = initialData[key];
+ if (_.isUndefined(val) && initialData.attributes[key]) {
+ val = initialData.attributes[key];
+ }
+ if (val) {
+ data[valKey] = val;
+ }
+ });
+ this.ui.nodeDetailTable.html(CommonViewFunction.propertyTable({
+ "scope": this,
+ "valueObject": data,
+ "attributeDefs": attributeDefs,
+ "sortBy": false
+ }));
}
});
return LineageLayoutView;