From 3aa80636e71601c1bc58843b20fa0cde56139702 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 24 Oct 2022 12:16:58 +0200 Subject: [PATCH] Fix monitor filter queries only filtering the first row Ref: 5366772290e0689e1d16437d800c25189e9d5b69 Ref: e1c7409e608b5f25dd3db4ca43458cfb00fc7b24 (probably the bad commit) Ref: #16530 Signed-off-by: William Desportes --- js/src/server/status/monitor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/server/status/monitor.js b/js/src/server/status/monitor.js index 146119a087..8527a4bca6 100644 --- a/js/src/server/status/monitor.js +++ b/js/src/server/status/monitor.js @@ -1898,7 +1898,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { }; // We just assume the sql text is always in the second last column, and that the total count is right of it - $('#logTable').find('table tbody tr').children('td').eq(runtime.logDataCols.length - 2).each(function () { + $('#logTable').find('table tbody tr td.queryCell').each(function () { var $t = $(this); // If query is a SELECT and user enabled or disabled to group // queries ignoring data in where statements, we @@ -2063,7 +2063,7 @@ AJAX.registerOnload('server/status/monitor.js', function () { for (var j = 0, ll = cols.length; j < ll; j++) { // Assuming the query column is the second last if (j === cols.length - 2 && rows[i][cols[j]].match(/^SELECT/i)) { - $tRow.append($tCell = $('' + formatValue(cols[j], rows[i][cols[j]]) + '')); + $tRow.append($tCell = $('' + formatValue(cols[j], rows[i][cols[j]]) + '')); $tCell.on('click', openQueryAnalyzer); } else { $tRow.append('' + formatValue(cols[j], rows[i][cols[j]]) + '');