|
|
@ -36,7 +36,6 @@ sub action |
|
|
|
my($incrAge, $reasonHilite, $frequency, $lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors, $lastXferErrorsColor); |
|
|
|
my($incrAge, $reasonHilite, $frequency, $lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors, $lastXferErrorsColor); |
|
|
|
my($shortErr); |
|
|
|
my($shortErr); |
|
|
|
my @Backups = $bpc->BackupInfoRead($host); |
|
|
|
my @Backups = $bpc->BackupInfoRead($host); |
|
|
|
my $fullAge = $incrAge = $lastAge = -1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$bpc->ConfigRead($host); |
|
|
|
$bpc->ConfigRead($host); |
|
|
|
%Conf = $bpc->Conf(); |
|
|
|
%Conf = $bpc->Conf(); |
|
|
@ -52,11 +51,9 @@ sub action |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# Age |
|
|
|
# Age |
|
|
|
for ( my $i = 0 ; $i < @Backups ; $i++ ) { |
|
|
|
|
|
|
|
if ( $Backups[$i]{type} eq "full" or "incr" ) { |
|
|
|
if ( $Backups[$i]{type} eq "full" or "incr" ) { |
|
|
|
$lastAge = sprintf("%.1f", (time - $Backups[-1]{startTime}) / (24 * 3600)); |
|
|
|
$lastAge = sprintf("%.1f", (time - $Backups[-1]{startTime}) / (24 * 3600)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Color for age |
|
|
|
# Color for age |
|
|
|
if ( $lastAge < $frequency ) { |
|
|
|
if ( $lastAge < $frequency ) { |
|
|
@ -64,17 +61,7 @@ sub action |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$lastAgeColor = "Tomato"; |
|
|
|
$lastAgeColor = "Tomato"; |
|
|
|
} |
|
|
|
} |
|
|
|
if ( $fullAge < 0 ) { |
|
|
|
|
|
|
|
$fullAge = 0; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$fullAge = sprintf("%.1f", (time - $fullAge) / (24 * 3600)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( $incrAge < 0 ) { |
|
|
|
|
|
|
|
$incrAge = 0; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$incrAge = sprintf("%.1f", (time - $incrAge) / (24 * 3600)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$incrAge = " " if ( $incrAge eq "" ); |
|
|
|
|
|
|
|
# Color for errors |
|
|
|
# Color for errors |
|
|
|
$lastXferErrors = $Backups[@Backups-1]{xferErrs} if ( @Backups ); |
|
|
|
$lastXferErrors = $Backups[@Backups-1]{xferErrs} if ( @Backups ); |
|
|
|
if ( $lastXferErrors == 0 ) { |
|
|
|
if ( $lastXferErrors == 0 ) { |
|
|
|