From 80425d20b04b40adfcaef6d5254557178ecbc446 Mon Sep 17 00:00:00 2001 From: Dom Garguilo Date: Thu, 15 Jan 2026 10:52:33 -0500 Subject: [PATCH] Fix sorting on bulk import tables in monitor --- .../monitor/resources/js/bulkImport.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/bulkImport.js b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/bulkImport.js index a89bc95ad4a..abb07b57eaf 100644 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/bulkImport.js +++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/bulkImport.js @@ -50,6 +50,7 @@ $(document).ready(function () { "dataSrc": "bulkImport" }, "stateSave": true, + "autoWidth": false, "columns": [{ "data": "filename", "width": "40%" @@ -58,12 +59,11 @@ $(document).ready(function () { "data": "age", "width": "45%", "render": function (data, type) { - if (type === 'display' && Number(data) > 0) { - data = new Date(Number(data)); - } else { - data = "-"; + var age = Number(data); + if (type === 'display') { + return age > 0 ? new Date(age) : "-"; } - return data; + return age > 0 ? age : 0; } }, { @@ -96,12 +96,11 @@ $(document).ready(function () { { "data": "oldestAge", "render": function (data, type) { - if (type === 'display' && Number(data) > 0) { - data = new Date(Number(data)); - } else { - data = "-"; + var age = Number(data); + if (type === 'display') { + return age > 0 ? new Date(age) : "-"; } - return data; + return age > 0 ? age : 0; } } ]