[Jifty-commit] r4634 - in jifty/trunk: lib/Jifty/Plugin lib/Jifty/Plugin/LeakTracker

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Dec 6 19:37:33 EST 2007


Author: sartak
Date: Thu Dec  6 19:37:32 2007
New Revision: 4634

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/LeakTracker.pm
   jifty/trunk/lib/Jifty/Plugin/LeakTracker/Dispatcher.pm
   jifty/trunk/lib/Jifty/Plugin/LeakTracker/View.pm

Log:
 r48742 at onn:  sartak | 2007-12-06 19:37:19 -0500
 Move LeakTracker's reports into /__jifty/admin/ as well


Modified: jifty/trunk/lib/Jifty/Plugin/LeakTracker.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/LeakTracker.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/LeakTracker.pm	Thu Dec  6 19:37:32 2007
@@ -106,15 +106,15 @@
 
 View the top-level leak report (how much each request has leaked)
 
-    http://your.app/leaks
+    http://your.app/__jifty/admin/leaks
 
 View the top-level leak report, including zero-leak requests
 
-    http://your.app/leaks/all
+    http://your.app/__jifty/admin/leaks/all
 
 View an individual request's detailed leak report (which objects were leaked)
 
-    http://your.app/leaks/3
+    http://your.app/__jifty/admin/leaks/3
 
 =head1 WARNING
 

Modified: jifty/trunk/lib/Jifty/Plugin/LeakTracker/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/LeakTracker/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/LeakTracker/Dispatcher.pm	Thu Dec  6 19:37:32 2007
@@ -4,25 +4,25 @@
 
 use Jifty::Dispatcher -base;
 
-# http://your.app/leaks -- display full leak report
-on 'leaks' => run {
+# http://your.app/__jifty/admin/leaks -- display full leak report
+on '/__jifty/admin/leaks' => run {
     set 'skip_zero' => 1;
-    show "leaks/all";
+    show "/__jifty/admin/leaks/all";
 };
 
-# http://your.app/leaks/all -- full leak report with non-leaked requests
-on 'leaks/all' => run {
+# http://your.app/__jifty/admin/leaks/all -- leak report with 0-leak requests
+on '/__jifty/admin/leaks/all' => run {
     set 'skip_zero' => 0;
-    show "leaks/all";
+    show "/__jifty/admin/leaks/all";
 };
 
-# http://your.app/leaks/xxx -- display leak report for request ID xxx
-on 'leaks/#' => run {
+# http://your.app/__jifty/admin/leaks/xxx -- display leak report for request ID
+on '/__jifty/admin/leaks/#' => run {
     abort(404) if $1 < 1;
     my $leak = $Jifty::Plugin::LeakTracker::requests[$1 - 1]
         or abort(404);
     set leak => $leak;
-    show "leaks/one";
+    show "/__jifty/admin/leaks/one";
 };
 
 =head1 SEE ALSO

Modified: jifty/trunk/lib/Jifty/Plugin/LeakTracker/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/LeakTracker/View.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/LeakTracker/View.pm	Thu Dec  6 19:37:32 2007
@@ -11,15 +11,9 @@
 
 =head1 TEMPLATES
 
-=head2 leaks/chart
-
-This shows a chart using L<Chart>. It expects to find the arguments in the C<args> parameter, which is setup for it in L<Jifty::Plugin::Chart::Dispatcher>.
-
-This will output a PNG file unless there is an error building the chart.
-
 =cut
 
-template 'leaks/all' => sub {
+template '/__jifty/admin/leaks/all' => sub {
     my $skip_zero = get 'skip_zero';
 
     html {
@@ -27,11 +21,11 @@
             h1 { "Leaked Objects" }
             p {
                 if ($skip_zero) {
-                    a { attr { href => "/leaks/all" }
+                    a { attr { href => "/__jifty/admin/leaks/all" }
                         "Show zero-leak requests" }
                 }
                 else {
-                    a { attr { href => "/leaks" }
+                    a { attr { href => "/__jifty/admin/leaks" }
                         "Hide zero-leak requests" }
                 }
             }
@@ -51,8 +45,9 @@
                     next if $skip_zero && @{$_->{leaks}} == 0;
 
                     row {
-                        cell { a { attr { href => "leaks/$_->{id}" }
-                                   $_->{id} } }
+                        cell { a {
+                            attr { href => "/__jifty/admin/leaks/$_->{id}" }
+                            $_->{id} } }
 
                         cell { scalar @{$_->{leaks}} }
                         cell { $_->{size} }
@@ -65,7 +60,7 @@
     }
 };
 
-template 'leaks/one' => sub {
+template '/__jifty/admin/leaks/one' => sub {
     my $leak = get 'leak';
 
     html {
@@ -77,7 +72,7 @@
                 li { "Objects leaked: " . scalar(@{$leak->{leaks}}) }
                 li { "Total memory leaked: $leak->{size} bytes" }
             }
-            p { a { attr { href => "/leaks" } "Table of Contents" } }
+            p { a { attr { href => "/__jifty/admin/leaks" } "Table of Contents" } }
             hr {}
             h2 { "Object types leaked:" }
             ul {


More information about the Jifty-commit mailing list