Skip to content

Commit

Permalink
Make SQL Queries page work with htmx
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnavy committed Dec 26, 2024
1 parent 27442d0 commit 4489fa9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 0 additions & 3 deletions lib/RT/Interface/Web/MenuBuilder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down
4 changes: 0 additions & 4 deletions share/html/Admin/Tools/Queries.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@
% } elsif (!$history) {
<p><&|/l&>This server process has recorded no SQL queries.</&></p>
% } else {
<script type="text/javascript">
jQuery(function () { jQuery(".tablesorter").tablesorter(); });
</script>

<ol>
% my $r = 0;
% for my $request (@$history) {
Expand Down
8 changes: 8 additions & 0 deletions share/static/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4489fa9

Please sign in to comment.