зеркало из https://github.com/mozilla/pjs.git
Support min_row_size, max_row_size params (helps for debugging)
This commit is contained in:
Родитель
bb045b87a8
Коммит
5020de75ed
|
@ -8,7 +8,8 @@ use Tinderbox3::BonsaiColumns;
|
|||
use Tinderbox3::BuildTimeColumn;
|
||||
|
||||
sub print_showbuilds {
|
||||
my ($p, $dbh, $fh, $tree, $start_time, $end_time) = @_;
|
||||
my ($p, $dbh, $fh, $tree, $start_time, $end_time,
|
||||
$min_row_size, $max_row_size) = @_;
|
||||
|
||||
#
|
||||
# Get tree and patch info
|
||||
|
@ -19,7 +20,9 @@ sub print_showbuilds {
|
|||
}
|
||||
my ($field_short_names, $field_processors_str, $header, $footer,
|
||||
$special_message, $sheriff, $build_engineer, $cvs_co_date, $status,
|
||||
$min_row_size, $max_row_size) = @{$tree_info};
|
||||
$default_min_row_size, $default_max_row_size) = @{$tree_info};
|
||||
$min_row_size = $default_min_row_size if !defined($min_row_size);
|
||||
$max_row_size = $default_max_row_size if !defined($max_row_size);
|
||||
my %field_processors;
|
||||
# Create the handlers for the different fields
|
||||
require Tinderbox3::FieldProcessors::default;
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/perl -wT -I.
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use Tinderbox3::DB;
|
||||
use Tinderbox3::ShowBuilds;
|
||||
|
||||
my $p = new CGI;
|
||||
my $dbh = get_dbh();
|
||||
|
||||
my $tree = $p->param('tree') || "";
|
||||
# XXX These will get set by parameters eventually
|
||||
my ($start_time, $end_time);
|
||||
if ($p->param('start_time')) {
|
||||
$start_time = $p->param('start_time');
|
||||
if ($start_time > time) {
|
||||
$start_time = time;
|
||||
}
|
||||
$end_time = $start_time + ($p->param('interval') || (24*60*60));
|
||||
if ($end_time > time) {
|
||||
$end_time = time;
|
||||
}
|
||||
} else {
|
||||
$end_time = time;
|
||||
$start_time = $end_time - 24*60*60;
|
||||
}
|
||||
|
||||
print $p->header;
|
||||
Tinderbox3::ShowBuilds::print_showbuilds($p, $dbh, *STDOUT, $tree, $start_time,
|
||||
$end_time);
|
||||
|
||||
$dbh->disconnect;
|
|
@ -8,7 +8,8 @@ use Tinderbox3::BonsaiColumns;
|
|||
use Tinderbox3::BuildTimeColumn;
|
||||
|
||||
sub print_showbuilds {
|
||||
my ($p, $dbh, $fh, $tree, $start_time, $end_time) = @_;
|
||||
my ($p, $dbh, $fh, $tree, $start_time, $end_time,
|
||||
$min_row_size, $max_row_size) = @_;
|
||||
|
||||
#
|
||||
# Get tree and patch info
|
||||
|
@ -19,7 +20,9 @@ sub print_showbuilds {
|
|||
}
|
||||
my ($field_short_names, $field_processors_str, $header, $footer,
|
||||
$special_message, $sheriff, $build_engineer, $cvs_co_date, $status,
|
||||
$min_row_size, $max_row_size) = @{$tree_info};
|
||||
$default_min_row_size, $default_max_row_size) = @{$tree_info};
|
||||
$min_row_size = $default_min_row_size if !defined($min_row_size);
|
||||
$max_row_size = $default_max_row_size if !defined($max_row_size);
|
||||
my %field_processors;
|
||||
# Create the handlers for the different fields
|
||||
require Tinderbox3::FieldProcessors::default;
|
||||
|
|
|
@ -9,7 +9,6 @@ my $p = new CGI;
|
|||
my $dbh = get_dbh();
|
||||
|
||||
my $tree = $p->param('tree') || "";
|
||||
# XXX These will get set by parameters eventually
|
||||
my ($start_time, $end_time);
|
||||
if ($p->param('start_time')) {
|
||||
$start_time = $p->param('start_time');
|
||||
|
@ -25,8 +24,11 @@ if ($p->param('start_time')) {
|
|||
$start_time = $end_time - 24*60*60;
|
||||
}
|
||||
|
||||
my $min_row_size = $p->param('min_row_size');
|
||||
my $max_row_size = $p->param('max_row_size');
|
||||
|
||||
print $p->header;
|
||||
Tinderbox3::ShowBuilds::print_showbuilds($p, $dbh, *STDOUT, $tree, $start_time,
|
||||
$end_time);
|
||||
$end_time, $min_row_size, $max_row_size);
|
||||
|
||||
$dbh->disconnect;
|
||||
|
|
Загрузка…
Ссылка в новой задаче