Add more color

master
Heuzef 5 years ago
parent 86052373f1
commit ae052ccec9
  1. 11
      Check.pm

@ -34,7 +34,7 @@ sub action
foreach my $host ( GetUserHosts(1) ) { foreach my $host ( GetUserHosts(1) ) {
my($fullDur, $incrCnt, $incrAge, $fullSize, $fullRate, $reasonHilite, my($fullDur, $incrCnt, $incrAge, $fullSize, $fullRate, $reasonHilite,
$lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors); $lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors, $lastXferErrorsColor);
my($shortErr); my($shortErr);
my @Backups = $bpc->BackupInfoRead($host); my @Backups = $bpc->BackupInfoRead($host);
my $fullCnt = $incrCnt = 0; my $fullCnt = $incrCnt = 0;
@ -96,6 +96,11 @@ sub action
$fullSize = sprintf("%.2f", $fullSize / 1024); $fullSize = sprintf("%.2f", $fullSize / 1024);
$incrAge = " " if ( $incrAge eq "" ); $incrAge = " " if ( $incrAge eq "" );
$lastXferErrors = $Backups[@Backups-1]{xferErrs} if ( @Backups ); $lastXferErrors = $Backups[@Backups-1]{xferErrs} if ( @Backups );
if ( $lastXferErrors == 0 ) {
$lastXferErrorsColor = "MediumSeaGreen";
} else {
$lastAgeColor = "Tomato";
}
$reasonHilite = $Conf{CgiStatusHilightColor}{$Status{$host}{reason}} $reasonHilite = $Conf{CgiStatusHilightColor}{$Status{$host}{reason}}
|| $Conf{CgiStatusHilightColor}{$Status{$host}{state}}; || $Conf{CgiStatusHilightColor}{$Status{$host}{state}};
if ( $Conf{BackupsDisable} == 1 ) { if ( $Conf{BackupsDisable} == 1 ) {
@ -127,8 +132,8 @@ sub action
$str = <<EOF; $str = <<EOF;
<tr$reasonHilite><td class="border">${HostLink($host)}</td> <tr$reasonHilite><td class="border">${HostLink($host)}</td>
<td align="center" class="border">$fullAge</td> <td align="center" class="border" style="color:LightGray">>$fullAge</td>
<td align="center" class="border">$incrAge</td> <td align="center" class="border" style="color:LightGray">>$incrAge</td>
<td align="center" class="border" style="color:$lastAgeColor;">$lastAge</td> <td align="center" class="border" style="color:$lastAgeColor;">$lastAge</td>
<td align="center" class="border">$lastXferErrors</td> <td align="center" class="border">$lastXferErrors</td>
<td align="center" class="border">???</td> <td align="center" class="border">???</td>

Loading…
Cancel
Save