You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2019/06/21 00:09:40 UTC

[accumulo] branch 2.0 updated: Fix #1223 Correct recovery status on monitor

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/2.0 by this push:
     new 4160067  Fix #1223 Correct recovery status on monitor
4160067 is described below

commit 41600678131dd30b1609ff7dc7f4b3476072bffa
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Thu Jun 20 19:49:06 2019 -0400

    Fix #1223 Correct recovery status on monitor
    
    Fix the Log Recovery table on the master page in the monitor to:
    
    * Show the recovery time as duration
    * Show the progress as a percentage
    * Stop deleting the headers
---
 .../org/apache/accumulo/monitor/resources/js/master.js       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/master.js b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/master.js
index f8c4b06..28c88a6 100644
--- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/master.js
+++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/master.js
@@ -57,7 +57,7 @@ function recoveryList() {
   var data = sessionStorage.recoveryList === undefined ?
       [] : JSON.parse(sessionStorage.recoveryList);
 
-  $('#recoveryList tr').remove();
+  $('#recoveryList tbody tr').remove();
 
   // If there is no recovery list data, hide the table
   if (data.length === 0 || data.recoveryList.length === 0) {
@@ -70,14 +70,14 @@ function recoveryList() {
       var items = [];
       items.push(createFirstCell(val.server, val.server));
       items.push(createRightCell(val.log, val.log));
-      var date = new Date(parseInt(val.runtime));
-      var dateStr = date.toLocaleString().split(' ').join('&nbsp;');
-      items.push(createRightCell(val.runtime, dateStr));
-      items.push(createRightCell(val.progress, val.progress));
+      var duration = timeDuration(parseInt(val.time));
+      items.push(createRightCell(val.time, duration));
+      var percentProgress = (val.progress * 100).toFixed(2) + '%';
+      items.push(createRightCell(val.progress, percentProgress));
 
       $('<tr/>', {
         html: items.join('')
-      }).appendTo('#recoveryList');
+      }).appendTo('#recoveryList tbody');
     });
   }
 }