Commit efb6a365 by Sarath Subramanian

ATLAS-3062: UI : Add relationship table inside relationships tab #2 fix date format

parent be84c4d8
...@@ -412,3 +412,11 @@ span#zoom_in { ...@@ -412,3 +412,11 @@ span#zoom_in {
opacity: 1 !important; opacity: 1 !important;
} }
} }
.lineage-node-detail {
.table-quickMenu {
td {
word-break: break-all;
}
}
}
\ No newline at end of file
...@@ -73,6 +73,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob ...@@ -73,6 +73,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob
}; };
CommonViewFunction.propertyTable = function(options) { CommonViewFunction.propertyTable = function(options) {
var scope = options.scope, var scope = options.scope,
sortBy = options.sortBy,
valueObject = options.valueObject, valueObject = options.valueObject,
extractJSON = options.extractJSON, extractJSON = options.extractJSON,
isTable = _.isUndefined(options.isTable) ? true : options.isTable, isTable = _.isUndefined(options.isTable) ? true : options.isTable,
...@@ -215,7 +216,12 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob ...@@ -215,7 +216,12 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob
} }
return subLink; 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); key = _.escape(key);
if (key == "profileData") { if (key == "profileData") {
return; return;
......
...@@ -271,12 +271,13 @@ define(['require', ...@@ -271,12 +271,13 @@ define(['require',
}, },
getNestedSuperTypes: function(options) { getNestedSuperTypes: function(options) {
var entityDef = options.entityDef; var entityDef = options.entityDef;
return Utils.getNestedSuperTypes({ data: entityDef.toJSON(), collection: this.entityDefCollection }) return Utils.getNestedSuperTypes({ data: entityDef, collection: this.entityDefCollection })
}, },
getEntityDef: function(typeName) { getEntityDef: function(typeName) {
var entityDef = null; var entityDef = null;
if (typeName) { if (typeName) {
entityDef = this.entityDefCollection.fullCollection.find({ name: typeName }); entityDef = this.entityDefCollection.fullCollection.find({ name: typeName });
entityDef = entityDef ? entityDef.toJSON() : entityDef;
} }
return entityDef; return entityDef;
}, },
...@@ -289,7 +290,7 @@ define(['require', ...@@ -289,7 +290,7 @@ define(['require',
serviceType = null; serviceType = null;
if (typeName) { if (typeName) {
if (entityDef) { if (entityDef) {
serviceType = entityDef.get("serviceType") || null; serviceType = entityDef.serviceType || null;
} }
} }
return serviceType; return serviceType;
...@@ -836,11 +837,39 @@ define(['require', ...@@ -836,11 +837,39 @@ define(['require',
}, },
updateRelationshipDetails: function(options) { updateRelationshipDetails: function(options) {
var that = this, var that = this,
data = that.guidEntityMap[options.guid], guid = options.guid,
typeName = data.typeName || 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.$("[data-id='typeName']").text(typeName);
this.entityModel = new VEntity({}); 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; return LineageLayoutView;
......
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