зеркало из https://github.com/mozilla/gecko-dev.git
allow each column to be included multiple times. This is mostly to allow the time column
to appear on the left and right side of the table but may eventually be used to have two columns which get data from different sources. Mostly this fix was to move the registration of each column (push the results of new()'ing each module onto a list) from being the responsibility of the module at require time to being the respoinsibility of the TinderDB class.
This commit is contained in:
Родитель
0407f80656
Коммит
d75a81fa95
|
@ -19,9 +19,9 @@
|
|||
# notice board display, build display (colored squares)
|
||||
|
||||
|
||||
# $Revision: 1.5 $
|
||||
# $Date: 2000/11/09 19:31:05 $
|
||||
# $Author: kestes%staff.mail.com $
|
||||
# $Revision: 1.6 $
|
||||
# $Date: 2002/04/24 03:19:05 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/TinderDB.pm,v $
|
||||
# $Name: $
|
||||
|
||||
|
@ -88,7 +88,23 @@ if ( defined(@TinderConfig::DBImpl) ) {
|
|||
);
|
||||
}
|
||||
|
||||
# Add an empty object, of this DB subclass, to end of the set of all
|
||||
# HTML columns. This registers the subclass with TinderDB and defines
|
||||
# the order of the HTML columns.
|
||||
|
||||
sub strings2columns {
|
||||
my @impls = @_;
|
||||
my @columns = ();
|
||||
|
||||
foreach $impl (@impls) {
|
||||
push @columns, $impl->new();
|
||||
}
|
||||
|
||||
return @columns;
|
||||
}
|
||||
|
||||
main::require_modules(@IMPLS);
|
||||
@HTML_COLUMNS = strings2columns(@IMPLS);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
|
||||
|
||||
package TinderDB::BT;
|
||||
package TinderDB::BT_Generic;
|
||||
|
||||
# We store the hash of all names who modified the tree at a
|
||||
# particular time as follows:
|
||||
|
@ -69,16 +69,10 @@ use TreeData;
|
|||
use VCDisplay;
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.13 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.14 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
# Add an empty object, of this DB subclass, to end of the set of all
|
||||
# HTML columns. This registers the subclass with TinderDB and defines
|
||||
# the order of the HTML columns.
|
||||
|
||||
push @TinderDB::HTML_COLUMNS, TinderDB::BT->new();
|
||||
|
||||
|
||||
# name of the bug tracking system
|
||||
$BT_NAME = $TinderConfig::BT_NAME || "BT";
|
||||
|
|
|
@ -75,16 +75,10 @@ use VCDisplay;
|
|||
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.2 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.3 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
# Add an empty object, of this DB subclass, to end of the set of all
|
||||
# HTML columns. This registers the subclass with TinderDB and defines
|
||||
# the order of the HTML columns.
|
||||
|
||||
push @TinderDB::HTML_COLUMNS, TinderDB::BT_Req->new();
|
||||
|
||||
|
||||
# name of the bug tracking system
|
||||
$REQ_NAME = $TinderConfig::REQ_NAME || "Req";
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
# the build was and display a link to the build log.
|
||||
|
||||
|
||||
# $Revision: 1.25 $
|
||||
# $Date: 2002/02/25 19:29:25 $
|
||||
# $Revision: 1.26 $
|
||||
# $Date: 2002/04/24 03:18:58 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/TinderDB/Build.pm,v $
|
||||
# $Name: $
|
||||
|
@ -154,14 +154,6 @@ $VERSION = '#tinder_version#';
|
|||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
|
||||
# Add an empty object, of this DB subclass, to end of the set of all
|
||||
# HTML columns. This registers the subclass with TinderDB and defines
|
||||
# the order of the HTML columns.
|
||||
|
||||
push @TinderDB::HTML_COLUMNS, TinderDB::Build->new();
|
||||
|
||||
|
||||
|
||||
# Find the name of each build and the proper order to display them.
|
||||
# No part of the code should peek at keys %{ $DATABASE{$tree} } directly.
|
||||
|
||||
|
|
|
@ -78,15 +78,10 @@ use Utils;
|
|||
use HTMLPopUp;
|
||||
use TinderDB::BasicTxtDB;
|
||||
|
||||
$VERSION = ( qw $Revision: 1.12 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.13 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
# Add an empty object, of this DB subclass, to end of the set of all
|
||||
# HTML columns. This registers the subclass with TinderDB and defines
|
||||
# the order of the HTML columns.
|
||||
|
||||
push @TinderDB::HTML_COLUMNS, TinderDB::Notice->new();
|
||||
|
||||
# The indicator that a notice is availible for a given notice cell is
|
||||
# configurable. Traditionally it is a star gif however if you wish to
|
||||
|
|
|
@ -41,13 +41,7 @@ use VCDisplay;
|
|||
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.4 $ )[1];
|
||||
|
||||
# Add an empty object, of this DB subclass, to end of the set of all
|
||||
# HTML columns. This registers the subclass with TinderDB and defines
|
||||
# the order of the HTML columns.
|
||||
|
||||
push @TinderDB::HTML_COLUMNS, TinderDB::Time->new();
|
||||
$VERSION = ( qw $Revision: 1.5 $ )[1];
|
||||
|
||||
|
||||
sub new {
|
||||
|
@ -57,6 +51,16 @@ sub new {
|
|||
bless $self, $type;
|
||||
}
|
||||
|
||||
# last_hour is specific to each time column in the table it stores the
|
||||
# hour of the time we were computing between calls to
|
||||
# status_table_row. Using this data we can set the full date
|
||||
# appropriately.
|
||||
|
||||
sub last_hour {
|
||||
my $self = shift;
|
||||
if (@_) { $self->{LASTHOUR} = shift }
|
||||
return $self->{LASTHOUR};
|
||||
}
|
||||
|
||||
|
||||
sub loadtree_db {
|
||||
|
@ -93,7 +97,7 @@ sub status_table_legend {
|
|||
sub status_table_start {
|
||||
my ($self, $row_times, $tree,) = @_;
|
||||
|
||||
$LAST_HOUR= -1;
|
||||
$self->last_hour(-1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -110,7 +114,7 @@ sub status_table_row {
|
|||
# just display the date.
|
||||
|
||||
my ($query_link) = '';
|
||||
if ($LAST_HOUR != $hour) {
|
||||
if ($self->last_hour() != $hour) {
|
||||
|
||||
$query_link = VCDisplay::query(
|
||||
'tree' => $tree,
|
||||
|
@ -135,7 +139,7 @@ sub status_table_row {
|
|||
my(@outrow) = ("\t<td align=right $hour_color>".
|
||||
"$query_link</td>\n");
|
||||
|
||||
$LAST_HOUR = $hour;
|
||||
$self->last_hour($hour);
|
||||
return @outrow;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,16 +94,10 @@ use TreeData;
|
|||
use VCDisplay;
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.11 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.12 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
# Add an empty object, of this DB subclass, to end of the set of all
|
||||
# HTML columns. This registers the subclass with TinderDB and defines
|
||||
# the order of the HTML columns.
|
||||
|
||||
push @TinderDB::HTML_COLUMNS, TinderDB::VC_Bonsai->new();
|
||||
|
||||
# name of the version control system
|
||||
$VC_NAME = $TinderDB::VC_NAME || "CVS";
|
||||
|
||||
|
|
|
@ -134,16 +134,10 @@ use TreeData;
|
|||
use VCDisplay;
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.21 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.22 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
# Add an empty object, of this DB subclass, to end of the set of all
|
||||
# HTML columns. This registers the subclass with TinderDB and defines
|
||||
# the order of the HTML columns.
|
||||
|
||||
push @TinderDB::HTML_COLUMNS, TinderDB::VC_CVS->new();
|
||||
|
||||
|
||||
|
||||
$CURRENT_YEAR = 1900 + (gmtime(time()))[5];
|
||||
|
|
|
@ -143,15 +143,10 @@ use TreeData;
|
|||
use VCDisplay;
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.6 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.7 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
# Add an empty object, of this DB subclass, to end of the set of all
|
||||
# HTML columns. This registers the subclass with TinderDB and defines
|
||||
# the order of the HTML columns.
|
||||
|
||||
push @TinderDB::HTML_COLUMNS, TinderDB::VC_Perforce->new();
|
||||
|
||||
$ENV{'P4PORT'} = $TinderConfig::PERFORCE_PORT || 1666;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче