Skip to content

[Issue #246] GUI: Show returned JSON results using third-party pretty-json javascript library - #326

Merged
chenlica merged 10 commits into
masterfrom
jimmy-ui-resultbox
Dec 17, 2016
Merged

chenlica merged 10 commits into
masterfrom
jimmy-ui-resultbox

Conversation

@Jimmy-VVang

Copy link
Copy Markdown
Contributor

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

@chenlica

Copy link
Copy Markdown
Contributor

@kishore-narendran and @zuozhiw can you review it?

@Jimmy-VVang Can you add some screentshots?

@Jimmy-VVang

Copy link
Copy Markdown
Contributor Author

screenshot 10

Comment thread textdb/textdb-gui/js/onstart.js Outdated
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));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all unnecessary comments.

Comment thread textdb/textdb-gui/js/onstart.js Outdated
*/
//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>');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread textdb/textdb-gui/js/onstart.js Outdated
var operators = [];
var links = [];

var dummyJSON = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is a constant, again name the variable with all capitals.


// console.log(JSON.stringify(TEXTDBJSON));
// console.log(JSON.stringify(GUIJSON));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all unnecessary logging statements.

@chenlica chenlica changed the title [Issue #246] Added the result box, formatted with third party prettyjson [Issue #246] GUI: Show returned JSON results using third-party pretty-json javascript library Dec 16, 2016
Comment thread textdb/textdb-gui/js/onstart.js Outdated
/*
Helper Functions
*/
//Process Query Helper Function

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it to "Helper function for processing queries"

Comment thread textdb/textdb-gui/css/style.css Outdated
border: 1px solid black;
}

/* Black box after processing query */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename "Block box" to "Result frame"

Comment thread textdb/textdb-gui/js/onstart.js Outdated
// console.log(JSON.stringify(TEXTDBJSON));
// console.log(JSON.stringify(GUIJSON));

// console.log(operators);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove those commented-out code if possible.

@chenlica
chenlica merged commit bf640c0 into master Dec 17, 2016
@chenlica
chenlica deleted the jimmy-ui-resultbox branch December 17, 2016 04:13
@chenlica

Copy link
Copy Markdown
Contributor

This PR is ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants