1998-06-17 01:43:24 +04:00
|
|
|
#!/usr/bonsaitools/bin/perl --
|
|
|
|
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Netscape Public License
|
|
|
|
# Version 1.0 (the "License"); you may not use this file except in
|
|
|
|
# compliance with the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/NPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS"
|
|
|
|
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing rights and limitations
|
|
|
|
# under the License.
|
|
|
|
#
|
|
|
|
# The Original Code is the Tinderbox build tool.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape Communications
|
|
|
|
# Corporation. Portions created by Netscape are Copyright (C) 1998
|
|
|
|
# Netscape Communications Corporation. All Rights Reserved.
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
use lib '../bonsai';
|
1998-06-17 01:43:24 +04:00
|
|
|
require 'globals.pl';
|
|
|
|
require 'lloydcgi.pl';
|
|
|
|
require 'imagelog.pl';
|
|
|
|
require 'header.pl';
|
|
|
|
$|=1;
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
# Hack this until I can figure out how to do get default root. -slamm
|
1999-03-10 00:30:02 +03:00
|
|
|
$default_root = '/cvsroot';
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
# Show 12 hours by default
|
1998-06-17 01:43:24 +04:00
|
|
|
#
|
1999-03-10 00:30:02 +03:00
|
|
|
$nowdate = time;
|
|
|
|
if (not defined($maxdate = $form{maxdate})) {
|
|
|
|
$maxdate = $nowdate;
|
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
if ($form{showall}) {
|
|
|
|
$mindate = 0;
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
else {
|
1999-05-25 01:03:10 +04:00
|
|
|
$hours = 12;
|
|
|
|
$hours = $form{hours} if $form{hours};
|
|
|
|
$mindate = $maxdate - ($hours*60*60);
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
$colormap = {
|
1999-05-25 01:03:10 +04:00
|
|
|
success => '00ff00',
|
|
|
|
busted => 'red',
|
|
|
|
building => 'yellow',
|
|
|
|
testfailed => 'orange'
|
|
|
|
};
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
$tree = $form{tree};
|
1998-12-23 20:52:37 +03:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
if (exists $form{rebuildguilty} or exists $form{showall}) {
|
|
|
|
system ("./buildwho.pl -days 7 $tree > /dev/null");
|
|
|
|
undef $form{rebuildguilty};
|
1999-05-20 03:07:54 +04:00
|
|
|
}
|
1998-10-21 02:16:21 +04:00
|
|
|
|
1999-05-26 22:12:11 +04:00
|
|
|
&show_tree_selector, exit if $form{tree} eq '';
|
|
|
|
&do_quickparse, exit if $form{quickparse};
|
|
|
|
&do_express, exit if $form{express};
|
|
|
|
&do_rdf, exit if $form{rdf};
|
|
|
|
&do_flash, &do_panel, exit if $form{static};
|
|
|
|
&do_flash, exit if $form{flash};
|
|
|
|
&do_panel, exit if $form{panel};
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
&load_data;
|
|
|
|
&print_page_head;
|
|
|
|
&print_table_header;
|
|
|
|
&print_table_body;
|
|
|
|
&print_table_footer;
|
|
|
|
exit;
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
# end of main
|
|
|
|
#=====================================================================
|
1998-10-21 02:16:21 +04:00
|
|
|
|
|
|
|
sub make_tree_list {
|
1999-05-25 01:03:10 +04:00
|
|
|
my @result;
|
|
|
|
while(<*>) {
|
|
|
|
if( -d $_ && $_ ne 'data' && $_ ne 'CVS' && -f "$_/treedata.pl") {
|
|
|
|
push @result, $_;
|
1999-03-02 03:41:31 +03:00
|
|
|
}
|
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
return @result;
|
1999-03-02 03:41:31 +03:00
|
|
|
}
|
|
|
|
|
1998-06-17 01:43:24 +04:00
|
|
|
sub show_tree_selector {
|
|
|
|
|
1999-05-25 22:15:13 +04:00
|
|
|
print "Content-type: text/html\n\n";
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
EmitHtmlHeader("tinderbox");
|
1999-05-24 22:39:30 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
print "<P><TABLE WIDTH=\"100%\">";
|
|
|
|
print "<TR><TD ALIGN=CENTER>Select one of the following trees:</TD></TR>";
|
|
|
|
print "<TR><TD ALIGN=CENTER>\n";
|
|
|
|
print " <TABLE><TR><TD><UL>\n";
|
|
|
|
|
|
|
|
my @list = make_tree_list();
|
1998-09-01 05:11:34 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
foreach (@list) {
|
|
|
|
print "<LI><a href=showbuilds.cgi?tree=$_>$_</a>\n";
|
|
|
|
}
|
|
|
|
print "<//UL></TD></TR></TABLE></TD></TR></TABLE>";
|
|
|
|
|
|
|
|
print "<P><TABLE WIDTH=\"100%\">";
|
|
|
|
print "<TR><TD ALIGN=CENTER><a href=admintree.cgi>";
|
|
|
|
print "Administer</a> one of the following trees:</TD></TR>";
|
|
|
|
print "<TR><TD ALIGN=CENTER>\n";
|
|
|
|
print " <TABLE><TR><TD><UL>\n";
|
|
|
|
|
|
|
|
foreach (@list) {
|
|
|
|
print "<LI><a href=admintree.cgi?tree=$_>$_</a>\n";
|
|
|
|
}
|
|
|
|
print "<//UL></TD></TR></TABLE></TD></TR></TABLE>";
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
sub print_page_head {
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
print "Content-type: text/html",
|
|
|
|
($nowdate eq $maxdate ? "\nRefresh: 900" : ''),
|
|
|
|
"\n\n<HTML>\n";
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
# Get the message of the day only on the first pageful
|
|
|
|
do "$tree/mod.pl" if $nowdate eq $maxdate;
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
$treename = $tree . ($tree2 ne '' ? " and $tree2" : '');
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
my ($minute, $hour) = (localtime)[1,2];
|
|
|
|
my $now = sprintf("%02d:%02d", $hour, $minute);
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
EmitHtmlTitleAndHeader("tinderbox: $treename", "tinderbox",
|
|
|
|
"tree: $treename ($now)");
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
&print_javascript;
|
|
|
|
print "$message_of_day\n";
|
|
|
|
|
|
|
|
# Quote and Lengend
|
|
|
|
#
|
|
|
|
unless ($form{nocrap}) {
|
|
|
|
my ($imageurl,$imagewidth,$imageheight,$quote) = &get_image;
|
|
|
|
print qq{
|
|
|
|
<table width="100%" cellpadding=0 cellspacing=0>
|
|
|
|
<tr>
|
|
|
|
<td valign=bottom>
|
1998-09-08 23:48:29 +04:00
|
|
|
<p><center><a href=addimage.cgi><img src="$imageurl"
|
1999-05-25 01:03:10 +04:00
|
|
|
width=$imagewidth height=$imageheight><br>
|
|
|
|
$quote</a><br>
|
1998-09-08 23:48:29 +04:00
|
|
|
</center>
|
|
|
|
<p>
|
1999-05-25 01:03:10 +04:00
|
|
|
<td align=right valign=bottom>
|
|
|
|
<table cellspacing=0 cellpadding=1 border=0><tr><td align=center>
|
|
|
|
<TT>L</TT></td><td>= Show Build Log
|
|
|
|
</td></tr><tr><td align=center>
|
|
|
|
<img src="star.gif"></td><td>= Show Log comments
|
|
|
|
</td></tr><tr><td colspan=2>
|
|
|
|
<table cellspacing=1 cellpadding=1 border=1>
|
|
|
|
<tr bgcolor="$colormap->{success}"><td>Successful Build
|
|
|
|
<tr bgcolor="$colormap->{building}"><td>Build in Progress
|
|
|
|
<tr bgcolor="$colormap->{testfailed}"><td>Successful Build,
|
|
|
|
but Tests Failed
|
|
|
|
<tr bgcolor="$colormap->{busted}"><td>Build Failed
|
|
|
|
</table>
|
1998-09-08 23:48:29 +04:00
|
|
|
</td></tr></table>
|
1999-05-25 01:03:10 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if ($bonsai_tree) {
|
|
|
|
print "The tree is currently <font size=+2>";
|
|
|
|
print (&tree_open ? 'OPEN' : 'CLOSED');
|
|
|
|
print "</font>\n";
|
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
sub print_table_body {
|
|
|
|
for (my $tt=1; $tt <= $time_count; $tt++) {
|
|
|
|
last if $build_time_times->[$tt] < $mindate;
|
|
|
|
print_table_row($tt);
|
|
|
|
}
|
1999-05-24 22:39:30 +04:00
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
sub print_table_row {
|
|
|
|
my ($tt) = @_;
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
# Time column
|
|
|
|
#
|
|
|
|
my $query_link = '';
|
|
|
|
my $end_query = '';
|
|
|
|
my $pretty_time = &print_time($build_time_times->[$tt]);
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
($hour) = $pretty_time =~ /(\d\d):/;
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
if ($tree2 eq '' and ($lasthour != $hour or &has_who_list($tt))) {
|
|
|
|
$query_link = &query_ref($td1, $build_time_times->[$tt]);
|
|
|
|
$end_query = '</a>';
|
|
|
|
}
|
|
|
|
if ($lasthour == $hour) {
|
|
|
|
$pretty_time =~ s/^.* //;
|
|
|
|
} else {
|
|
|
|
$lasthour = $hour;
|
|
|
|
}
|
1999-05-24 22:39:30 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
my $hour_color = '';
|
|
|
|
$hour_color = ' bgcolor=#e7e7e7' if $build_time_times->[$tt] % 7200 <= 3600;
|
|
|
|
print "<tr align=center><td align=right $hour_color>",
|
|
|
|
"$query_link\n$pretty_time$end_query</td>\n";
|
1999-05-24 22:39:30 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
if ($tree2 ne '') {
|
|
|
|
print "<td align=center bgcolor=beige>\n";
|
|
|
|
$query_link = &query_ref( $td1, $build_time_times->[$tt]);
|
|
|
|
print "$query_link</a></td>\n";
|
|
|
|
}
|
1999-05-24 22:39:30 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
# Guilty
|
|
|
|
#
|
|
|
|
print '<td align=center>';
|
|
|
|
for $who (sort keys %{$who_list->[$tt]} ){
|
|
|
|
$qr = &who_menu($td1, $build_time_times->[$tt],
|
|
|
|
$build_time_times->[$tt-1],$who);
|
|
|
|
$who =~ s/%.*$//;
|
|
|
|
print " ${qr}$who</a>\n";
|
|
|
|
}
|
|
|
|
print '</td>';
|
1999-05-24 22:39:30 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
if ($tree2 ne '') {
|
|
|
|
print "<td align=center bgcolor=beige >\n";
|
|
|
|
$qr = &query_ref( $td2, $build_time_times->[$tt]);
|
|
|
|
print "${qr}</a></td>\n";
|
1999-05-24 22:39:30 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
print "<td align=center>\n";
|
|
|
|
|
|
|
|
for $who (sort keys %{$who_list2->[$tt]} ){
|
|
|
|
$qr = &who_menu($td2, $build_time_times->[$tt],
|
|
|
|
$build_time_times->[$tt-1],$who);
|
|
|
|
print " ${qr}$who</a>\n";
|
1999-04-15 23:23:44 +04:00
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
print '</td>';
|
|
|
|
}
|
1999-05-24 22:39:30 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
# Build Status
|
|
|
|
#
|
|
|
|
for ($bn=1; $bn <= $name_count; $bn++) {
|
|
|
|
if (not defined($br = $build_table->[$tt][$bn])) {
|
|
|
|
# No build data for this time
|
|
|
|
print "<td></td>\n";
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
next if $br == -1; # rowspan has covered this row
|
|
|
|
|
|
|
|
$hasnote = $br->{hasnote};
|
|
|
|
$noteid = $hasnote ? $br->{noteid} : 0;
|
|
|
|
$rowspan = $br->{rowspan};
|
|
|
|
$rowspan = $mindate_time_count - $tt + 1
|
|
|
|
if $tt + $rowspan - 1 > $mindate_time_count;
|
|
|
|
$color = $colormap->{$br->{buildstatus}};
|
|
|
|
$status = $br->{buildstatus};
|
|
|
|
print "<td align=center rowspan=$rowspan bgcolor=${color}>\n";
|
|
|
|
|
|
|
|
$logfile = $br->{logfile};
|
|
|
|
$errorparser = $br->{errorparser};
|
|
|
|
$buildname = $br->{buildname};
|
|
|
|
if( $tree2 ne "" ){
|
|
|
|
$buildname =~ s/^[^ ]* //;
|
|
|
|
}
|
|
|
|
$buildtime = $br->{buildtime};
|
|
|
|
$buildtree = $br->{td}->{name};
|
|
|
|
|
|
|
|
print "<tt>\n";
|
|
|
|
|
|
|
|
# Build Note
|
|
|
|
#
|
|
|
|
if ($hasnote) {
|
|
|
|
print "<a href='' onClick=\"return js_what_menu(event,$noteid,$bn,",
|
|
|
|
"'$logfile','$buildtime');\"><img src=star.gif border=0></a>\n";
|
1999-05-24 22:39:30 +04:00
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
|
|
|
|
# Build Log
|
|
|
|
#
|
|
|
|
$buildname = &url_encode($buildname);
|
|
|
|
print "<A HREF='showlog.cgi?logfile=$logfile\&tree=$buildtree",
|
|
|
|
"&errorparser=$errorparser&buildname=$buildname&buildtime=$buildtime' ",
|
|
|
|
"onClick=\"return log_popup(event,$bn,'$logfile','$buildtime');\">";
|
|
|
|
print "L</a>";
|
|
|
|
|
|
|
|
# What Changed
|
|
|
|
#
|
|
|
|
# This gives bogus information because the CVS mirror is
|
|
|
|
# out of sync with the build times
|
|
|
|
# if( $br->{previousbuildtime} ){
|
|
|
|
# my ($previous_br) = $build_table->[$tt+$rowspan][$bn];
|
|
|
|
# my ($previous_rowspan) = $previous_br->{rowspan};
|
|
|
|
# if (&has_who_list($tt+$rowspan,
|
|
|
|
# $tt+$rowspan+$previous_rowspan-1)) {
|
|
|
|
# $qr = &query_ref($br->{td},
|
|
|
|
# $br->{previousbuildtime},
|
|
|
|
# $br->{buildtime});
|
|
|
|
# print "\n$qr";
|
|
|
|
# print "C</a>";
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
|
|
|
|
if ($br->{binaryname} ne '') {
|
|
|
|
$binfile = "$buildtree/bin/$buildtime/$br->{buildname}/"
|
|
|
|
."$br->{binaryname}";
|
|
|
|
$binfile =~ s/ //g;
|
|
|
|
print " <a href=$binfile>B</a>";
|
|
|
|
}
|
|
|
|
print "</tt>\n</td>";
|
1999-05-24 22:39:30 +04:00
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
print "</tr>\n";
|
1999-05-24 22:39:30 +04:00
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
sub print_table_header {
|
|
|
|
my $ii, $nspan;
|
1999-05-24 09:56:26 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
print "<table border=1 bgcolor='#FFFFFF' cellspacing=1 cellpadding=1>\n";
|
1999-05-24 09:56:26 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
print "<tr align=center>\n";
|
|
|
|
print "<td rowspan=1><font size=-1>Click time to <br>see changes <br>",
|
|
|
|
"since time</font></td>";
|
|
|
|
$nspan = ($tree2 ne '' ? 4 : 1);
|
|
|
|
print "<td colspan=$nspan><font size=-1>",
|
|
|
|
"Click name to see what they did</font>";
|
|
|
|
print "<br><font size=-2><a href=showbuilds.cgi",make_cgi_args(),
|
1999-05-24 22:39:30 +04:00
|
|
|
"&rebuildguilty=1>Rebuild guilty list</a></td>";
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
for ($ii=1; $ii <= $name_count; $ii++) {
|
|
|
|
|
|
|
|
my $bn = $build_name_names->[$ii];
|
|
|
|
$bn =~ s/Clobber/Clbr/g;
|
|
|
|
$bn =~ s/Depend/Dep/g;
|
|
|
|
|
|
|
|
if( $form{narrow} ){
|
|
|
|
$bn =~ s/([^:])/$1<br>/g;
|
|
|
|
$bn = "<tt>$bn</tt>";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$bn = "<font face='Arial,Helvetica' size=-2>$bn</font>";
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
my $last_status = &last_status($ii);
|
|
|
|
if ($last_status eq 'busted') {
|
|
|
|
if ($form{nocrap}) {
|
|
|
|
print "<th rowspan=2 bgcolor=$colormap->{busted}>$bn</th>";
|
|
|
|
} else {
|
|
|
|
print "<td rowspan=2 bgcolor=000000 background=1afi003r.gif>";
|
|
|
|
print "<font color=white>$bn</font></td>";
|
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
else {
|
1999-05-25 01:03:10 +04:00
|
|
|
print "<th rowspan=2 bgcolor=$colormap->{$last_status}>$bn</th>";
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
}
|
|
|
|
print "</tr><tr>\n";
|
|
|
|
print "<b><TH>Build Time</th>\n";
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
if ($tree2 ne '') {
|
|
|
|
print "<TH colspan=2>$td1->{name}</th>\n";
|
|
|
|
print "<TH colspan=2>$td2->{name}</th>\n";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
print "<TH>Guilty</th>\n";
|
|
|
|
}
|
|
|
|
print "</b></tr>\n";
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
sub print_table_footer {
|
|
|
|
print "</table>\n";
|
1999-05-24 22:39:30 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
my $nextdate = $maxdate - $hours*60*60;
|
|
|
|
print "<a href='showbuilds.cgi",
|
|
|
|
"?tree=$tree&hours=$hours&maxdate=$nextdate&nocrap=1'>",
|
|
|
|
"Show next $hours hours</a>";
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
if (open(FOOTER, "<$data_dir/footer.html")) {
|
|
|
|
while (<FOOTER>) {
|
|
|
|
print $_;
|
|
|
|
}
|
|
|
|
close FOOTER;
|
|
|
|
}
|
|
|
|
print "<p><a href=admintree.cgi?tree=$tree>",
|
|
|
|
"Administrate Tinderbox Trees</a><br>";
|
|
|
|
print "<br><br>";
|
|
|
|
}
|
1999-05-24 09:56:26 +04:00
|
|
|
|
1999-05-24 22:39:30 +04:00
|
|
|
sub query_ref {
|
1999-05-25 01:03:10 +04:00
|
|
|
my ($td, $mindate, $maxdate, $who) = @_;
|
|
|
|
my $output = '';
|
|
|
|
|
|
|
|
$output = "<a href=../bonsai/cvsquery.cgi?module=$td->{cvs_module}";
|
|
|
|
$output .= "&branch=$td->{cvs_branch}" if $td->{cvs_branch} ne 'HEAD';
|
|
|
|
$output .= "&cvsroot=$td->{cvs_root}" if $td->{cvs_root} ne $default_root;
|
|
|
|
$output .= "&date=explicit&mindate=$mindate";
|
|
|
|
$output .= "&maxdate=$maxdate" if $maxdate ne '';
|
|
|
|
$output .= "&who=$who" if $who ne '';
|
|
|
|
$output .= ">";
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-03-02 04:30:24 +03:00
|
|
|
sub query_ref2 {
|
1999-05-25 01:03:10 +04:00
|
|
|
my ($td, $mindate, $maxdate, $who) = @_;
|
|
|
|
return "../bonsai/cvsquery.cgi?module=$td->{cvs_module}"
|
|
|
|
."&branch=$td->{cvs_branch}&cvsroot=$td->{cvs_root}"
|
|
|
|
."&date=explicit&mindate=$mindate&maxdate=$maxdate&who="
|
|
|
|
. url_encode($who);
|
1999-03-02 04:30:24 +03:00
|
|
|
}
|
|
|
|
|
1998-06-17 01:43:24 +04:00
|
|
|
sub who_menu {
|
1999-05-25 01:03:10 +04:00
|
|
|
my ($td, $mindate, $maxdate, $who) = @_;
|
|
|
|
my $treeflag;
|
1999-03-02 03:41:31 +03:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
$qr = "../registry/who.cgi?email=$e"
|
|
|
|
."&t0=". &url_encode("What did $who check into the source tree")
|
|
|
|
."&u0=". &url_encode( &query_ref2($td,$mindate,$maxdate,$who))
|
|
|
|
."&t1=". &url_encode("What has $who been checking in in the last day")
|
|
|
|
."&u1=". &url_encode( &query_ref2($td,$mindate,$maxdate,$who));
|
1999-03-02 03:41:31 +03:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
return "<a href='$qr' onclick=\"return js_who_menu($td->{num},'$who',"
|
|
|
|
."event,$mindate,$maxdate);\">";
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
# Check to see if anyone checked in during time slot.
|
|
|
|
# ex. has_who_list(1); # Check for checkins in most recent time slot.
|
|
|
|
# ex. has_who_list(1,5); # Check range of times.
|
|
|
|
sub has_who_list {
|
|
|
|
my ($time1, $time2) = @_;
|
|
|
|
|
|
|
|
if (not defined(@who_check_list)) {
|
|
|
|
# Build a static array of true/false values for each time slot.
|
|
|
|
$who_check_list[$time_count] = 0;
|
|
|
|
my ($t) = 1;
|
|
|
|
for (; $t<=$time_count; $t++) {
|
|
|
|
$who_check_list[$t] = 1 if each %{$who_list->[$t]};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($time2) {
|
|
|
|
for ($ii=$time1; $ii<=$time2; $ii++) {
|
|
|
|
return 1 if $who_check_list[$ii]
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
} else {
|
|
|
|
return $who_check_list[$time1];
|
|
|
|
}
|
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
|
|
|
|
sub tree_open {
|
1999-05-25 01:03:10 +04:00
|
|
|
my $done, $line, $a, $b;
|
|
|
|
open(BID, "<../bonsai/data/$bonsai_tree/batchid")
|
|
|
|
or print "can't open batchid<br>";
|
|
|
|
($a,$b,$bid) = split / /, <BID>;
|
|
|
|
close(BID);
|
|
|
|
open(BATCH, "<../bonsai/data/$bonsai_tree/batch-${bid}")
|
|
|
|
or print "can't open batch-${bid}<br>";;
|
|
|
|
$done = 0;
|
|
|
|
while (($line = <BATCH>) and not $done){
|
|
|
|
if ($line =~ /^set treeopen/) {
|
|
|
|
chop $line;
|
|
|
|
($a,$b,$treestate) = split / /, $line ;
|
|
|
|
$done = 1;
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
}
|
|
|
|
close(BATCH);
|
|
|
|
return $treestate;
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
sub print_javascript {
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 04:20:21 +04:00
|
|
|
print <<'__ENDJS';
|
1999-05-25 01:03:10 +04:00
|
|
|
<script>
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
if (parseInt(navigator.appVersion) < 4) {
|
|
|
|
window.event = 0;
|
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
function js_who_menu(tree,n,d,mindate,maxdate) {
|
|
|
|
var who_link = "../registry/who.cgi?email=" + escape(n)
|
|
|
|
+ "&t0=" + escape("Last check-in")
|
|
|
|
+ "&u0=" + escape(js_qr(tree,mindate,maxdate,n))
|
|
|
|
+ "&t1=" + escape("Check-ins within 24 hours")
|
|
|
|
+ "&u1=" + escape(js_qr24(tree,n));
|
1999-03-02 03:41:31 +03:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
var version = parseInt(navigator.appVersion);
|
|
|
|
if (version < 4 || version >= 5) {
|
|
|
|
document.location = who_link;
|
|
|
|
return false;
|
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
var l = document.layers['popup'];
|
|
|
|
l.src = who_link;
|
|
|
|
l.top = d.target.y - 6;
|
|
|
|
l.left = d.target.x - 6;
|
|
|
|
if (l.left + l.clipWidth > window.width) {
|
1998-06-17 01:43:24 +04:00
|
|
|
l.left = window.width - l.clipWidth;
|
1999-05-25 01:03:10 +04:00
|
|
|
}
|
|
|
|
l.visibility="show";
|
|
|
|
return false;
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
function log_params(buildindex,logfile,buildtime) {
|
|
|
|
var tree = trees[buildindex];
|
|
|
|
var buildname = build[buildindex];
|
|
|
|
var errorparser = error[buildindex];
|
1999-05-20 04:36:09 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
return "tree=" + tree
|
|
|
|
+ "&errorparser=" + errorparser
|
|
|
|
+ "&buildname=" + escape(buildname)
|
|
|
|
+ "&buildtime=" + buildtime
|
|
|
|
+ "&logfile=" + logfile;
|
|
|
|
}
|
1999-05-20 04:36:09 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
function log_url(buildindex,logfile,buildtime) {
|
|
|
|
return "showlog.cgi?" + log_params(buildindex,logfile,buildtime);
|
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
function comment_url (buildindex,logfile,buildtime) {
|
|
|
|
return "addnote.cgi?" + log_params(buildindex,logfile,buildtime);
|
1999-05-24 22:39:30 +04:00
|
|
|
}
|
1999-05-24 09:56:26 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
function js_what_menu(d,noteid,buildindex,logfile,buildtime) {
|
|
|
|
var version = parseInt(navigator.appVersion);
|
|
|
|
if (version < 4 || version >= 5) {
|
|
|
|
document.location = log_url(buildindex,logfile,buildtime);
|
|
|
|
return false;
|
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
var l = document.layers['popup'];
|
|
|
|
l.document.write("<table border=1 cellspacing=1><tr><td>"
|
|
|
|
+ note[noteid] + "</tr></table>");
|
|
|
|
l.document.close();
|
|
|
|
|
|
|
|
l.top = d.y-10;
|
|
|
|
var zz = d.x;
|
|
|
|
if (zz + l.clip.right > window.innerWidth) {
|
1998-06-17 01:43:24 +04:00
|
|
|
zz = (window.innerWidth-30) - l.clip.right;
|
1999-05-25 01:03:10 +04:00
|
|
|
if (zz < 0) {
|
|
|
|
zz = 0;
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
}
|
|
|
|
l.left = zz;
|
|
|
|
l.visibility="show";
|
|
|
|
return false;
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
note = new Array();
|
|
|
|
trees = new Array();
|
|
|
|
build = new Array();
|
|
|
|
error = new Array();
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
function log_popup(e,buildindex,logfile,buildtime)
|
|
|
|
{
|
|
|
|
var logurl = log_url(buildindex,logfile,buildtime);
|
|
|
|
var commenturl = comment_url(buildindex,logfile,buildtime);
|
|
|
|
var version = parseInt(navigator.appVersion);
|
1999-05-20 04:36:09 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
if (version < 4 || version >= 5) {
|
|
|
|
document.location = logurl;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
var q = document.layers["logpopup"];
|
|
|
|
q.top = e.target.y - 6;
|
1999-05-20 04:36:09 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
var yy = e.target.x;
|
|
|
|
if ( yy + q.clip.right > window.innerWidth) {
|
|
|
|
yy = (window.innerWidth-30) - q.clip.right;
|
|
|
|
if (yy < 0) {
|
|
|
|
yy = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
q.left = yy;
|
|
|
|
q.visibility="show";
|
|
|
|
q.document.write("<TABLE BORDER=1><TR><TD><B>"
|
|
|
|
+ build[buildindex] + "</B><BR>"
|
|
|
|
+ "<A HREF=\"" + logurl + "\">View Brief Log</A><BR>"
|
|
|
|
+ "<A HREF=\"" + logurl + "&fulltext=1" + "\">View Full Log</A><BR>"
|
|
|
|
+ "<A HREF=\"" + commenturl + "\">Add a Comment</A><BR>"
|
|
|
|
+ "</TD></TR></TABLE>");
|
|
|
|
q.document.close();
|
1999-03-02 03:41:31 +03:00
|
|
|
return false;
|
1998-08-20 03:20:45 +04:00
|
|
|
}
|
1999-05-25 04:20:21 +04:00
|
|
|
__ENDJS
|
1998-08-20 03:20:45 +04:00
|
|
|
|
1999-05-25 04:20:21 +04:00
|
|
|
print <<"__ENDJS";
|
1999-05-25 01:03:10 +04:00
|
|
|
function js_qr(tree,mindate, maxdate, who) {
|
|
|
|
if (tree == 0) {
|
|
|
|
return '../bonsai/cvsquery.cgi?module=${cvs_module}'
|
|
|
|
+ '&branch=${cvs_branch}&cvsroot=${cvs_root}&date=explicit'
|
|
|
|
+ '&mindate=' + mindate + '&maxdate=' +maxdate + '&who=' + who;
|
|
|
|
}
|
|
|
|
__ENDJS
|
|
|
|
|
1999-05-25 04:17:46 +04:00
|
|
|
print <<"__ENDJS" if $tree2 ne '';
|
1999-05-25 01:03:10 +04:00
|
|
|
else {
|
|
|
|
return '../bonsai/cvsquery.cgi?module=$td2->{cvs_module}'
|
|
|
|
+ '&branch=$td2->{cvs_branch}&cvsroot=$td2->{cvs_root}'
|
|
|
|
+ '&date=explicit'
|
|
|
|
+ '&mindate=' + mindate + '&maxdate=' +maxdate + '&who=' + who;
|
|
|
|
}
|
|
|
|
__ENDJS
|
|
|
|
|
1999-05-25 04:17:46 +04:00
|
|
|
print <<"__ENDJS";
|
1999-05-24 09:56:26 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
function js_qr24(tree,who) {
|
|
|
|
if (tree == 0 ){
|
|
|
|
return '../bonsai/cvsquery.cgi?module=${cvs_module}'
|
|
|
|
+ '&branch=${cvs_branch}&cvsroot=${cvs_root}&date=day&who=' + who;
|
|
|
|
}
|
|
|
|
__ENDJS
|
|
|
|
|
1999-05-25 04:17:46 +04:00
|
|
|
print <<"__ENDJS" if $tree2 ne '';
|
1999-05-25 01:03:10 +04:00
|
|
|
else {
|
|
|
|
return '../bonsai/cvsquery.cgi?module=$td2->{cvs_module}'
|
|
|
|
+ '&branch=$td2->{cvs_branch}&cvsroot=$td2->{cvs_root}'
|
|
|
|
+ '&date=day&who=' +who;
|
|
|
|
}
|
|
|
|
__ENDJS
|
|
|
|
|
|
|
|
print <<'__ENDJS';
|
|
|
|
}
|
|
|
|
__ENDJS
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
$ii = 0;
|
|
|
|
while ($ii < @note_array) {
|
|
|
|
$ss = $note_array[$ii];
|
|
|
|
while ($ii < @note_array && $note_array[$ii] eq $ss) {
|
|
|
|
print "note[$ii] = ";
|
|
|
|
$ii++;
|
|
|
|
}
|
|
|
|
$ss =~ s/\\/\\\\/g;
|
|
|
|
$ss =~ s/\"/\\\"/g;
|
|
|
|
$ss =~ s/\n/\\n/g;
|
|
|
|
print "\"$ss\";\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
for ($ii=1; $ii <= $name_count; $ii++) {
|
|
|
|
if (defined($br = $build_table->[1][$ii]) and $br != -1) {
|
1999-03-02 03:41:31 +03:00
|
|
|
$bn = $build_name_names->[$ii];
|
1999-05-25 01:03:10 +04:00
|
|
|
print "trees[$ii]='$br->{td}{name}';\n";
|
|
|
|
print "build[$ii]='$bn';\n";
|
|
|
|
print "error[$ii]='$br->{errorparser}';\n";
|
1999-03-02 03:41:31 +03:00
|
|
|
}
|
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
|
|
|
|
print <<'__ENDJS';
|
|
|
|
</script>
|
|
|
|
<layer name="popup" onMouseOut="this.visibility='hide';"
|
|
|
|
left=0 top=0 bgcolor="#ffffff" visibility="hide">
|
|
|
|
</layer>
|
|
|
|
|
|
|
|
<layer name="logpopup" onMouseOut="this.visibility='hide';"
|
|
|
|
left=0 top=0 bgcolor="#ffffff" visibility="hide">
|
|
|
|
</layer>
|
|
|
|
__ENDJS
|
1999-03-02 03:41:31 +03:00
|
|
|
}
|
|
|
|
|
1999-03-05 02:41:02 +03:00
|
|
|
sub do_express {
|
1999-05-25 01:03:10 +04:00
|
|
|
print "Content-type: text/html\nRefresh: 900\n\n<HTML>\n";
|
|
|
|
|
|
|
|
my %build, %times;
|
|
|
|
loadquickparseinfo($form{tree}, \%build, \%times);
|
|
|
|
|
|
|
|
my @keys = sort keys %build;
|
|
|
|
my $keycount = @keys;
|
|
|
|
my $tm = &print_time(time);
|
|
|
|
print "<table border=1 cellpadding=1 cellspacing=1><tr>";
|
|
|
|
print "<th align=left colspan=$keycount>";
|
|
|
|
print "<a href=showbuilds.cgi?tree=$form{tree}";
|
|
|
|
print "&hours=$form{hours}" if $form{hours};
|
1999-05-25 04:17:46 +04:00
|
|
|
print "&nocrap=1" if $form{nocrap};
|
1999-05-25 01:03:10 +04:00
|
|
|
print ">$tree as of $tm</a></tr><tr>\n";
|
|
|
|
foreach my $buildname (@keys) {
|
1999-05-25 04:17:46 +04:00
|
|
|
print "<td bgcolor='$colormap->{$build{$buildname}}'>$buildname</td>";
|
1999-05-25 01:03:10 +04:00
|
|
|
}
|
|
|
|
print "</tr></table>\n";
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
1998-10-21 02:16:21 +04:00
|
|
|
|
1999-05-16 06:38:55 +04:00
|
|
|
# This is essentially do_express but it outputs a different format
|
|
|
|
sub do_panel {
|
1999-05-26 22:12:11 +04:00
|
|
|
local *OUT;
|
|
|
|
my $oldfh;
|
|
|
|
my $outfile = "$form{tree}/panel.html";
|
|
|
|
|
|
|
|
if ($form{static}) {
|
|
|
|
open(OUT,">$outfile.$$");
|
|
|
|
$oldfh = select OUT;
|
|
|
|
} else {
|
|
|
|
print "Content-type: text/html\n\n<HTML>\n";
|
|
|
|
}
|
1999-05-24 22:39:30 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
print q(
|
|
|
|
<head>
|
1999-05-27 04:22:02 +04:00
|
|
|
<META HTTP-EQUIV="Refresh" CONTENT="300">
|
1999-05-25 01:03:10 +04:00
|
|
|
<style>
|
|
|
|
body, td {
|
|
|
|
font-family: Verdana, Sans-Serif;
|
|
|
|
font-size: 8pt;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body BGCOLOR="#FFFFFF" TEXT="#000000"
|
|
|
|
LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
|
|
|
|
);
|
|
|
|
print "<a href=showbuilds.cgi?tree=$form{tree}";
|
|
|
|
print "&hours=$form{hours}" if $form{hours};
|
|
|
|
print "&nocrap=1" if $form{nocrap};
|
|
|
|
print ">$tree";
|
|
|
|
|
|
|
|
$bonsai_tree = '';
|
|
|
|
require "$tree/treedata.pl";
|
1999-05-25 04:17:46 +04:00
|
|
|
if ($bonsai_tree ne '') {
|
1999-05-25 01:03:10 +04:00
|
|
|
print " is ", tree_open() ? "OPEN" : "CLOSED";
|
|
|
|
}
|
1999-05-25 04:17:46 +04:00
|
|
|
# Add the current time
|
|
|
|
my ($minute,$hour,$mday,$mon) = (localtime)[1..4];
|
|
|
|
my $tm = sprintf("%d/%d %d:%02d",$mon+1,$mday,$hour,$minute);
|
1999-05-25 01:03:10 +04:00
|
|
|
print " as of $tm</a><br>";
|
|
|
|
|
1999-05-25 04:17:46 +04:00
|
|
|
my %build, %times;
|
|
|
|
loadquickparseinfo($form{tree}, \%build, \%times);
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
print "<table border=0 cellpadding=1 cellspacing=1>";
|
1999-05-25 04:17:46 +04:00
|
|
|
while (my ($name, $status) = each %build) {
|
|
|
|
print "<tr><td bgcolor='$colormap->{$status}'>$name</td></tr>";
|
1999-05-25 01:03:10 +04:00
|
|
|
}
|
|
|
|
print "</table></body>";
|
1999-05-26 22:12:11 +04:00
|
|
|
|
|
|
|
if ($form{static}) {
|
|
|
|
close(OUT);
|
|
|
|
system "mv $outfile.$$ $outfile";
|
|
|
|
select $oldfh;
|
|
|
|
}
|
1999-05-16 06:38:55 +04:00
|
|
|
}
|
|
|
|
|
1999-05-20 01:20:00 +04:00
|
|
|
sub do_flash {
|
1999-05-26 22:12:11 +04:00
|
|
|
local *OUT;
|
|
|
|
my $oldfh;
|
|
|
|
my $outfile = "$form{tree}/flash.rdf";
|
|
|
|
|
|
|
|
if ($form{static}) {
|
|
|
|
open(OUT,">$outfile.$$");
|
|
|
|
$oldfh = select OUT;
|
|
|
|
} else {
|
|
|
|
print "Content-type: text/rdf\n\n";
|
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
|
1999-05-20 01:20:00 +04:00
|
|
|
my %build, %times;
|
|
|
|
loadquickparseinfo($form{tree}, \%build, \%times);
|
|
|
|
|
|
|
|
my ($mac,$unix,$win) = (0,0,0);
|
|
|
|
|
1999-05-25 04:17:46 +04:00
|
|
|
while (my ($name, $status) = each %build) {
|
|
|
|
next if $status eq 'success';
|
|
|
|
$mac = 1, next if $name =~ /Mac/;
|
|
|
|
$win = 1, next if $name =~ /Win/;
|
1999-05-20 01:20:00 +04:00
|
|
|
$unix = 1;
|
|
|
|
}
|
|
|
|
|
1999-05-25 04:17:46 +04:00
|
|
|
print q{
|
1999-05-20 01:20:00 +04:00
|
|
|
<RDF:RDF xmlns:RDF='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
|
|
|
|
xmlns:NC='http://home.netscape.com/NC-rdf#'>
|
|
|
|
<RDF:Description about='NC:FlashRoot'>
|
|
|
|
};
|
|
|
|
|
|
|
|
my $busted = $mac + $unix + $win;
|
|
|
|
if ($busted) {
|
|
|
|
|
|
|
|
# Construct a legible sentence; e.g., "Mac, Unix, and Windows
|
|
|
|
# are busted", "Windows is busted", etc. This is hideous. If
|
|
|
|
# you can think of something better, please fix it.
|
|
|
|
|
1999-05-25 04:17:46 +04:00
|
|
|
my $text;
|
1999-05-20 01:20:00 +04:00
|
|
|
if ($mac) {
|
|
|
|
$text .= 'Mac' . ($busted > 2 ? ', ' : ($busted > 1 ? ' and ' : ''));
|
|
|
|
}
|
|
|
|
if ($unix) {
|
|
|
|
$text .= 'Unix' . ($busted > 2 ? ', and ' : ($win ? ' and ' : ''));
|
|
|
|
}
|
|
|
|
if ($win) {
|
|
|
|
$text .= 'Windows';
|
|
|
|
}
|
1999-05-25 04:17:46 +04:00
|
|
|
$text .= ($busted > 1 ? ' are ' : ' is ') . 'busted';
|
1999-05-20 01:20:00 +04:00
|
|
|
|
1999-05-25 04:17:46 +04:00
|
|
|
# The Flash spec says we need to give ctime.
|
|
|
|
use POSIX;
|
|
|
|
my $tm = POSIX::ctime(time());
|
|
|
|
$tm =~ s/^...\s//; # Strip day of week
|
|
|
|
$tm =~ s/:\d\d\s/ /; # Strip seconds
|
|
|
|
chop $tm;
|
|
|
|
|
1999-05-20 01:20:00 +04:00
|
|
|
print qq{
|
|
|
|
<NC:child>
|
|
|
|
<RDF:Description ID='flash'>
|
|
|
|
<NC:type resource='http://www.mozilla.org/RDF#TinderboxFlash' />
|
|
|
|
<NC:source>$tree</NC:source>
|
|
|
|
<NC:description>$text</NC:description>
|
|
|
|
<NC:timestamp>$tm</NC:timestamp>
|
|
|
|
</RDF:Description>
|
|
|
|
</NC:child>
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
1999-05-25 04:17:46 +04:00
|
|
|
print q{
|
1999-05-20 01:20:00 +04:00
|
|
|
</RDF:Description>
|
|
|
|
</RDF:RDF>
|
|
|
|
};
|
1999-05-26 22:12:11 +04:00
|
|
|
|
|
|
|
if ($form{static}) {
|
|
|
|
close(OUT);
|
|
|
|
system "mv $outfile.$$ $outfile";
|
|
|
|
select $oldfh;
|
|
|
|
}
|
1999-05-20 01:20:00 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
sub do_quickparse {
|
|
|
|
print "Content-type: text/plain\n\n";
|
1999-05-16 06:38:55 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
if ($tree eq '') {
|
|
|
|
foreach my $tt (make_tree_list()) {
|
|
|
|
print "$tt\n";
|
|
|
|
}
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
my @treelist = split /,/, $tree;
|
|
|
|
foreach my $t (@treelist) {
|
|
|
|
$bonsai_tree = "";
|
|
|
|
require "$t/treedata.pl";
|
|
|
|
if ($bonsai_tree ne "") {
|
|
|
|
my $state = tree_open() ? "Open" : "Close";
|
|
|
|
print "State|$t|$bonsai_tree|$state\n";
|
|
|
|
}
|
|
|
|
my %build, %times;
|
|
|
|
loadquickparseinfo($t, \%build, \%times);
|
1999-05-16 06:38:55 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
foreach my $buildname (sort keys %build) {
|
|
|
|
print "Build|$t|$buildname|$build{$buildname}\n";
|
1999-03-31 02:16:03 +04:00
|
|
|
}
|
1999-05-16 06:38:55 +04:00
|
|
|
}
|
1999-03-31 02:16:03 +04:00
|
|
|
}
|
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
sub do_rdf {
|
|
|
|
print "Content-type: text/plain\n\n";
|
1999-05-24 09:56:26 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
my $mainurl = "http://$ENV{SERVER_NAME}$ENV{SCRIPT_NAME}?tree=$tree";
|
|
|
|
my $dirurl = $mainurl;
|
1999-05-24 09:56:26 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
$dirurl =~ s@/[^/]*$@@;
|
|
|
|
|
|
|
|
my %build, %times;
|
|
|
|
loadquickparseinfo($tree, \%build, \%times);
|
|
|
|
|
|
|
|
my $image = "channelok.gif";
|
|
|
|
my $imagetitle = "OK";
|
|
|
|
foreach my $buildname (sort keys %build) {
|
|
|
|
if ($build{$buildname} eq 'busted') {
|
|
|
|
$image = "channelflames.gif";
|
|
|
|
$imagetitle = "Bad";
|
|
|
|
last;
|
1999-04-01 22:58:06 +04:00
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
}
|
|
|
|
print qq{<?xml version="1.0"?>
|
|
|
|
<rdf:RDF
|
|
|
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
|
|
xmlns="http://my.netscape.com/rdf/simple/0.9/">
|
|
|
|
<channel>
|
|
|
|
<title>Tinderbox - $tree</title>
|
|
|
|
<description>Build bustages for $tree</description>
|
|
|
|
<link>$mainurl</link>
|
|
|
|
</channel>
|
|
|
|
<image>
|
|
|
|
<title>$imagetitle</title>
|
|
|
|
<url>$dirurl/$image</url>
|
|
|
|
<link>$mainurl</link>
|
|
|
|
</image>
|
|
|
|
};
|
1999-04-01 22:58:06 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
$bonsai_tree = '';
|
|
|
|
require "$tree/treedata.pl";
|
|
|
|
if ($bonsai_tree ne '') {
|
|
|
|
my $state = tree_open() ? "OPEN" : "CLOSED";
|
|
|
|
print "<item><title>The tree is currently $state</title>",
|
|
|
|
"<link>$mainurl</link></item>\n";
|
|
|
|
}
|
1999-04-01 22:58:06 +04:00
|
|
|
|
1999-05-25 01:03:10 +04:00
|
|
|
foreach my $buildname (sort keys %build) {
|
|
|
|
if ($build{$buildname} eq 'busted') {
|
|
|
|
print "<item><title>$buildname is in flames</title>",
|
|
|
|
"<link>$mainurl</link></item>\n";
|
1998-10-21 02:16:21 +04:00
|
|
|
}
|
1999-05-25 01:03:10 +04:00
|
|
|
}
|
|
|
|
print "</rdf:RDF>\n";
|
1998-10-21 02:16:21 +04:00
|
|
|
}
|