Repository navigation
[Issue #246] GUI: Show returned JSON results using third-party pretty-json javascript library - #326
Conversation
|
@kishore-narendran and @zuozhiw can you review it? @Jimmy-VVang Can you add some screentshots? |
| var blackBox = $('<div class="black-box"><div class="result-box"><div class="result-box-band">Return Result<div class="black-box-close"><img src="img/close-icon.png"></div></div><div class="return-result"></div></div></div>'); | ||
| $('body').append(blackBox); | ||
|
|
||
| // $('.return-result').text(JSON.stringify(message)); |
There was a problem hiding this comment.
Remove all unnecessary comments.
| */ | ||
| //Process Query Helper Function | ||
| function createBlackBox(message){ | ||
| var blackBox = $('<div class="black-box"><div class="result-box"><div class="result-box-band">Return Result<div class="black-box-close"><img src="img/close-icon.png"></div></div><div class="return-result"></div></div></div>'); |
There was a problem hiding this comment.
If this is a hard coded constant, the name of the variable should be all capitals. And leave a small description of the HTML constant.
| var operators = []; | ||
| var links = []; | ||
|
|
||
| var dummyJSON = { |
There was a problem hiding this comment.
If this is a constant, again name the variable with all capitals.
|
|
||
| // console.log(JSON.stringify(TEXTDBJSON)); | ||
| // console.log(JSON.stringify(GUIJSON)); | ||
|
|
There was a problem hiding this comment.
Remove all unnecessary logging statements.
| /* | ||
| Helper Functions | ||
| */ | ||
| //Process Query Helper Function |
There was a problem hiding this comment.
Change it to "Helper function for processing queries"
| border: 1px solid black; | ||
| } | ||
|
|
||
| /* Black box after processing query */ |
There was a problem hiding this comment.
Rename "Block box" to "Result frame"
| // console.log(JSON.stringify(TEXTDBJSON)); | ||
| // console.log(JSON.stringify(GUIJSON)); | ||
|
|
||
| // console.log(operators); |
There was a problem hiding this comment.
Remove those commented-out code if possible.
|
This PR is ready to merge. |

Took the results from the ajax request and displayed them in a popup result box
Formatted the message using suggested thirdparty application from https://github.com/warfares/pretty-json