diff --git a/src/sunstone/public/css/application.css b/src/sunstone/public/css/application.css index a147e6b1b5..f318adfb7e 100644 --- a/src/sunstone/public/css/application.css +++ b/src/sunstone/public/css/application.css @@ -372,10 +372,13 @@ tr.even:hover{ .info_table td{ - border-bottom: 1px solid #CCCCCC; - color: #353735; - padding: 6px 8px; - } + border-bottom: 1px solid #CCCCCC; + color: #353735; + padding-top: 6px; + padding-bottom: 6px; + padding-left: 8px; + padding-right: 8px; + } .info_table td.key_td{ diff --git a/src/sunstone/public/js/sunstone-util.js b/src/sunstone/public/js/sunstone-util.js index 4963ce63d0..55d10b1a2c 100644 --- a/src/sunstone/public/js/sunstone-util.js +++ b/src/sunstone/public/js/sunstone-util.js @@ -190,18 +190,59 @@ function notifyError(msg){ // Returns an HTML string with the json keys and values in the form // key: value
// It recursively explores objects -function prettyPrintJSON(template_json,padding,weight, border_bottom){ +function prettyPrintJSON(template_json,padding,weight, border_bottom,padding_top_bottom){ var str = "" if (!padding) {padding=0}; if (!weight) {weight="bold";} if (!border_bottom) {border_bottom = "1px solid #CCCCCC";} + if (!padding_top_bottom) {padding_top_bottom=6;} for (field in template_json) { if (typeof template_json[field] == 'object'){ - str += ''+field+''; - str += prettyPrintJSON(template_json[field],padding+25,"normal","0") + ''; + //name of field row + str += '\ + ' + +field+ + '\ + \ + \ + '; + //attributes rows + //empty row - prettyprint - empty row + str += '\ + \ + \ + ' + + prettyPrintJSON(template_json[field],padding+25,"normal","0",1) + + '\ + \ + \ + '; } else { - str += ''+field+''+template_json[field]+''; + str += '\ + '+ + field+ + '\ + '+ + template_json[field]+ + '\ + '; }; }; return str;