Add $idBackup

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

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

Loading…
Cancel
Save