зеркало из https://github.com/mozilla/pjs.git
add a TinderHeader Banner, its like MOTD only there is only one Banner for all tinderbox projects.
This commit is contained in:
Родитель
d54d3c31d3
Коммит
86aa2e81e6
|
@ -7,8 +7,8 @@
|
|||
# columns from being shown on the default pages.
|
||||
|
||||
|
||||
# $Revision: 1.25 $
|
||||
# $Date: 2003-08-17 00:44:03 $
|
||||
# $Revision: 1.26 $
|
||||
# $Date: 2004-08-07 13:12:10 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/bin/admintree.cgi,v $
|
||||
# $Name: $
|
||||
|
@ -85,6 +85,9 @@ sub get_params {
|
|||
cookie(-name=>"tinderbox_mailaddr"));
|
||||
$MAILADDR = main::extract_user($MAILADDR);
|
||||
|
||||
$NEW_BANNER = param("banner");
|
||||
$NEW_BANNER = extract_printable_chars($NEW_BANNER);
|
||||
|
||||
$NEW_MOTD = param("motd");
|
||||
$NEW_MOTD = extract_printable_chars($NEW_MOTD);
|
||||
|
||||
|
@ -123,6 +126,8 @@ sub setup_environment {
|
|||
|
||||
@CURRENT_IGNORE_BUILDS = get_current_ignore_builds($TREE);
|
||||
|
||||
$CURRENT_BANNER = TinderHeader::gettree_header('Banner', $TREE);
|
||||
|
||||
$CURRENT_MOTD = TinderHeader::gettree_header('MOTD', $TREE);
|
||||
|
||||
get_passwd_table();
|
||||
|
@ -326,6 +331,14 @@ sub format_input_page {
|
|||
)
|
||||
} # end if
|
||||
|
||||
push @out, (
|
||||
h3("Banner"),
|
||||
"New Banner, global to all projects (must be valid HTML)",p(),
|
||||
textarea(-name=>'banner', -default=>$CURRENT_BANNER,
|
||||
-rows=>30, -cols=>75, -wrap=>'physical',),
|
||||
p(),
|
||||
);
|
||||
|
||||
push @out, (
|
||||
h3("Message of the Day"),
|
||||
"New Message of the Day (must be valid HTML)",p(),
|
||||
|
@ -470,6 +483,22 @@ sub change_ignore_builds {
|
|||
|
||||
|
||||
|
||||
sub change_banner {
|
||||
my (@results) = ();
|
||||
|
||||
# remember new_motd could be empty. As long as it is different than
|
||||
# old_motd we should save it.
|
||||
|
||||
($NEW_BANNER eq $CURRENT_BANNER) &&
|
||||
return ;
|
||||
|
||||
TinderHeader::savetree_header('Banner', $TREE, $NEW_BANNER);
|
||||
push @results, "Banner changed: \n\t'\n$NEW_BANNER\n\t' \n";
|
||||
|
||||
return @results;
|
||||
}
|
||||
|
||||
|
||||
sub change_motd {
|
||||
my (@results) = ();
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
|
||||
# $Revision: 1.37 $
|
||||
# $Date: 2004-07-18 16:43:27 $
|
||||
# $Revision: 1.38 $
|
||||
# $Date: 2004-08-07 13:12:10 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/bin/tinder.cgi,v $
|
||||
# $Name: $
|
||||
|
@ -257,6 +257,7 @@ sub HTML_status_page {
|
|||
|
||||
# load the headers these all have well known namespaces
|
||||
|
||||
my ($banner) = TinderHeader::gettree_header('Banner', $tree);
|
||||
my ($motd) = TinderHeader::gettree_header('MOTD', $tree);
|
||||
my ($tree_state) = TinderHeader::gettree_header('TreeState', $tree);
|
||||
my ($break_times) = TinderHeader::gettree_header('Build', $tree);
|
||||
|
@ -336,6 +337,14 @@ sub HTML_status_page {
|
|||
"linktxt"=>"Show current status",
|
||||
"href"=>$status_page_url,
|
||||
).
|
||||
"<br>\n";
|
||||
my ($links) =
|
||||
HTMLPopUp::Link(
|
||||
"linktxt"=>"Add to Notice Board",
|
||||
"href"=>("$FileStructure::URLS{'addnote'}".
|
||||
"\?".
|
||||
"tree=$tree"),
|
||||
).
|
||||
"<br><p>\n\n".
|
||||
HTMLPopUp::Link(
|
||||
"linktxt"=>"Regnerate HTML Pages",
|
||||
|
@ -356,14 +365,6 @@ sub HTML_status_page {
|
|||
"href"=>("$FileStructure::URLS{'indexpage'}"),
|
||||
).
|
||||
"<br>\n";
|
||||
my ($links) =
|
||||
HTMLPopUp::Link(
|
||||
"linktxt"=>"Add to Notice Board",
|
||||
"href"=>("$FileStructure::URLS{'addnote'}".
|
||||
"\?".
|
||||
"tree=$tree"),
|
||||
).
|
||||
"<br>\n";
|
||||
|
||||
$out .= HTMLPopUp::page_header('title'=>"Tinderbox Status Page tree: $tree",
|
||||
'refresh'=>$REFRESH_TIME);
|
||||
|
@ -371,6 +372,11 @@ sub HTML_status_page {
|
|||
$out .= "<!-- /Build Page Headers -->\n\n\n";
|
||||
$out .= "$links\n";
|
||||
$out .= "<br>\n";
|
||||
$out .= HTMLPopUp::Link("name"=>"Banner",)."\n";
|
||||
$out .= "<!-- Banner -->\n";
|
||||
$out .= $banner;
|
||||
$out .= "<p>\n<!-- /Banner -->\n";
|
||||
$out .= "\n\n";
|
||||
$out .= HTMLPopUp::Link("name"=>"MOTD",)."\n";
|
||||
$out .= "<!-- Message of the Day -->\n";
|
||||
$out .= $motd;
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
# customizable settings.
|
||||
|
||||
|
||||
# $Revision: 1.51 $
|
||||
# $Date: 2004-06-08 00:09:09 $
|
||||
# $Revision: 1.52 $
|
||||
# $Date: 2004-08-07 13:12:09 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/default_conf/TinderConfig.pm,v $
|
||||
# $Name: $
|
||||
|
@ -47,9 +47,9 @@ package TinderConfig;
|
|||
|
||||
|
||||
# set the path for Tinderbox.
|
||||
|
||||
$ENV{'PATH'}= (
|
||||
'/bin'.
|
||||
':/home/kestes/mozilla/webtools/tinderbox2/build/test/vcsim'.
|
||||
':/usr/bin'.
|
||||
':/usr/local/bin'.
|
||||
':/opt/gnu/bin'.
|
||||
|
@ -220,10 +220,10 @@ $PopUpImpl = (
|
|||
|
||||
# version control systems
|
||||
|
||||
'TinderDB::VC_CVS',
|
||||
# 'TinderDB::VC_CVS',
|
||||
# 'TinderDB::VC_Bonsai',
|
||||
# 'TinderDB::VC_PVCSDimensions',
|
||||
# 'TinderDB::VC_Perforce',
|
||||
'TinderDB::VC_Perforce',
|
||||
|
||||
'TinderDB::Build',
|
||||
|
||||
|
@ -256,12 +256,12 @@ $ROW_SPACING_DISIPLINE = (
|
|||
# This keeps the cell box sizes independent
|
||||
# of the amount of data.
|
||||
|
||||
#'uniform',
|
||||
'uniform',
|
||||
|
||||
# Use build event times to create times column.
|
||||
# This is traditional Tinderbox1 discipline.
|
||||
|
||||
'build_event_driven',
|
||||
#'build_event_driven',
|
||||
|
||||
# Use all event times to create times column.
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
# TreeState, Build, IgnoreBuilds, MOTD, Images,
|
||||
|
||||
|
||||
# $Revision: 1.10 $
|
||||
# $Date: 2003-08-17 01:44:07 $
|
||||
# $Revision: 1.11 $
|
||||
# $Date: 2004-08-07 13:12:09 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/TinderHeader.pm,v $
|
||||
# $Name: $
|
||||
|
@ -70,6 +70,7 @@ if ( defined(@TinderConfig::HeaderImpl) ) {
|
|||
@IMPLS = (
|
||||
'TinderHeader::Build',
|
||||
'TinderHeader::IgnoreBuilds',
|
||||
'TinderHeader::Banner',
|
||||
'TinderHeader::MOTD',
|
||||
|
||||
# TinderDB::VC_Bonsai provides a
|
||||
|
@ -109,6 +110,7 @@ $DEBUG = 1;
|
|||
|
||||
'Build' => "",
|
||||
'IgnoreBuilds' => "",
|
||||
'Banner' => "",
|
||||
'MOTD' => "",
|
||||
'TreeState' => "Open",
|
||||
|
||||
|
@ -301,6 +303,11 @@ operation of the version control system.
|
|||
|
||||
=over 4
|
||||
|
||||
=item B<TinderHeader::Banner>
|
||||
|
||||
A message for all projects as set by the administrators.
|
||||
|
||||
|
||||
=item B<TinderHeader::MOTD>
|
||||
|
||||
The message of the day as set by the administrators.
|
||||
|
|
Загрузка…
Ссылка в новой задаче