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

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


The following commit(s) were added to refs/heads/main by this push:
     new e4f0a89a77 Modified Monitor to always show table structure (#6401)
e4f0a89a77 is described below

commit e4f0a89a776b8c1219dd579c031e13da54c0bb2d
Author: Dave Marion <[email protected]>
AuthorDate: Fri May 29 16:00:17 2026 -0400

    Modified Monitor to always show table structure (#6401)
    
    This change modifies the Monitor to always show the
    structure of the tables on the page, even if they are
    empty.
    
    
    Co-authored-by: Dom Garguilo <[email protected]>
---
 .../accumulo/monitor/resources/js/coordinator.js     |  4 ----
 .../org/apache/accumulo/monitor/resources/js/ec.js   | 20 +++++---------------
 .../apache/accumulo/monitor/resources/js/manager.js  |  8 --------
 .../apache/accumulo/monitor/resources/js/recovery.js | 12 ------------
 .../apache/accumulo/monitor/resources/js/tservers.js |  2 --
 .../org/apache/accumulo/monitor/templates/ec.ftl     |  2 +-
 6 files changed, 6 insertions(+), 42 deletions(-)

diff --git 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/coordinator.js
 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/coordinator.js
index 8fcfe4e8a1..66c0cacd5a 100644
--- 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/coordinator.js
+++ 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/coordinator.js
@@ -49,10 +49,6 @@ function refresh() {
     refreshTable(queuesHtmlTable, COORDINATOR_QUEUE_PROCESS_VIEW);
     ajaxReloadTable(tableRunning);
     ajaxReloadTable(queueRunning);
-    $(coordinatorHtmlTable).hide();
-    $(queuesHtmlTable).hide();
-    $(runningTableHtmlTable).hide();
-    $(runningQueueHtmlTable).hide();
   });
 }
 
diff --git 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/ec.js
 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/ec.js
index 41bcfd4c0f..09f066a08c 100644
--- 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/ec.js
+++ 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/ec.js
@@ -290,6 +290,7 @@ $(function () {
     }
   });
 
+  refreshManagerStatus();
   refreshRunningCompactions();
 });
 
@@ -297,6 +298,7 @@ $(function () {
  * Used to redraw the page
  */
 function refresh() {
+  refreshManagerStatus();
   refreshRunningCompactions();
 }
 
@@ -304,32 +306,20 @@ function refresh() {
  * Refreshes the running compactions
  */
 function refreshRunningCompactions() {
-  refreshManagerStatus().then(function (managerStatus) {
-    // tables will not be shown, avoid reloading
-    if (managerStatus === 'ERROR') {
-      return;
-    }
-
-    // user paging is not reset on reload
-    ajaxReloadTable(runningTable);
-  });
+  // user paging is not reset on reload
+  ajaxReloadTable(runningTable);
 }
 
 /**
- * Updates session storage then checks if the manager is running. If it is,
- * show the tables and hide the 'manager not running' banner. Else, vice-versa.
+ * Updates session storage then checks if the manager is running and updates 
the banner.
  */
 async function refreshManagerStatus() {
   return getStatus().then(function () {
     var managerStatus = getComponentStatus(getStoredStatusData(), 'MANAGER');
     if (managerStatus === 'ERROR') {
-      // show banner and hide tables
       $('#managerBanner').show();
-      $('#runningDiv').hide();
     } else {
-      // otherwise, hide banner and show tables
       $('#managerBanner').hide();
-      $('#runningDiv').show();
     }
     return managerStatus;
   });
diff --git 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/manager.js
 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/manager.js
index b7a133b3f3..2e66df3c07 100644
--- 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/manager.js
+++ 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/manager.js
@@ -43,15 +43,9 @@ function updateManagerGoalStateBanner() {
 function refreshManagerBanners() {
   var managerRows = getStoredRows(MANAGER_SERVER_PROCESS_VIEW);
   if (!Array.isArray(managerRows) || managerRows.length === 0) {
-    // show the manager error banner and hide manager table
     $(runningBanner).show();
-    $(htmlTable).hide();
-    $(fateHtmlTable).hide();
   } else {
-    // otherwise, hide the error banner and show manager table
     $(runningBanner).hide();
-    $(fateHtmlTable).show();
-    $(htmlTable).show();
   }
   updateManagerGoalStateBanner();
 }
@@ -74,8 +68,6 @@ function refresh() {
     refreshTable(htmlTable, MANAGER_SERVER_PROCESS_VIEW);
     refreshTable(fateHtmlTable, MANAGER_FATE_SERVER_PROCESS_VIEW);
     $(runningBanner).show();
-    $(htmlTable).hide();
-    $(fateHtmlTable).hide();
     $(managerStateBanner).hide();
     showBannerError(htmlBanner, htmlBannerMessage);
   });
diff --git 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/recovery.js
 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/recovery.js
index 725a40a299..904715f81a 100644
--- 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/recovery.js
+++ 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/recovery.js
@@ -52,14 +52,6 @@ function getReplaying() {
   return getStoredView(RECOVERY).serversRecoveringTablets;
 }
 
-function showOrHide(divElement, dataArray) {
-  if (dataArray.length == 0) {
-    $(divElement).hide();
-  } else {
-    $(divElement).show();
-  }
-}
-
 function refresh() {
   $.when(getRecoveryInformation()).then(function () {
     ajaxReloadTable(overviewDataTable);
@@ -82,10 +74,6 @@ function refresh() {
     ajaxReloadTable(sortingDataTable);
     ajaxReloadTable(replayingDataTable);
   });
-  showOrHide(overviewTableDivElement, getOverview());
-  showOrHide(tabletRecoveryDivElement, getTablets());
-  showOrHide(sortingServersDivElement, getSorting());
-  showOrHide(replayingServersDivElement, getReplaying());
 }
 
 $(function () {
diff --git 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/tservers.js
 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/tservers.js
index 1a05aea70d..7fac48a4c1 100644
--- 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/tservers.js
+++ 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/tservers.js
@@ -32,11 +32,9 @@ function refreshTServersBanner() {
     if (getComponentStatus(statusData, 'MANAGER') === 'ERROR') {
       $('#tserversManagerBanner').show();
       $(htmlBanner).hide();
-      $('#tservers_wrapper').hide();
       $('#recovery-caption').hide();
     } else {
       $('#tserversManagerBanner').hide();
-      $('#tservers_wrapper').show();
     }
   });
 }
diff --git 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/ec.ftl
 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/ec.ftl
index 8bbcc916ea..87280e491b 100644
--- 
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/ec.ftl
+++ 
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/ec.ftl
@@ -23,7 +23,7 @@
           <h3>${title}</h3>
         </div>
       </div>
-      <div id="runningDiv" style="display: none;">
+      <div id="runningDiv">
         <div class="row">
           <div class="col-xs-12">
             <table id="runningTable" class="table caption-top table-bordered 
table-striped table-condensed">

Reply via email to