Move lastAgeColor function

master
Heuzef 5 years ago
parent 498298a36f
commit fe1ef036bb
  1. 10
      Check.pm

@ -73,6 +73,11 @@ sub action
} else { } else {
$lastAge = sprintf("%.1f", (time - $lastAge) / (24 * 3600)); $lastAge = sprintf("%.1f", (time - $lastAge) / (24 * 3600));
} }
if ( $lastAge < 1.1 ) {
$lastAgeColor = "MediumSeaGreen";
} else {
$lastAgeColor = "Tomato";
}
if ( $fullAge < 0 ) { if ( $fullAge < 0 ) {
$fullAge = ""; $fullAge = "";
$fullRate = ""; $fullRate = "";
@ -119,11 +124,6 @@ sub action
($shortErr = $Status{$host}{error}) =~ s/(.{48}).*/$1.../; ($shortErr = $Status{$host}{error}) =~ s/(.{48}).*/$1.../;
$shortErr = " ($shortErr)"; $shortErr = " ($shortErr)";
} }
if ( $lastAge < 1.1 ) {
$lastAgeColor = "MediumSeaGreen";
} else {
$lastAgeColor = "Tomato";
}
$str = <<EOF; $str = <<EOF;
<tr$reasonHilite><td class="border">${HostLink($host)}</td> <tr$reasonHilite><td class="border">${HostLink($host)}</td>

Loading…
Cancel
Save