[Rt-commit] [svn] r1758 - in rt/branches/3.3-TESTING: . etc html/Elements html/Ticket/Elements lib/RT/Interface/Web

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Mon Nov 8 22:47:41 EST 2004


Author: jesse
Date: Mon Nov  8 22:47:40 2004
New Revision: 1758

Modified:
   rt/branches/3.3-TESTING/   (props changed)
   rt/branches/3.3-TESTING/configure.ac
   rt/branches/3.3-TESTING/etc/RT_Config.pm.in
   rt/branches/3.3-TESTING/html/Elements/PageLayout
   rt/branches/3.3-TESTING/html/Elements/TicketList
   rt/branches/3.3-TESTING/html/Elements/TitleBoxEnd
   rt/branches/3.3-TESTING/html/Ticket/Elements/ShowHistory
   rt/branches/3.3-TESTING/lib/RT/Interface/Web/Handler.pm
Log:
 r8942 at tinbook:  jesse | 2004-11-08T17:22:08.032229Z
 Web:
     * Switched back to manual buffer flushing, as this will
       improve performance and help future-proof RT against a mason update
     * Added several manual buffer flushing points to help with the user
       experience during page display
     * Switched to using mason's "static_source" directive, which stops mason
       from trying to guess about which pages need to be reload from disk.
       (Now you need to restart the webserver to see changes)
 Core:
     * New  --with-developer-mode configuration flag. Right now, it just 
       turns mason static_source off, but in the future, it will enable other
       developer-only features.
 
 


Modified: rt/branches/3.3-TESTING/configure.ac
==============================================================================
--- rt/branches/3.3-TESTING/configure.ac	(original)
+++ rt/branches/3.3-TESTING/configure.ac	Mon Nov  8 22:47:40 2004
@@ -194,6 +194,14 @@
             APACHECTL=`which apachectl`)
 AC_SUBST(APACHECTL)
 
+dnl RT's "maintainer mode"
+AC_ARG_WITH(devel-mode,
+            AC_HELP_STRING([--with-devel-mode],
+                           [Turn on development aids that might hurt you in production]),
+
+            RT_DEVEL_MODE="1", 
+            RT_DEVEL_MODE="0")
+AC_SUBST(RT_DEVEL_MODE)
 dnl This section maps the variable names this script 'natively' generates
 dnl to their existing names. They should be removed from here as the .in
 dnl files are changed to use the new names.

Modified: rt/branches/3.3-TESTING/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/3.3-TESTING/etc/RT_Config.pm.in	(original)
+++ rt/branches/3.3-TESTING/etc/RT_Config.pm.in	Mon Nov  8 22:47:40 2004
@@ -432,4 +432,24 @@
 
 # }}}
 
+
+# {{{ Development Mode
+#
+# RT comes with a "Development mode" setting. 
+# This setting, as a convenience for developers, turns on 
+# all sorts of development options that you most likely don't want in 
+# production:
+#
+# * Turns off Mason's 'static_source' directive. By default, you can't 
+#   edit RT's web ui components on the fly and have RT magically pick up
+#   your changes. (It's a big performance hit)
+#
+#  * More to come
+#
+
+Set(DeveloperlMode => '@RT_DEVEL_MODE@');
+
+# }}}
+
+
 1;

Modified: rt/branches/3.3-TESTING/html/Elements/PageLayout
==============================================================================
--- rt/branches/3.3-TESTING/html/Elements/PageLayout	(original)
+++ rt/branches/3.3-TESTING/html/Elements/PageLayout	Mon Nov  8 22:47:40 2004
@@ -93,7 +93,7 @@
 </tr>
 <TR valign="top">
 <TD valign="top" width="100%" height="100%" class="mainbody" >
-
+%$m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
 <%INIT>
 
   foreach my $tab (sort keys %{$toptabs}) {

Modified: rt/branches/3.3-TESTING/html/Elements/TicketList
==============================================================================
--- rt/branches/3.3-TESTING/html/Elements/TicketList	(original)
+++ rt/branches/3.3-TESTING/html/Elements/TicketList	Mon Nov  8 22:47:40 2004
@@ -40,6 +40,8 @@
 %   my $i;
 %   while (my $record = $Collection->Next) {
 %   $i++;
+% # Every ten rows, flush the buffer and put something on the page.
+% $m->flush_buffer() unless ($i % 10);
 <&   /Elements/CollectionAsTable/Row, Format => \@Format, i => $i, record => $record, maxitems => $maxitems &>
 %   }
 

Modified: rt/branches/3.3-TESTING/html/Elements/TitleBoxEnd
==============================================================================
--- rt/branches/3.3-TESTING/html/Elements/TitleBoxEnd	(original)
+++ rt/branches/3.3-TESTING/html/Elements/TitleBoxEnd	Mon Nov  8 22:47:40 2004
@@ -46,6 +46,9 @@
     </TD>
   </TR>
 </TABLE>
+% #Manually flush the content buffer after each titlebox is displayed
+% $m->flush_buffer();
+
 <%ARGS>
 $title => undef
 $content => undef

Modified: rt/branches/3.3-TESTING/html/Ticket/Elements/ShowHistory
==============================================================================
--- rt/branches/3.3-TESTING/html/Ticket/Elements/ShowHistory	(original)
+++ rt/branches/3.3-TESTING/html/Ticket/Elements/ShowHistory	Mon Nov  8 22:47:40 2004
@@ -116,6 +116,10 @@
               AttachmentContent    => $trans_content,
               LastTransaction      => $Transactions->IsLast
  );
+
+# manually flush the content buffer after each txn, so the user sees
+# some update
+$m->flush_buffer(); 
 }
 
 </%perl>

Modified: rt/branches/3.3-TESTING/lib/RT/Interface/Web/Handler.pm
==============================================================================
--- rt/branches/3.3-TESTING/lib/RT/Interface/Web/Handler.pm	(original)
+++ rt/branches/3.3-TESTING/lib/RT/Interface/Web/Handler.pm	Mon Nov  8 22:47:40 2004
@@ -53,7 +53,9 @@
     default_escape_flags => 'h',
     data_dir             => "$RT::MasonDataDir",
     allow_globals        => [qw(%session)],
-    autoflush            => 1
+    # Turn off static source if we're not in developer mode.
+    static_source        => ($RT::DevelMode ? '0' : '1'), 
+    autoflush            => 0
 ) };
 
 # {{{ sub new 


More information about the Rt-commit mailing list