From 1647cb3d50a23896aaf58e18133d36528bb290ad Mon Sep 17 00:00:00 2001 From: Dave Marion Date: Fri, 29 May 2026 13:47:26 +0000 Subject: [PATCH 1/4] Modified Monitor to always show table structure This change modifies the Monitor to always show the structure of the tables on the page, even if they are empty. --- .../accumulo/monitor/resources/js/coordinator.js | 4 ---- .../apache/accumulo/monitor/resources/js/manager.js | 6 ------ .../apache/accumulo/monitor/resources/js/recovery.js | 12 ------------ .../apache/accumulo/monitor/resources/js/tservers.js | 2 -- 4 files changed, 24 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 8fcfe4e8a1b..66c0cacd5a1 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/manager.js b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/manager.js index b7a133b3f39..d091f3e9e4d 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 @@ -45,13 +45,9 @@ function refreshManagerBanners() { 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 +70,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 725a40a2992..904715f81a8 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 1a05aea70d7..7fac48a4c1d 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(); } }); } From 5367f86cf2dce974642e03a5070a40a52d31d3bc Mon Sep 17 00:00:00 2001 From: Dom Garguilo Date: Fri, 29 May 2026 14:42:25 -0400 Subject: [PATCH 2/4] Stop hiding running compactions table * remove stale comments from manager.js * avoiding hiding running compactions page by default * clear running compactions page when manager is down and skip updating it --- .../org/apache/accumulo/monitor/resources/js/ec.js | 8 ++------ .../org/apache/accumulo/monitor/resources/js/manager.js | 2 -- .../org/apache/accumulo/monitor/templates/ec.ftl | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) 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 41bcfd4c0fb..c5498bca74e 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 @@ -307,6 +307,7 @@ function refreshRunningCompactions() { refreshManagerStatus().then(function (managerStatus) { // tables will not be shown, avoid reloading if (managerStatus === 'ERROR') { + runningTable.clear().draw(); return; } @@ -316,20 +317,15 @@ function refreshRunningCompactions() { } /** - * 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 d091f3e9e4d..2e66df3c076 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,10 +43,8 @@ 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(); } else { - // otherwise, hide the error banner and show manager table $(runningBanner).hide(); } updateManagerGoalStateBanner(); 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 8bbcc916ea7..87280e491bc 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 @@

${title}

-