Add show me

master
Heuzef 5 years ago
parent 62a2b12131
commit 52093cc4ae
  1. 10
      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);
my($incrAge, $reasonHilite, $frequency, $lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors, $lastXferErrorsColor, $ifErrors);
my($shortErr);
my @Backups = $bpc->BackupInfoRead($host);
@ -61,12 +61,15 @@ sub action
$lastAgeColor = "Tomato";
}
# Color for errors
# Color and link for errors
$lastXferErrors = $Backups[@Backups-1]->{xferErrs} if ( @Backups );
if ( $lastXferErrors == 0 ) {
$lastXferErrorsColor = "MediumSeaGreen";
$ifErrors = "";
} else {
$lastXferErrorsColor = "Tomato";
my $browseErrors = "?action=view&type=XferErr&num=0&host=$host";
$ifErrors = "<a href="$browseErrors" target="_blank">[Show me]</a>";
}
# Colors statuts
@ -127,14 +130,13 @@ sub action
# Get URL for explore file
my $browseFile = "?action=browse&host=$host";
my $browseErrors = "?action=view&type=XferErr&num=0&host=$host";
# Show summary
$str .= <<EOF;
<tr$reasonHilite>
<td class="border"><a href="$browseFile" target="_blank">$host</a></td>
<td align="center" class="border" style="color:$lastAgeColor;">$lastAge <em>(Freq: $frequency)</em></td>
<td align="center" class="border" style="color:$lastXferErrorsColor;">$lastXferErrors (<a href="$browseErrors" target="_blank">Extract errors</a>)</td>
<td align="center" class="border" style="color:$lastXferErrorsColor;">$lastXferErrors $ifErrors</td>
<td align="center" class="border" style="color:$sizeConsistencyColor;">$sizeConsistency</td>
</tr>
EOF

Loading…
Cancel
Save