hydra: make sure viewing logs works when logs are bz2'd
[?]
Aug 10, 2010, 1:11 PM
SAIUFDP3EFXENSB3XS4OKXNOTGLCYGPW3QNHCXASXBDEEDGYRWUACDependencies
- [2]
U6UJRDG2* Oops. - [3]
Q24QXGSM* Don't do pretty printing for large logs, because the XSLT processing - [4]
6F4UNDTC* Provide access to the raw, non-pretty-printed logfiles. - [5]
QE253KG4* Option to show the tail of a log. - [6]
C2DCO6AS - [7]
YW66LY44* hydra: enable pp'ing of logs for bigger files again - [8]
6M4KNDXX* Catalyst::View::Download::Plain doesn't like empty files. - [9]
LBNVQXUB* Build the /build stuff in a separate controller.
Change contents
- edit in src/lib/Hydra/Controller/Build.pm at line 108
my $fallbackpath = -f $path ? $path : "$path.bz2"; - replacement in src/lib/Hydra/Controller/Build.pm at line 111
notFound($c, "Log file $path no longer exists.") unless -f $path;notFound($c, "Log file $path no longer exists.") unless -f $fallbackpath;$path = $fallbackpath;my $pipestart = ($path =~ /.bz2$/ ? "cat $path | bzip2 -d" : "cat $path") ; - replacement in src/lib/Hydra/Controller/Build.pm at line 118
my $pipeline = ($path =~ /.bz2$/ ? "cat $path | bzip2 -d" : "cat $path")my $pipeline = $pipestart - replacement in src/lib/Hydra/Controller/Build.pm at line 127
$c->serve_static_file($path);$c->stash->{'plain'} = { data => (scalar `$pipestart`) || " " };$c->forward('Hydra::View::Plain'); - replacement in src/lib/Hydra/Controller/Build.pm at line 132
$c->stash->{'plain'} = { data => (scalar `tail -n 50 $path`) || " " };$c->stash->{'plain'} = { data => (scalar `$pipestart | tail -n 50`) || " " };