Add $idBackup

master
Heuzef 5 years ago
parent a7cb327cf5
commit c497104fb1
  1. 7
      Check.pm

@ -33,7 +33,7 @@ sub action
# Start loop
foreach my $host ( GetUserHosts(1) ) {
my($incrAge, $reasonHilite, $frequency, $lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors, $lastXferErrorsColor, $ifErrors);
my($incrAge, $reasonHilite, $frequency, $idBackup, $lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors, $lastXferErrorsColor, $ifErrors);
my($shortErr);
my @Backups = $bpc->BackupInfoRead($host);
@ -50,6 +50,9 @@ sub action
$frequency = $Conf{FullPeriod};
}
# ID
my $idBackup = ( $Backups->{num} );
# Age
my $lastBackup = ( $Backups[-1]->{type} =~ m/^full|incr$/ ) ? -1 : -2;
$lastAge = sprintf("%.1f", (time - $Backups[$lastBackup]->{startTime}) / (24 * 3600));
@ -68,7 +71,7 @@ sub action
$ifErrors = "";
} else {
$lastXferErrorsColor = "Tomato";
my $browseErrors = "?action=view&type=XferErr&num=0&host=$host";
my $browseErrors = "?action=view&type=XferErr&num=$idBackup&host=$host";
$ifErrors = "| <a href=\"$browseErrors\" target=\"_blank\"><strong>Read me !</strong></a>";
}

Loading…
Cancel
Save