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/04/25 20:43:54 UTC

[atlas] 02/08: ATLAS-3158 : UI : Render schema tab using relationshipAttributes (Columns)

This is an automated email from the ASF dual-hosted git repository.

sarath pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit c82a24f035bd39456d525f5d50a294f9e04c1494
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Wed Apr 24 14:42:21 2019 +0530

    ATLAS-3158 : UI : Render schema tab using relationshipAttributes (Columns)
    
    (cherry picked from commit c756690365053037fad0afd794523162c9508a8a)
---
 dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index b0d1898..92c42e3 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -264,10 +264,11 @@ define(['require',
                         }
                         // To render Schema check attribute "schemaElementsAttribute"
                         var schemaOptions = this.activeEntityDef.get('options');
-                        if (schemaOptions && schemaOptions.hasOwnProperty('schemaElementsAttribute') && schemaOptions.schemaElementsAttribute !== "") {
+                        var schemaElementsAttribute = schemaOptions && schemaOptions.schemaElementsAttribute;
+                        if (!_.isEmpty(schemaElementsAttribute)) {
                             this.$('.schemaTable').show();
                             this.renderSchemaLayoutView(_.extend({}, obj, {
-                                attribute: collectionJSON.attributes[schemaOptions.schemaElementsAttribute] || collectionJSON.relationshipAttributes[schemaOptions.schemaElementsAttribute]
+                                attribute: collectionJSON.relationshipAttributes[schemaElementsAttribute] || collectionJSON.attributes[schemaElementsAttribute]
                             }));
                         } else if (this.value && this.value.tabActive == "schema") {
                             Utils.setUrl({