From 2b293b1993b901f739a30ce5b36b9907101c5a7f Mon Sep 17 00:00:00 2001 From: Dom G Date: Fri, 21 Aug 2026 17:09:17 -0400 Subject: [PATCH] Properly pass in DataTables variables in constructors --- .../org/apache/accumulo/monitor/resources/js/alerts.js | 2 +- .../apache/accumulo/monitor/resources/js/coordinator.js | 4 ++-- .../org/apache/accumulo/monitor/resources/js/fate.js | 2 +- .../org/apache/accumulo/monitor/resources/js/recovery.js | 8 ++++---- .../monitor/resources/js/server_process_common.js | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/alerts.js b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/alerts.js index 70f179acb1c..c93333be725 100644 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/alerts.js +++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/alerts.js @@ -80,7 +80,7 @@ function refresh() { } function createDataTable() { - dataTableRef = new DataTable('#alertHtmlTable', { + dataTableRef = new DataTable(alertHtmlTable, { "autoWidth": false, "ajax": function (data, callback) { callback({ 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 99bdc8b6b1e..a641ef2a818 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 @@ -67,7 +67,7 @@ $(function () { sessionStorage[RUNNING_COMPACTIONS_BY_GROUP] = JSON.stringify([]); // Create a table for scans list - tableRunning = new DataTable('#runningTableHtmlTable', { + tableRunning = new DataTable(runningTableHtmlTable, { "ajax": function (data, callback) { callback({ data: getStoredArray(RUNNING_COMPACTIONS_BY_TABLE) @@ -98,7 +98,7 @@ $(function () { ] }); - queueRunning = new DataTable('#runningQueueHtmlTable', { + queueRunning = new DataTable(runningQueueHtmlTable, { "ajax": function (data, callback) { callback({ data: getStoredArray(RUNNING_COMPACTIONS_BY_GROUP) diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/fate.js b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/fate.js index 17606e50643..661b28a0603 100644 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/fate.js +++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/fate.js @@ -45,7 +45,7 @@ function renderListOrDash(data, type) { function createDataTable() { $(fateHtmlTable).find('thead').remove(); $(fateHtmlTable).find('tbody').remove(); - dataTableRef = new DataTable('#fateHtmlTable', { + dataTableRef = new DataTable(fateHtmlTable, { "autoWidth": false, "ajax": function (data, callback) { callback({ 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 941b9c24719..a44e78d7099 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 @@ -89,7 +89,7 @@ $(function () { serversSortingLogs: [] }); - overviewDataTable = new DataTable('#overviewTableElement', { + overviewDataTable = new DataTable(overviewTableElement, { "ajax": function (data, callback) { callback({ data: getOverview() @@ -117,7 +117,7 @@ $(function () { ] }); - tabletDataTable = new DataTable('#tabletRecoveryTableElement', { + tabletDataTable = new DataTable(tabletRecoveryTableElement, { "ajax": function (data, callback) { callback({ data: getTablets() @@ -145,7 +145,7 @@ $(function () { ] }); - sortingDataTable = new DataTable('#sortingServersTableElement', { + sortingDataTable = new DataTable(sortingServersTableElement, { "ajax": function (data, callback) { callback({ data: getSorting() @@ -210,7 +210,7 @@ $(function () { } ] }); - replayingDataTable = new DataTable('#replayingServersTableElement', { + replayingDataTable = new DataTable(replayingServersTableElement, { "ajax": function (data, callback) { callback({ data: getReplaying() diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/server_process_common.js b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/server_process_common.js index c2b558de5ab..687083a1db2 100644 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/server_process_common.js +++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/server_process_common.js @@ -245,7 +245,7 @@ function refreshServerInformation(callback, table, storageKey, banner, bannerMsg * css class. */ function createDataTable(table, storageKey) { - var dataTableRef = new DataTable('#table', { + var dataTableRef = new DataTable(table, { "autoWidth": false, "ajax": function (data, callback) { callback({