Commit 53ae712a by kevalbhatt

ATLAS-3743: Date type value is shown as timestamp instead of date, in BM…

ATLAS-3743: Date type value is shown as timestamp instead of date, in BM audit/technical properties.
parent 7c68048f
...@@ -124,11 +124,25 @@ define(['require', ...@@ -124,11 +124,25 @@ define(['require',
var name = ((name ? name : this.entityName)); var name = ((name ? name : this.entityName));
that.updateName(name); that.updateName(name);
if (parseDetailsObject) { if (parseDetailsObject) {
var attributesDetails = parseDetailsObject.attributes, var attributesDetails = $.extend(true, {}, parseDetailsObject.attributes),
customAttr = parseDetailsObject.customAttributes, customAttr = parseDetailsObject.customAttributes,
labelsDetails = parseDetailsObject.labels, labelsDetails = parseDetailsObject.labels,
relationshipAttributes = parseDetailsObject.relationshipAttributes; relationshipAttributes = parseDetailsObject.relationshipAttributes,
bmAttributesDeails = that.entity.businessAttributes ? that.entity.businessAttributes[parseDetailsObject.typeName] : null;
if (attributesDetails) { if (attributesDetails) {
if (bmAttributesDeails) {
_.each(Object.keys(attributesDetails), function(key) {
if (bmAttributesDeails[key].typeName.toLowerCase().indexOf("date") > -1) {
if (attributesDetails[key].length) { // multiple date values
attributesDetails[key] = _.map(attributesDetails[key], function(dateValue) {
return Utils.formatDate({ date: dateValue })
});
} else {
attributesDetails[key] = Utils.formatDate({ date: attributesDetails[key] });
}
}
})
}
that.ui.attributeDetails.removeClass('hide'); that.ui.attributeDetails.removeClass('hide');
that.action.indexOf("Classification") === -1 ? that.ui.panelAttrHeading.html("Technical properties ") : that.ui.panelAttrHeading.html("Properties "); that.action.indexOf("Classification") === -1 ? that.ui.panelAttrHeading.html("Technical properties ") : that.ui.panelAttrHeading.html("Properties ");
var attrTable = that.createTableWithValues(attributesDetails); var attrTable = that.createTableWithValues(attributesDetails);
......
...@@ -124,11 +124,25 @@ define(['require', ...@@ -124,11 +124,25 @@ define(['require',
var name = ((name ? name : this.entityName)); var name = ((name ? name : this.entityName));
that.updateName(name); that.updateName(name);
if (parseDetailsObject) { if (parseDetailsObject) {
var attributesDetails = parseDetailsObject.attributes, var attributesDetails = $.extend(true, {}, parseDetailsObject.attributes),
customAttr = parseDetailsObject.customAttributes, customAttr = parseDetailsObject.customAttributes,
labelsDetails = parseDetailsObject.labels, labelsDetails = parseDetailsObject.labels,
relationshipAttributes = parseDetailsObject.relationshipAttributes; relationshipAttributes = parseDetailsObject.relationshipAttributes,
bmAttributesDeails = that.entity.businessAttributes ? that.entity.businessAttributes[parseDetailsObject.typeName] : null;
if (attributesDetails) { if (attributesDetails) {
if (bmAttributesDeails) {
_.each(Object.keys(attributesDetails), function(key) {
if (bmAttributesDeails[key].typeName.toLowerCase().indexOf("date") > -1) {
if (attributesDetails[key].length) { // multiple date values
attributesDetails[key] = _.map(attributesDetails[key], function(dateValue) {
return Utils.formatDate({ date: dateValue })
});
} else {
attributesDetails[key] = Utils.formatDate({ date: attributesDetails[key] });
}
}
})
}
that.ui.attributeDetails.removeClass('hide'); that.ui.attributeDetails.removeClass('hide');
that.action.indexOf("Classification") === -1 ? that.ui.panelAttrHeading.html("Technical properties ") : that.ui.panelAttrHeading.html("Properties "); that.action.indexOf("Classification") === -1 ? that.ui.panelAttrHeading.html("Technical properties ") : that.ui.panelAttrHeading.html("Properties ");
var attrTable = that.createTableWithValues(attributesDetails); var attrTable = that.createTableWithValues(attributesDetails);
......
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