mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Show stale results (8 hours old or more) in a paler color.
This commit is contained in:
parent
ac134d1d1b
commit
cd4c9b964f
2 changed files with 18 additions and 2 deletions
|
|
@ -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 UTC", gmtime($stat[9])) .
|
||||
"</span><br />";
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue