diff --git a/webtools/tinderbox/globals.pl b/webtools/tinderbox/globals.pl index 9f26b9b9a07..77fc6a21a77 100755 --- a/webtools/tinderbox/globals.pl +++ b/webtools/tinderbox/globals.pl @@ -36,6 +36,7 @@ $name_count = 0; $build_time_index = {}; $build_time_times = []; $time_count = 0; +$mindate_time_count = 0; # time_count that corresponds to the mindate $build_table = []; $who_list = []; @@ -216,8 +217,8 @@ sub load_buildlog { # Ignore stuff in the future. next if $buildtime > $maxdate; - # Ignore stuff in the past - if ($buildtime < $mindate) { + # Ignore stuff in the past (but get a 2 hours of extra data) + if ($buildtime < $mindate - 2*60*60) { # Occasionally, a build might show up with a bogus time. So, # we won't judge ourselves as having hit the end until we # hit a full 20 lines in a row that are too early. @@ -325,6 +326,7 @@ sub get_build_time_index { $i = 1; for $n (sort {$b <=> $a} keys (%{$build_time_index})) { $build_time_times->[$i] = $n; + $mindate_time_count = $i if $n >= $mindate; $i++; } diff --git a/webtools/tinderbox/showbuilds.cgi b/webtools/tinderbox/showbuilds.cgi index d06f56bed3a..6b09c8535f0 100755 --- a/webtools/tinderbox/showbuilds.cgi +++ b/webtools/tinderbox/showbuilds.cgi @@ -238,11 +238,16 @@ sub display_build_table { sub display_build_table_body { my($t); + # Set by display_build_table_row() for display_continue_row() + %last_color = (); + $t = 1; while( $t <= $time_count ){ + last if $build_time_times->[$t] < $mindate; display_build_table_row( $t ); $t++; } + display_continue_row($t) if $t <= $time_count; } sub display_build_table_row { @@ -275,7 +280,6 @@ sub display_build_table_row { print "\n"; print "${qr}\n${tt}${er}\n"; - if( $tree2 ne "" ){ print "\n"; $qr = &query_ref( $td1, $build_time_times->[$t]); @@ -312,7 +316,10 @@ sub display_build_table_row { $hasnote = $br->{hasnote}; $noteid = $hasnote ? $br->{noteid} : 0; $rowspan = $br->{rowspan}; + $rowspan = $mindate_time_count - $t + 1 + if $t + $rowspan - 1 > $mindate_time_count; $color = $colormap->{$br->{buildstatus}}; + $last_color{$bn} = $color; $status = $br->{buildstatus}; print "\n"; @@ -366,7 +373,6 @@ sub display_build_table_row { } print "\n"; print ""; - } } else { @@ -378,6 +384,27 @@ sub display_build_table_row { print "\n"; } +sub display_continue_row { + local($t) = @_; + + print ''; + my $nextdate = $maxdate - $hours*60*60; + print "" + ."Show next $hours hours"; + print ''; + + $bn = 1; + while ($bn <= $name_count) { + if (defined($br = $build_table->[$t][$bn]) and $br != -1) { + print ''; + } else { + print ' '; + } + $bn++; + } +} sub display_build_table_header { my($i,$nspan); @@ -442,10 +469,6 @@ sub display_build_table_header { sub display_build_table_footer { print "\n"; - my $nextdate = $maxdate - $hours*60*60; - print ""; - print "Show next $hours hours

\n"; - if (open(FOOTER, "<$data_dir/footer.html")) { while (