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

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

commit 36d8014dc5006da5f815ad8a592a0f0ecf0c1182
Author: gutkaBinit <binitgu...@gmail.com>
AuthorDate: Tue Mar 5 16:28:38 2019 +0530

    ATLAS-3066 : UI : Fix various table layouts & improvements.
    
    Signed-off-by: nixonrodrigues <ni...@apache.org>
---
 dashboardv2/public/css/scss/common.scss                        |  2 +-
 dashboardv2/public/js/utils/CommonViewFunction.js              | 10 +++++-----
 dashboardv2/public/js/views/audit/AuditTableLayoutView.js      |  2 +-
 .../public/js/views/detail_page/DetailPageLayoutView.js        |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dashboardv2/public/css/scss/common.scss 
b/dashboardv2/public/css/scss/common.scss
index 35acc43..484879b 100644
--- a/dashboardv2/public/css/scss/common.scss
+++ b/dashboardv2/public/css/scss/common.scss
@@ -118,7 +118,7 @@ pre {
         overflow: hidden;
 
         &.shrink {
-            height: 100px;
+            height: 112px;
             white-space: -moz-pre-wrap;
             /* Mozilla, supported since 1999 */
             white-space: -pre-wrap;
diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js 
b/dashboardv2/public/js/utils/CommonViewFunction.js
index 8532d49..e9477c3 100644
--- a/dashboardv2/public/js/utils/CommonViewFunction.js
+++ b/dashboardv2/public/js/utils/CommonViewFunction.js
@@ -89,7 +89,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 
'utils/Messages', 'utils/Enum
                         return numberFormat(val);
                     }
                 } else {
-                    return val;
+                    return val || "N/A";
                 }
             },
             fetchInputOutputValue = function(id, defEntity) {
@@ -252,16 +252,16 @@ define(['require', 'utils/Utils', 'modules/Modal', 
'utils/Messages', 'utils/Enum
             }
             if (isTable) {
                 var htmlTag = '<div class="scroll-y">' + getValue(val) + 
'</div>';
-                if (_.isObject(valueObject[key])) {
+                if (_.isObject(valueObject[key]) && 
!_.isEmpty(valueObject[key])) {
                     var matchedLinkString = val.match(/href|value-loader\w*/g),
                         matchedJson = val.match(/json-value|json-string\w*/g),
-                        isMatchLinkStringIsSingle = matchedLinkString && 
matchedLinkString.length == 1,
+                        isMatchLinkStringIsSingle = matchedLinkString && 
matchedLinkString.length <= 5,
                         isMatchJSONStringIsSingle = matchedJson && 
matchedJson.length == 1,
                         expandCollapseButton = "";
                     if ((matchedJson && !isMatchJSONStringIsSingle) || 
(matchedLinkString && !isMatchLinkStringIsSingle)) {
-                        var expandCollapseButton = '<button 
class="expand-collapse-button"><i class="fa"></i></button>'
+                        expandCollapseButton = '<button 
class="expand-collapse-button"><i class="fa"></i></button>';
+                        htmlTag = '<pre class="shrink code-block ' + 
(isMatchJSONStringIsSingle ? 'fixed-height' : '') + '">' + expandCollapseButton 
+ '<code>' + val + '</code></pre>';
                     }
-                    var htmlTag = '<pre class="shrink code-block ' + 
(isMatchJSONStringIsSingle ? 'fixed-height' : '') + '">' + expandCollapseButton 
+ '<code>' + val + '</code></pre>';
                 }
                 table += '<tr><td>' + _.escape(key) + '</td><td>' + htmlTag + 
'</td></tr>';
             } else {
diff --git a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js 
b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
index a30158c..5874a18 100644
--- a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
@@ -153,9 +153,9 @@ define(['require',
                                 if (that.pervOld.length === 0) {
                                     options.previous.attr('disabled', true);
                                 }
-                                that.renderTableLayoutView();
                             }
                         }
+                        that.renderTableLayoutView();
                         that.$('.fontLoader').hide();
                         that.$('.tableOverlay').hide();
                         that.$('.auditTable').show(); // Only for first time 
table show because we never hide after first render.
diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js 
b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index 4b04fea..18c545b 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -247,7 +247,7 @@ define(['require',
                         if (schemaOptions && 
schemaOptions.hasOwnProperty('schemaElementsAttribute') && 
schemaOptions.schemaElementsAttribute !== "") {
                             this.$('.schemaTable').show();
                             this.renderSchemaLayoutView(_.extend({}, obj, {
-                                attribute: 
collectionJSON.attributes[schemaOptions.schemaElementsAttribute]
+                                attribute: 
collectionJSON.attributes[schemaOptions.schemaElementsAttribute] || 
collectionJSON.relationshipAttributes[schemaOptions.schemaElementsAttribute]
                             }));
                         } else if (this.value && this.value.tabActive == 
"schema") {
                             Utils.setUrl({

Reply via email to