[Rt-commit] [svn] r1864 - in rt/branches/PLATANO-EXPERIMENTAL-CSS:
. etc html/Elements html/Ticket/Elements lib/RT/Interface/Web
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Thu Nov 11 03:51:25 EST 2004
Author: jesse
Date: Thu Nov 11 03:51:25 2004
New Revision: 1864
Modified:
rt/branches/PLATANO-EXPERIMENTAL-CSS/ (props changed)
rt/branches/PLATANO-EXPERIMENTAL-CSS/configure.ac
rt/branches/PLATANO-EXPERIMENTAL-CSS/etc/RT_Config.pm.in
rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/PageLayout
rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/TicketList
rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/TitleBoxEnd
rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Ticket/Elements/ShowHistory
rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Handler.pm
Log:
r9126 at tinbook: jesse | 2004-11-11T04:07:52.654642Z
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/PLATANO-EXPERIMENTAL-CSS/configure.ac
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/configure.ac (original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/configure.ac Thu Nov 11 03:51:25 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/PLATANO-EXPERIMENTAL-CSS/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/etc/RT_Config.pm.in (original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/etc/RT_Config.pm.in Thu Nov 11 03:51:25 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/PLATANO-EXPERIMENTAL-CSS/html/Elements/PageLayout
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/PageLayout (original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/PageLayout Thu Nov 11 03:51:25 2004
@@ -78,7 +78,7 @@
<& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &>
</div>
<div 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/PLATANO-EXPERIMENTAL-CSS/html/Elements/TicketList
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/TicketList (original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/TicketList Thu Nov 11 03:51:25 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/PLATANO-EXPERIMENTAL-CSS/html/Elements/TitleBoxEnd
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/TitleBoxEnd (original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/TitleBoxEnd Thu Nov 11 03:51:25 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/PLATANO-EXPERIMENTAL-CSS/html/Ticket/Elements/ShowHistory
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Ticket/Elements/ShowHistory (original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Ticket/Elements/ShowHistory Thu Nov 11 03:51:25 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/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Handler.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Handler.pm (original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/Interface/Web/Handler.pm Thu Nov 11 03:51:25 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