зеркало из https://github.com/mozilla/pjs.git
Add continue line to the bottom of the table. Maybe someone can add one to the top as well.
This commit is contained in:
Родитель
3c995f7915
Коммит
6c72317a8f
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 "<tr align=center>\n";
|
||||
print "<td align=right $hour_color>${qr}\n${tt}${er}</td>\n";
|
||||
|
||||
|
||||
if( $tree2 ne "" ){
|
||||
print "<td align=center bgcolor=beige>\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 "<td rowspan=$rowspan bgcolor=${color}>\n";
|
||||
|
||||
|
@ -366,7 +373,6 @@ sub display_build_table_row {
|
|||
}
|
||||
print "</tt>\n";
|
||||
print "</td>";
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -378,6 +384,27 @@ sub display_build_table_row {
|
|||
print "</tr>\n";
|
||||
}
|
||||
|
||||
sub display_continue_row {
|
||||
local($t) = @_;
|
||||
|
||||
print '<tr><td align=center colspan=2>';
|
||||
my $nextdate = $maxdate - $hours*60*60;
|
||||
print "<a href='showbuilds.cgi"
|
||||
."?tree=$tree&hours=$hours&maxdate=$nextdate&nocrap=1'>"
|
||||
."Show next $hours hours</a>";
|
||||
print '</td>';
|
||||
|
||||
$bn = 1;
|
||||
while ($bn <= $name_count) {
|
||||
if (defined($br = $build_table->[$t][$bn]) and $br != -1) {
|
||||
print '<td></td>';
|
||||
} else {
|
||||
print '<td bgcolor="'.$last_color{$bn}
|
||||
.'" background="cont.gif"> </td>';
|
||||
}
|
||||
$bn++;
|
||||
}
|
||||
}
|
||||
|
||||
sub display_build_table_header {
|
||||
my($i,$nspan);
|
||||
|
@ -442,10 +469,6 @@ sub display_build_table_header {
|
|||
|
||||
sub display_build_table_footer {
|
||||
print "</table>\n";
|
||||
my $nextdate = $maxdate - $hours*60*60;
|
||||
print "<a href='showbuilds.cgi?tree=$tree&hours=$hours&maxdate=$nextdate&nocrap=1'>";
|
||||
print "Show next $hours hours</a><br><br>\n";
|
||||
|
||||
if (open(FOOTER, "<$data_dir/footer.html")) {
|
||||
while (<FOOTER>) {
|
||||
print $_;
|
||||
|
|
Загрузка…
Ссылка в новой задаче