diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css
index 05a4a78eddb..76b2eb98f3f 100644
--- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css
+++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css
@@ -132,8 +132,8 @@ table {
.table-bordered th,
.table-bordered td {
- border: 1px solid light-dark(#ddd, #444) !important;
- }
+ border: 1px solid light-dark(#ddd, #444) !important;
+}
table.sortable {
border-left: 0;
@@ -152,6 +152,7 @@ td {
padding-top: 0.15em;
padding-bottom: 0.15em;
color: #333333;
+ white-space: nowrap;
}
th {
@@ -167,6 +168,7 @@ th {
color: #333333;
font-size: 10pt;
vertical-align: bottom;
+ white-space: nowrap;
}
td.firstcell {
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 687083a1db2..18191b9829b 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
@@ -150,9 +150,18 @@ function getDataTableCols(storageKey) {
* and executes an ajax method to load the data.
*/
function refreshTable(table, storageKey) {
+ var dataTableRef = dataTableRefs.get(table);
+ var dataTableColKeys = new Map();
+ var colsKey = JSON.stringify(getStoredColumns(storageKey));
+ dataTableColKeys.set(table, colsKey);
+
+ // If column data has not changed, only reload the rows so scroll position and column state do not reset
+ if (dataTableRef != null && dataTableColKeys.get(table) === colsKey) {
+ ajaxReloadTable(dataTableRef);
+ return;
+ }
// Destroy the DataTable
- var dataTableRef = dataTableRefs.get(table);
if (dataTableRef != null) {
dataTableRef.destroy();
}
@@ -246,6 +255,7 @@ function refreshServerInformation(callback, table, storageKey, banner, bannerMsg
*/
function createDataTable(table, storageKey) {
var dataTableRef = new DataTable(table, {
+ "scrollX": true,
"autoWidth": false,
"ajax": function (data, callback) {
callback({
@@ -253,9 +263,24 @@ function createDataTable(table, storageKey) {
});
},
"buttons": [{
- "extend": 'colvis',
- "text": '',
- "titleAttr": 'Columns'
+ "extend": 'colvis',
+ "text": '',
+ "titleAttr": 'Columns',
+ },
+ {
+ "extend": 'spacer'
+ },
+ {
+ "text": 'Reset',
+ "titleAttr": 'Reset column selection and column order',
+ action: function (e, table) {
+ // reset column selection
+ table.columns().visible(true);
+ // reset column order
+ if (table.colReorder) {
+ table.colReorder.reset();
+ }
+ }
}],
"layout": {
"topStart": "pageLength",