[Rt-commit] rt branch, query-logging, updated. rt-3.8.8-931-ga520dc2

Shawn Moore sartak at bestpractical.com
Tue Sep 28 17:41:46 EDT 2010


The branch, query-logging has been updated
       via  a520dc2312148731f89b51c3425bdd9c049b2e0c (commit)
      from  0d20f312e599c11e6b5e9bc452d3c4486e20126c (commit)

Summary of changes:
 share/html/Admin/Tools/Queries.html |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit a520dc2312148731f89b51c3425bdd9c049b2e0c
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Sep 28 17:44:54 2010 -0400

    First cut of displaying query history

diff --git a/share/html/Admin/Tools/Queries.html b/share/html/Admin/Tools/Queries.html
index 26d9b0f..df0e440 100644
--- a/share/html/Admin/Tools/Queries.html
+++ b/share/html/Admin/Tools/Queries.html
@@ -58,7 +58,26 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
     Title => $title &>
 
 <&|/Widgets/TitleBox, title => loc('SQL Queries') &>
+% my $history = $RT::Handle->QueryHistory;
 % if (!RT->Config->Get('StatementLog')) {
     <p><&|/l&>You must set StatementLog to true to enable this query history page.</&></p>
+% } elsif (!$history) {
+    <p><&|/l&>This server process has recorded no SQL queries.</&></p>
+% } else {
+    <ol>
+%     for my $request (@$history) {
+          <li>
+              <tt><% $request->{Path} %></tt>
+              <ol>
+%                 for my $statement (@{ $request->{Queries} }) {
+%                      my ( $time, $sql, $bind, $duration ) = @$statement;
+                       <li>
+                           <tt><% $sql %></tt>
+                       </li>
+%                 }
+              </ol>
+          </li>
+%     }
+    </ol>
 % }
 </&>

-----------------------------------------------------------------------


More information about the Rt-commit mailing list