DomGarguilo commented on code in PR #2679:
URL: https://github.com/apache/accumulo/pull/2679#discussion_r867035868
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js:
##########
@@ -426,25 +473,34 @@ function getTraceOfType(type, minutes) {
*/
function getTraceShow(id) {
var call = '/rest/trace/show/' + id;
+ console.info("Call to " + call);
return $.getJSON(call, function(data) {
- sessionStorage.traceShow = JSON.stringify(data);
+ var jsonDataStr = JSON.stringify(data);
+ sessionStorage.traceShow = jsonDataStr;
+ console.info("REST call to " + call + " stored in sessionStorage.traceShow
= " + jsonDataStr);
});
}
/**
* REST GET call for the logs, stores it on a sessionStorage variable
*/
function getLogs() {
- return $.getJSON('/rest/logs', function(data) {
- sessionStorage.logs = JSON.stringify(data);
+ var call = '/rest/logs';
+ console.info("Call to " + call);
+ return $.getJSON(call, function(data) {
+ var jsonDataStr = JSON.stringify(data);
+ sessionStorage.logs = jsonDataStr;
+ console.info("REST call to " + call + " stored in sessionStorage.logs = "
+ jsonDataStr);
});
Review Comment:
There are also setters and getters for the session storage variables that
might make it easier when refactoring shared code into a function:
https://www.w3schools.com/jsref/prop_win_sessionstorage.asp
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]