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

domgarguilo 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 d9bba456d1 Improvements to the Server Type table on Monitor overview 
page(#6282)
d9bba456d1 is described below

commit d9bba456d11b2633655d3341fee3427caa5e4849
Author: Dom G. <[email protected]>
AuthorDate: Tue Mar 31 16:19:50 2026 -0400

    Improvements to the Server Type table on Monitor overview page(#6282)
    
    * ensure server types with count of 0 are still displayed
    * make server types hyperlink to associated monitor page
---
 .../accumulo/monitor/resources/js/overview.js      | 36 +++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

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 fe5e691406..2251c84865 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
@@ -20,6 +20,16 @@
 
 var deploymentSummaryTable;
 var deploymentBreakdownTable;
+const SERVER_TYPE_LINKS = new Map([
+  ['Manager', 'manager'],
+  ['Garbage Collector', 'gc'],
+  ['Compactor', 'compactors'],
+  ['Scan Server', 'sservers'],
+  ['Tablet Server', 'tservers']
+]);
+const SUMMARY_SERVER_TYPES = ['Manager', 'Garbage Collector', 'Compactor', 
'Scan Server',
+  'Tablet Server'
+];
 
 /**
  * Creates overview initial table
@@ -46,7 +56,19 @@ $(function () {
       }
     ],
     "columns": [{
-        "data": "serverType"
+        "data": "serverType",
+        "render": function (data, type) {
+          if (type !== 'display') {
+            return data;
+          }
+
+          var link = SERVER_TYPE_LINKS.get(data);
+          if (link === undefined) {
+            return data;
+          }
+
+          return '<a href="' + sanitize(link) + '">' + sanitize(data) + '</a>';
+        }
       },
       {
         "data": null,
@@ -152,8 +174,20 @@ function refreshDeploymentTables() {
 }
 
 function buildDeploymentSummary(breakdown) {
+  if (breakdown.length === 0) {
+    return [];
+  }
+
   var totalsByType = new Map();
 
+  SUMMARY_SERVER_TYPES.forEach(function (serverType) {
+    totalsByType.set(serverType, {
+      serverType: serverType,
+      total: 0,
+      responding: 0
+    });
+  });
+
   breakdown.forEach(function (row) {
     var existing = totalsByType.get(row.serverType);
     if (existing === undefined) {

Reply via email to