Github user kkhatua commented on a diff in the pull request:
https://github.com/apache/drill/pull/1241#discussion_r185126155
--- Diff: exec/java-exec/src/main/resources/rest/index.ftl ---
@@ -252,33 +255,129 @@
timeout = setTimeout(reloadStatus, refreshTime);
}
- function fillStatus(data,size) {
- var status_map = (data.responseJSON);
- for (i = 1; i <= size; i++) {
- var address =
$("#row-"+i).find("#address").contents().get(0).nodeValue;
- address = address.trim();
- var port = $("#row-"+i).find("#port").html();
- var key = address+"-"+port;
+ function fillStatus(dataResponse,size) {
+ var status_map = (dataResponse.responseJSON);
+ //In case localhost has gone down (i.e. we don't know status
from ZK)
+ if (typeof status_map == 'undefined') {
--- End diff --
Ok. A lot of functions need comments. I'll update even those that haven't
been touched.
---