OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-web Date: 22-Feb-2004 00:24:04
Branch: HEAD Handle: 2004022123240400
Modified files:
openpkg-web status.cgi
Log:
$dst is really $class; compute $important only once; reflect fact that
CORE is important for all supported platforms (not limited to fully
supported platforms)
Summary:
Revision Changes Path
1.9 +16 -15 openpkg-web/status.cgi
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-web/status.cgi
============================================================================
$ cvs diff -u -r1.8 -r1.9 status.cgi
--- openpkg-web/status.cgi 21 Feb 2004 22:52:07 -0000 1.8
+++ openpkg-web/status.cgi 21 Feb 2004 23:24:04 -0000 1.9
@@ -47,7 +47,7 @@
my @hostlist = ();
my @idlist = ();
my @arch = ();
-my $dst_last = "";
+my $class_last = "";
my %doing = ();
while ($line = <$io>) {
# a2ps 4.13b 20020609 REL yes OK OK ...
@@ -55,7 +55,7 @@
next;
}
my @line = split(/\s+/, $line);
- my ($name, $version, $release, $dst, $rel) = @line[0..4];
+ my ($name, $version, $release, $class, $rel) = @line[0..4];
if ($ishead) {
my @ids = @line[5..$#line];
@idlist = @ids;
@@ -65,7 +65,7 @@
$O .= "<td><font color=\"#ffffff\">$name</font></td>";
$O .= "<td><font color=\"#ffffff\">$version</font></td>";
$O .= "<td><font color=\"#ffffff\">$release</font></td>";
- $O .= "<td><font color=\"#ffffff\">$dst</font></td>";
+ $O .= "<td><font color=\"#ffffff\">$class</font></td>";
$O .= "<td><font color=\"#ffffff\">$rel</font></td>";
foreach my $id (@ids) {
$O .= "<td width=30><font color=\"#ffffff\"
size=\"-1\">$id</font></td>";
@@ -109,24 +109,25 @@
$host = "OK";
}
+ my $important = ($class eq "CORE" or
$id2host{$idlist[$n]}->{-important});
if ($host eq "OK") {
if (defined($doing{$hostlist[$n]}) and $doing{$hostlist[$n]} eq
"$name-$version-$release") {
- $L .= "<td bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ?
"f0f099" : "999933")."\" align=center>";
+ $L .= "<td bgcolor=\"#".($important ? "f0f099" : "999933")."\"
align=center>";
$L .= "<a href=\"status-log.cgi/".$log."\">" if ($#log >= 0);
$L .= "<img src=\"status.img/icon-dia.gif\" width=9 height=9
alt=\"OK\" border=0>";
$L .= "</a>" if ($#log >= 0);
}
else {
- $L .= "<td bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ?
"99cc99" : "336633")."\" align=center>";
+ $L .= "<td bgcolor=\"#".($important ? "99cc99" : "336633")."\"
align=center>";
$L .= "<a href=\"status-log.cgi/".$log."\">" if ($#log >= 0);
$L .= "<img src=\"status.img/icon-ok.gif\" width=9 height=9
alt=\"OK\" border=0>";
$L .= "</a>" if ($#log >= 0);
}
}
elsif ($host eq "FAIL") {
- $ok = 0 if ($id2host{$idlist[$n]}->{-important});
+ $ok = 0 if ($important);
if (defined($doing{$hostlist[$n]}) and $doing{$hostlist[$n]} eq
"$name-$version-$release") {
- $L .= "<td width=30
bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ? "f0f099" : "999933")."\"
align=center>";
+ $L .= "<td width=30 bgcolor=\"#".($important ? "f0f099" :
"999933")."\" align=center>";
$L .= "<a href=\"status-log.cgi/".$log."\">";
$mtime_srpm =
(stat("/e/openpkg/ftp/current/SRC/$name-$version-$release.src.rpm"))[9];
$mtime_logf = (stat($log[0]))[9];
@@ -135,7 +136,7 @@
$L .= "</a>";
}
else {
- $L .= "<td width=30
bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ? "ff9999" : "993333")."\"
align=center>";
+ $L .= "<td width=30 bgcolor=\"#".($important ? "ff9999" :
"993333")."\" align=center>";
$L .= "<a href=\"status-log.cgi/".$log."\">";
$mtime_srpm =
(stat("/e/openpkg/ftp/current/SRC/$name-$version-$release.src.rpm"))[9];
$mtime_logf = (stat($log[0]))[9];
@@ -146,14 +147,14 @@
}
}
elsif ($host eq "--") {
- $ok = 0 if ($id2host{$idlist[$n]}->{-important});
+ $ok = 0 if ($important);
if (defined($doing{$hostlist[$n]}) and $doing{$hostlist[$n]} eq
"$name-$version-$release") {
- $L .= "<td width=30
bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ? "f0f099" : "999933")."\"
align=center>";
+ $L .= "<td width=30 bgcolor=\"#".($important ? "f0f099" :
"999933")."\" align=center>";
my $img = "icon-dia.gif";
$L .= "<img src=\"status.img/$img\" width=9 height=9 alt=\"--\"
border=0>";
}
else {
- $L .= "<td width=30
bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ? "9999ff" : "000066")."\"
align=center>";
+ $L .= "<td width=30 bgcolor=\"#".($important ? "9999ff" :
"000066")."\" align=center>";
$L .= "<img src=\"status.img/icon-dot.gif\" width=9 height=9
alt=\"--\" border=0>";
}
}
@@ -165,18 +166,18 @@
if ($ok) {
$img = "icon-ok.gif";
}
- #if ($dst_last ne '' and $dst_last ne $dst) {
+ #if ($class_last ne '' and $class_last ne $class) {
# $O .= "</table>";
# $O .= "<br>";
# $O .= "<table cellspacing=1 cellpadding=2 border=0 width=\"90%\">\n";
#}
- #$dst_last = $dst;
- $O .= "<tr bgcolor=\"".$bgcolors->{$dst}->[$odd]."\">\n";
+ #$class_last = $class;
+ $O .= "<tr bgcolor=\"".$bgcolors->{$class}->[$odd]."\">\n";
$O .= "<td align=center><img src=\"status.img/$img\" width=9 height=9
alt=\"\"></td>";
$O .= "<td><a
href=\"ftp://ftp.openpkg.org/current/SRC/$name-$version-$release.src.rpm\"><font
color=\"#000000\">$name</font></a></td>";
$O .= "<td>$version</td>";
$O .= "<td>$release</td>";
- $O .= "<td>$dst</td>";
+ $O .= "<td>$class</td>";
$O .= "<td>$rel</td>";
$O .= $L;
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]