1998-06-17 01:43:24 +04:00
#!/usr/bonsaitools/bin/perl --
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
1999-11-02 02:33:56 +03:00
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (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/
1998-06-17 01:43:24 +04:00
#
1999-11-02 02:33:56 +03:00
# 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.
1998-06-17 01:43:24 +04:00
#
# The Original Code is the Tinderbox build tool.
#
# The Initial Developer of the Original Code is Netscape Communications
1999-11-02 02:33:56 +03:00
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
1998-06-17 01:43:24 +04:00
use lib "../bonsai";
require 'lloydcgi.pl';
1999-07-23 23:36:38 +04:00
require 'tbglobals.pl';
1998-06-17 01:43:24 +04:00
require 'header.pl';
$|=1;
print "Content-type: text/html\n\n<HTML>\n";
1999-03-10 06:03:27 +03:00
$form{noignore} = 1; # Force us to load all build info, not
# paying any attention to ignore_builds stuff.
$maxdate = time();
$mindate = $maxdate - 24*60*60;
1999-10-29 22:52:04 +04:00
tb_load_data();
1998-06-17 01:43:24 +04:00
2000-07-20 06:52:11 +04:00
EmitHtmlHeader("administer tinderbox", "tree: $tree");
1998-09-01 05:14:20 +04:00
if (defined($tree)) {
2000-07-21 03:33:11 +04:00
# Sheriff
if( -r "$tree/sheriff.pl" ){
require "$tree/sheriff.pl";
$current_sheriff =~ s/\s*$//; # Trim trailing whitespace;
} else {
$current_sheriff = "";
1998-09-01 05:40:24 +04:00
}
2000-07-21 03:33:11 +04:00
# Status message.
if( -r "$tree/status.pl" ){
require "$tree/status.pl";
$status_message =~ s/\s*$//; # Trim trailing whitespace;
} else {
$status_message = "";
1998-09-01 05:40:24 +04:00
}
1998-06-17 01:43:24 +04:00
2000-07-21 03:33:11 +04:00
# Tree rules.
if( -r "$tree/rules.pl" ){
require "$tree/rules.pl";
$rules_message =~ s/\s*$//; # Trim trailing whitespace;
} else {
$rules_message = "";
}
#
# Change sheriff
#
1998-09-01 05:40:24 +04:00
print "
1998-06-17 01:43:24 +04:00
<FORM method=post action=doadmin.cgi>
2000-07-21 03:33:11 +04:00
<INPUT TYPE=HIDDEN NAME=tree VALUE=$tree>
<INPUT TYPE=HIDDEN NAME=command VALUE=set_sheriff>
<br><b>Change sheriff info.</b> (mailto: url, phone number, etc.)<br>
2000-09-06 23:22:52 +04:00
<TEXTAREA NAME=sheriff ROWS=4 COLS=75 WRAP=SOFT>$current_sheriff
2000-07-21 03:33:11 +04:00
</TEXTAREA>
<br>
1998-06-17 01:43:24 +04:00
<B>Password:</B> <INPUT NAME=password TYPE=password>
2000-07-21 03:33:11 +04:00
<b><INPUT TYPE=SUBMIT VALUE='Change Sheriff'></b>
</FORM>
<hr>
";
#
# Status message
#
print "
<FORM method=post action=doadmin.cgi>
1998-06-17 01:43:24 +04:00
<INPUT TYPE=HIDDEN NAME=tree VALUE=$tree>
2000-07-21 03:33:11 +04:00
<INPUT TYPE=HIDDEN NAME=command VALUE=set_status_message>
<br><b>Status message.</b> (Use this for stay-out-of-the-tree warnings, etc.)<br>
<TEXTAREA NAME=status ROWS=5 COLS=75 WRAP=SOFT>$status_message
1998-06-17 01:43:24 +04:00
</TEXTAREA>
2000-07-21 03:33:11 +04:00
<br>
<b>
<B>Password:</B> <INPUT NAME=password TYPE=password>
<INPUT TYPE=SUBMIT VALUE='Change status message'>
</b>
1998-06-17 01:43:24 +04:00
</FORM>
<hr>
";
2000-07-21 03:33:11 +04:00
#
# Rules message.
#
1998-06-17 01:43:24 +04:00
1998-09-01 05:40:24 +04:00
print "
1998-06-17 01:43:24 +04:00
<FORM method=post action=doadmin.cgi>
2000-07-21 03:33:11 +04:00
<INPUT TYPE=HIDDEN NAME=tree VALUE=$tree>
<INPUT TYPE=HIDDEN NAME=command VALUE=set_rules_message>
<br><b>The tree rules.</b>
<br><TEXTAREA NAME=rules ROWS=18 COLS=75 WRAP=SOFT>$rules_message
</TEXTAREA>
<br>
1998-06-17 01:43:24 +04:00
<B>Password:</B> <INPUT NAME=password TYPE=password>
2000-07-21 03:33:11 +04:00
<b><INPUT TYPE=SUBMIT VALUE='Change rules message'></b>
</FORM>
<hr>
";
#
# Trim logs.
#
print "
<FORM method=post action=doadmin.cgi>
1998-06-17 01:43:24 +04:00
<INPUT TYPE=HIDDEN NAME=tree VALUE=$tree>
<INPUT TYPE=HIDDEN NAME=command VALUE=trim_logs>
2000-07-21 03:33:11 +04:00
<b>Trim Logs</b><br>
Trim Logs to <INPUT NAME=days size=5 VALUE='7'> days. (Tinderbox
shows 2 days history by default. You can see more by clicking show all).<br>
<B>Password:</B> <INPUT NAME=password TYPE=password>
<INPUT TYPE=SUBMIT VALUE='Trim Logs'>
1998-06-17 01:43:24 +04:00
</FORM>
<hr>
" ;
1998-09-01 05:14:20 +04:00
}
1998-06-17 01:43:24 +04:00
2000-07-21 03:33:11 +04:00
#
# Create a new tinderbox page.
#
1998-06-17 01:43:24 +04:00
print "
<FORM method=post action=doadmin.cgi>
<INPUT TYPE=HIDDEN NAME=tree VALUE=$tree>
<INPUT TYPE=HIDDEN NAME=command VALUE=create_tree>
2001-03-29 07:45:38 +04:00
<b>Create a new tinderbox page, examples for SeaMonkey shown in parens.</b>
1998-06-17 01:43:24 +04:00
<TABLE>
<TR>
2000-07-21 03:33:11 +04:00
<TD>tinderbox tree name:</TD>
1998-06-17 01:43:24 +04:00
<TD><INPUT NAME=treename VALUE=''></TD>
2001-03-29 07:45:38 +04:00
<TD>(SeaMonkey)</TD>
</TR>
<TR>
2000-07-21 03:33:11 +04:00
<TD>cvs repository:</TD>
1999-01-01 00:33:19 +03:00
<TD><INPUT NAME=repository VALUE=''></TD>
2001-03-29 07:45:38 +04:00
<TD>(/cvsroot)</TD>
</TR>
<TR>
2000-07-21 03:33:11 +04:00
<TD>cvs module name:</TD>
1998-06-17 01:43:24 +04:00
<TD><INPUT NAME=modulename VALUE=''></TD>
2001-03-29 07:45:38 +04:00
<TD>(MozillaTinderboxAll)</TD>
</TR>
<TR>
2000-07-21 03:33:11 +04:00
<TD>cvs branch:</TD>
1998-06-17 01:43:24 +04:00
<TD><INPUT NAME=branchname VALUE='HEAD'></TD>
2001-03-29 07:45:38 +04:00
<TD>(HEAD)</TD>
</TR>
<TR>
<TD>bonsai tree:</TD>
<TD><INPUT NAME=bonsaitreename></TD>
<TD>(SeaMonkey)</TD>
1998-06-17 01:43:24 +04:00
</TR>
</TABLE>
2000-07-21 03:33:11 +04:00
<B>Password:</B> <INPUT NAME=password TYPE=password>
1998-06-17 01:43:24 +04:00
<INPUT TYPE=SUBMIT VALUE='Create a new Tinderbox page'>
</FORM>
<hr>
1998-09-01 05:14:20 +04:00
";
2001-11-10 00:32:41 +03:00
#
# Toggle scraping for builds.
#
if (defined($tree)) {
print "
<B><font size=+1>Turn on log scraping.</font></b><br> Checked builds will have the logs scanned fora token of the form <b>TinderboxPrint:aaa,bbb,ccc</b>. These values will show up as-is in the showbuilds.cgi output.<br>
<FORM method=post action=doadmin.cgi>
<INPUT TYPE=HIDDEN NAME=tree VALUE=$tree>
<INPUT TYPE=HIDDEN NAME=command VALUE=scrape_builds>
";
@names = sort (@$build_names) ;
for $i (@names){
if( $i ne "" ){
$checked = ($scrape_builds->{$i} != 0 ? "CHECKED": "" );
print "<INPUT TYPE=checkbox NAME='build_$i' $checked >";
print "$i<br>\n";
}
}
print "
<B>Password:</B> <INPUT NAME=password TYPE=password>
<INPUT TYPE=SUBMIT VALUE='Scrape only checked builds'>
</FORM>
<hr>
";
}
2000-07-21 03:33:11 +04:00
#
# Turn builds off.
#
1998-09-01 05:14:20 +04:00
if (defined($tree)) {
1998-09-01 05:40:24 +04:00
print "
1998-06-23 01:28:47 +04:00
<B><font size=+1>If builds are behaving badly you can turn them off.</font></b><br> Uncheck
2001-11-10 00:32:41 +03:00
the build that is misbehaving and click the button. Add <b><tt>&noignore=1</tt></b> to
the tinderbox URL to override.<br>
2000-07-21 03:33:11 +04:00
<FORM method=post action=doadmin.cgi>
1998-06-17 01:43:24 +04:00
<INPUT TYPE=HIDDEN NAME=tree VALUE=$tree>
1998-06-23 01:28:47 +04:00
<INPUT TYPE=HIDDEN NAME=command VALUE=disable_builds>
1998-06-17 01:43:24 +04:00
";
1999-10-29 22:52:04 +04:00
@names = sort (@$build_names) ;
1998-06-23 01:28:47 +04:00
1998-09-01 05:40:24 +04:00
for $i (@names){
if( $i ne "" ){
$checked = ($ignore_builds->{$i} != 0 ? "": "CHECKED" );
print "<INPUT TYPE=checkbox NAME='build_$i' $checked >";
print "$i<br>\n";
}
1998-06-23 01:28:47 +04:00
}
1998-06-17 01:43:24 +04:00
1998-09-01 05:40:24 +04:00
print "
2000-07-21 03:33:11 +04:00
<B>Password:</B> <INPUT NAME=password TYPE=password>
1998-06-23 01:28:47 +04:00
<INPUT TYPE=SUBMIT VALUE='Show only checked builds'>
1998-06-17 01:43:24 +04:00
</FORM>
<hr>
";
1998-09-01 05:14:20 +04:00
}
1998-06-17 01:43:24 +04:00