accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [accumulo] branch master updated: ACCUMULO-4770 Show all ZooKeeper nodes on monitor
Date Mon, 08 Jan 2018 18:08:53 GMT
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/master by this push:
     new 5203d3b  ACCUMULO-4770 Show all ZooKeeper nodes on monitor
5203d3b is described below

commit 5203d3bdb5c39a782651399e00347f18b85e24c3
Author: Christopher Tubbs <ctubbsii@apache.org>
AuthorDate: Thu Jan 4 20:24:54 2018 -0500

    ACCUMULO-4770 Show all ZooKeeper nodes on monitor
    
    Fix a javascript bug in the code which updated the table of ZooKeeper
    nodes on the monitor overview page.
---
 .../apache/accumulo/monitor/resources/js/overview.js    | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/overview.js
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/overview.js
index c9796c9..cebecf8 100644
--- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/overview.js
+++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/overview.js
@@ -96,21 +96,18 @@ function refreshZKTable() {
   if (data.length === 0 || data.zkServers.length === 0) {
     $('#zookeeper tr td:first').show();
   } else {
-    var items = [];
     $.each(data.zkServers, function(key, val) {
+      var cells = '<td class="left">' + val.server + '</td>';
       if (val.clients >= 0) {
-        items.push('<td class="left">' + val.server + '</td>');
-        items.push('<td class="left">' + val.mode + '</td>');
-        items.push('<td class="right">' + val.clients + '</td></tr>');
+        cells += '<td class="left">' + val.mode + '</td>';
+        cells += '<td class="right">' + val.clients + '</td>';
       } else {
-        items.push('<tr><td class="left">' + val.server + '</td>');
-        items.push('<td class="left"><span class="error">Down</span></td>');
-        items.push('<td class="right"></td>');
+        cells += '<td class="left"><span class="error">Down</span></td>';
+        cells += '<td class="right"></td>';
       }
+      // create a <tr> element with html containing the cell data; append it to the
table
+      $('<tr/>', { html: cells }).appendTo('#zookeeper table');
     });
-    $('<tr/>', {
-      html: items.join('')
-    }).appendTo('#zookeeper table');
   }
 }
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@accumulo.apache.org" <commits@accumulo.apache.org>'].

Mime
View raw message