From c497104fb17d959fa23f93635c0aed4c951fe6c7 Mon Sep 17 00:00:00 2001 From: Heuzef Date: Thu, 31 Oct 2019 10:54:31 +0100 Subject: [PATCH] Add $idBackup --- Check.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Check.pm b/Check.pm index 96db410..b33616f 100644 --- a/Check.pm +++ b/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 = "| Read me !"; }