Changeset 382 for trunk/nagios-velvice/velvice.cgi
- Timestamp:
- Jan 11, 2019, 11:06:09 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nagios-velvice/velvice.cgi
r381 r382 17 17 use strict; 18 18 use warnings; 19 use version; our $VERSION = version->declare('0.10. 7');19 use version; our $VERSION = version->declare('0.10.8'); 20 20 21 21 use CGI; … … 368 368 my $downtime = downtime($host_stat->last_state_change); 369 369 my $color = alertcolor('CRITICAL', $downtime); 370 $htmlpage .= " <tr style='background:$color'>\n"; 371 $htmlpage .= " <td class='hoop'><a href=\"$config->{'nagios-server'}{'status-cgi'}?host=" . uri_encode($hostname) . "\">$hostname</a></td>\n"; 370 my $stylecolor = "style='background:$color;'"; 371 $htmlpage .= " <tr>\n"; 372 $htmlpage .= " <td $stylecolor>" . "<a href=\"$cgi_script_name?check=" . uri_encode($hostname) . '">↯</a></td>' . "\n"; 373 $htmlpage .= " <td $stylecolor class='hoop'><a href=\"$config->{'nagios-server'}{'status-cgi'}?host=" . uri_encode($hostname) . "\">$hostname</a></td>\n"; 372 374 my @host_service; 373 375 for my $srv ($log->list_services_on_host($host)) { 374 push @host_service, $log->service($host, $srv)->service_description; 376 my $service = $log->service($host, $srv)->service_description; 377 push @host_service, $service; 378 if ($cgi_check eq $hostname) { 379 $now++; 380 printf $nagios_cmd "[%lu] SCHEDULE_FORCED_SVC_CHECK;%s;%s;%lu\n", $now, $hostname, $service, $now; 381 } 375 382 } 376 $htmlpage .= " <td><small>" . join(', ', @host_service) . "</small></td>\n"; 377 $htmlpage .= " <td style='text-align:right;'>$downtime days</td>\n"; 383 $htmlpage .= " <td $stylecolor><small>" . join(', ', @host_service) . "</small></td>\n"; 384 $htmlpage .= " <td $stylecolor style='text-align:right;'>$downtime days</td>\n"; 385 $htmlpage .= " <td class='checking'></td>\n" if $cgi_check eq $hostname; 378 386 $htmlpage .= " </tr>\n"; 379 387 }
Note: See TracChangeset
for help on using the changeset viewer.