Show stale results (8 hours old or more) in a paler color.

This commit is contained in:
Dag-Erling Smørgrav 2003-10-11 09:40:18 +00:00
parent ac134d1d1b
commit cd4c9b964f
2 changed files with 18 additions and 2 deletions

View file

@ -33,6 +33,8 @@ use 5.006_001;
use strict;
use POSIX qw(strftime);
my $STALE = 8 * 3600;
my %BRANCHES;
my %ARCHES;
@ -100,6 +102,8 @@ MAIN:{
}
print " </tr>\n";
my $now = time();
foreach my $arch (sort(keys(%ARCHES))) {
foreach my $machine (sort(keys(%{$ARCHES{$arch}}))) {
my $html = " <tr>
@ -111,6 +115,8 @@ MAIN:{
if (-f "$DIR/$log.brief") {
my @stat = stat("$DIR/$log.brief");
my $class = success("$DIR/$log.brief") ? "ok" : "fail";
$class .= "-stale"
if ($now - $stat[9] > $STALE);
$links .= "<span class=\"$class\">" .
strftime("%Y-%m-%d %H:%M&nbsp;UTC", gmtime($stat[9])) .
"</span><br />";

View file

@ -34,12 +34,22 @@ A:active {
.ok {
background-color: white;
color: green;
color: #070;
}
.ok-stale {
background-color: white;
color: #797;
}
.fail {
background-color: white;
color: red;
color: #700;
}
.fail-stale {
background-color: white;
color: #977;
}
TD, TH {