[Commits] [svn:einsteintoolkit] www/release-info/ (Rev. 360)
knarf at cct.lsu.edu
knarf at cct.lsu.edu
Mon Nov 1 08:47:44 CDT 2010
User: knarf
Date: 2010/11/01 08:47 AM
Modified:
/release-info/
parse_testsuite_results.cgi
Log:
no color for old entries
File Changes:
Directory: /release-info/
=========================
File [modified]: parse_testsuite_results.cgi
Delta lines: +10 -7
===================================================================
--- release-info/parse_testsuite_results.cgi 2010-11-01 13:41:22 UTC (rev 359)
+++ release-info/parse_testsuite_results.cgi 2010-11-01 13:47:44 UTC (rev 360)
@@ -22,6 +22,8 @@
my $nprocs = 1;
my %fileinfo = ();
+my $too_old = "two weeks ago";
+
# open each log file one by one
foreach my $filename (@filenames) {
my ($host, $nprocs);
@@ -128,6 +130,8 @@
foreach my $nprocs (sort(keys(%{$allhosts{$host}}))) {
# color handling
my $color = " style=\"background-color:#d0d0d0;\"";
+ my $green = (Date_Cmp($fileinfo{$host}{$nprocs}{"time"}, $too_old) > 0) ? "00FF00":"000000";
+ my $red = (Date_Cmp($fileinfo{$host}{$nprocs}{"time"}, $too_old) > 0) ? "FF0000":"000000";
if ($nprocs != "1") { $color = " style=\"background-color:#e0e0e0;\""; }
#
if (defined($results{$thorn}{$test}{$host}) and
@@ -135,16 +139,17 @@
$allhosts{$host}{$nprocs}{"ran"}++;
if ($results{$thorn}{$test}{$host}{$nprocs}{"result"} =~ /Success/) {
$allhosts{$host}{$nprocs}{"success"}++;
- $table_entries .= "<td$color align='center'><font color='#00FF00'>â</font></td>";
+ $table_entries .= "<td$color align='center'><font color='$green'>â</font></td>";
} else {
$allhosts{$host}{$nprocs}{"fail"}++;
my $details = $results{$thorn}{$test}{$host}{$nprocs}{"details"};
my $entry = "<b>$details</b>";
if ($details =~ /(\d+) files compared, (\d+) differ, (\d+) differ significantly/) {
- $entry = "<font color='#FF0000'>$3</font>/$1";
+ $entry = "<font color='#$red'><b>$3</b></font>/$1";
}
if ($details =~ /(\d+) files missing, (\d+) files compared, (\d+) differ/) {
- $entry = "<font color='#FF0000'>$1</font> missing, <font color='#FF0000'>$3</font>/$2";
+ $entry = "<font color='#$red'><b>$1</b></font> missing, "
+ "<font color='#$red'><b>$3</b></font>/$2";
}
$table_entries .= "<td$color align='center'>$entry</td>";
}
@@ -197,8 +202,7 @@
foreach my $host (sort(keys(%allhosts))) {
foreach my $nprocs (sort(keys(%{$allhosts{$host}}))) {
my $color = " style=\"background-color:#d0d0d0;\"";
- my $png = (Date_Cmp($fileinfo{$host}{$nprocs}{"time"},
- "2 weeks ago") > 0) ? "red":"dark";
+ my $png = (Date_Cmp($fileinfo{$host}{$nprocs}{"time"}, $too_old) > 0) ? "red":"dark";
if ($nprocs != "1") { $color = " style=\"background-color:#e0e0e0;\""; }
$table_entries_h .= "<td$color align='center' valign='bottom'>".
"<img src='$png.png' alt='fail' width='20px' height='".
@@ -209,8 +213,7 @@
foreach my $host (sort(keys(%allhosts))) {
foreach my $nprocs (sort(keys(%{$allhosts{$host}}))) {
my $color = " style=\"background-color:#d0d0d0;\"";
- my $png = (Date_Cmp($fileinfo{$host}{$nprocs}{"time"},
- "2 weeks ago") > 0) ? "green":"bright";
+ my $png = (Date_Cmp($fileinfo{$host}{$nprocs}{"time"}, $too_old) > 0) ? "green":"bright";
if ($nprocs != "1") { $color = " style=\"background-color:#e0e0e0;\""; }
$table_entries_h .= "<td$color align='center' valign='top'>".
"<img src='$png.png' alt='success' width='20px' height='".
More information about the Commits
mailing list