DomGarguilo commented on code in PR #4986:
URL: https://github.com/apache/accumulo/pull/4986#discussion_r1809387852
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/ec.js:
##########
@@ -142,6 +142,110 @@ $(document).ready(function () {
]
});
+ function handleFilterKeyup(input, feedbackElement, columnIndex) {
+ if (isValidRegex(input) || input === '') { // if valid, apply the filter
+ feedbackElement.hide();
+ $(this).removeClass('is-invalid');
+ const isRegex = true;
+ const smartEnabled = false;
+ runningTable
+ .column(columnIndex)
+ .search(input, isRegex, smartEnabled)
+ .draw();
+ } else { // if invalid, show the warning
+ feedbackElement.show();
+ $(this).addClass('is-invalid');
+ }
+ }
+
+ $('#hostname-filter').on('keyup', function () {
+ handleFilterKeyup.call(this, this.value, $('#hostname-feedback'), 0);
+ });
+
+ $('#queue-filter').on('keyup', function () {
+ handleFilterKeyup.call(this, this.value, $('#queue-feedback'), 3);
+ });
+
+ $('#tableid-filter').on('keyup', function () {
+ handleFilterKeyup.call(this, this.value, $('#tableid-feedback'), 4);
+ });
+
+ $('#duration-filter').on('keyup', function () {
+ runningTable.draw();
+ });
+
+ // Custom filter function for duration
+ $.fn.dataTable.ext.search.push(function (settings, data, dataIndex) {
+ if (settings.nTable.id !== 'runningTable') {
+ return true;
+ }
+
+ const durationStr = data[8]; // duration is in the 9th column (index 8)
Review Comment:
Addressed in 263b617. I added a name field to each column and get the
columns that way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]