From 4489fa91b6d425a121fb0173cdfb4ed5825a3317 Mon Sep 17 00:00:00 2001 From: sunnavy Date: Wed, 25 Dec 2024 09:27:15 -0500 Subject: [PATCH] Make SQL Queries page work with htmx --- lib/RT/Interface/Web/MenuBuilder.pm | 3 --- share/html/Admin/Tools/Queries.html | 4 ---- share/static/js/util.js | 8 ++++++++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm index 4e9d3f1e9a0..cd610735ee6 100644 --- a/lib/RT/Interface/Web/MenuBuilder.pm +++ b/lib/RT/Interface/Web/MenuBuilder.pm @@ -1495,9 +1495,6 @@ sub _BuildAdminTopMenu { title => loc('SQL Queries'), description => loc('Browse the SQL queries made in this process'), path => '/Admin/Tools/Queries.html', - attributes => { - 'hx-boost' => 'false', - }, ); } $admin_tools->child( rights_inspector => diff --git a/share/html/Admin/Tools/Queries.html b/share/html/Admin/Tools/Queries.html index 74e891e9533..dbae3625414 100644 --- a/share/html/Admin/Tools/Queries.html +++ b/share/html/Admin/Tools/Queries.html @@ -66,10 +66,6 @@ % } elsif (!$history) {

<&|/l&>This server process has recorded no SQL queries.

% } else { - -
    % my $r = 0; % for my $request (@$history) { diff --git a/share/static/js/util.js b/share/static/js/util.js index c3f5ee8707b..a7a85d1105b 100644 --- a/share/static/js/util.js +++ b/share/static/js/util.js @@ -1226,6 +1226,14 @@ htmx.onLoad(function(elt) { jQuery(this).closest('form').find('input[name=User]').val(ui.item.id).change(); }); + if ( elt.querySelector(".tablesorter") ) { + const checkTableSorter = setInterval(function() { + if ( jQuery.tablesorter ) { + jQuery(elt).find(".tablesorter").tablesorter(); + clearInterval(checkTableSorter); + } + }, 50); + } }); function filterSearchResults (type) {