Fix indentation

master
Heuzef 5 years ago
parent a9721b0c36
commit e628059705
  1. 55
      Check.pm

@ -77,6 +77,7 @@ sub action
} else { } else {
$lastAge = sprintf("%.1f", (time - $lastAge) / (24 * 3600)); $lastAge = sprintf("%.1f", (time - $lastAge) / (24 * 3600));
} }
# Color for age # Color for age
if ( $lastAge < 1.1 ) { if ( $lastAge < 1.1 ) {
$lastAgeColor = "MediumSeaGreen"; $lastAgeColor = "MediumSeaGreen";
@ -108,34 +109,32 @@ sub action
$lastAgeColor = "Tomato"; $lastAgeColor = "Tomato";
} }
$reasonHilite = $Conf{CgiStatusHilightColor}{$Status{$host}{reason}} || $Conf{CgiStatusHilightColor}{$Status{$host}{state}}; $reasonHilite = $Conf{CgiStatusHilightColor}{$Status{$host}{reason}} || $Conf{CgiStatusHilightColor}{$Status{$host}{state}};
# If Backup is disable # If Backup is disable
if ( $Conf{BackupsDisable} == 1 ) { if ( $Conf{BackupsDisable} == 1 ) {
if ( $Status{$host}{state} ne "Status_backup_in_progress" && $Status{$host}{state} ne "Status_restore_in_progress" ) { if ( $Status{$host}{state} ne "Status_backup_in_progress" && $Status{$host}{state} ne "Status_restore_in_progress" ) {
$reasonHilite = $Conf{CgiStatusHilightColor}{Disabled_OnlyManualBackups}; $reasonHilite = $Conf{CgiStatusHilightColor}{Disabled_OnlyManualBackups};
$tempState = "Disabled_OnlyManualBackups"; $tempState = "Disabled_OnlyManualBackups";
$tempReason = ""; $tempReason = "";
} else { } else {
$tempState = $Status{$host}{state}; $tempState = $Status{$host}{state};
$tempReason = $Status{$host}{reason}; $tempReason = $Status{$host}{reason};
} }
} elsif ($Conf{BackupsDisable} == 2 ) { } elsif ($Conf{BackupsDisable} == 2 ) {
$reasonHilite = $Conf{CgiStatusHilightColor}{Disabled_AllBackupsDisabled}; $reasonHilite = $Conf{CgiStatusHilightColor}{Disabled_AllBackupsDisabled};
$tempState = "Disabled_AllBackupsDisabled"; $tempState = "Disabled_AllBackupsDisabled";
$tempReason = ""; $tempReason = "";
} else { } else {
$tempState = $Status{$host}{state}; $tempState = $Status{$host}{state};
$tempReason = $Status{$host}{reason}; $tempReason = $Status{$host}{reason};
} }
$reasonHilite = " bgcolor=\"$reasonHilite\"" if ( $reasonHilite ne "" );
if ( $tempState ne "Status_backup_in_progress" $reasonHilite = " bgcolor=\"$reasonHilite\"" if ( $reasonHilite ne "" );
&& $tempState ne "Status_restore_in_progress" if ( $tempState ne "Status_backup_in_progress" && $tempState ne "Status_restore_in_progress" && $Conf{BackupsDisable} == 0 && $Status{$host}{error} ne "" ) {
&& $Conf{BackupsDisable} == 0 ($shortErr = $Status{$host}{error}) =~ s/(.{48}).*/$1.../;
&& $Status{$host}{error} ne "" ) { $shortErr = " ($shortErr)";
($shortErr = $Status{$host}{error}) =~ s/(.{48}).*/$1.../; }
$shortErr = " ($shortErr)";
}
# Check Size Consistency # Check Size Consistency
my $bpc = BackupPC::Lib->new(); my $bpc = BackupPC::Lib->new();

Loading…
Cancel
Save