ALT Linux repos
Group :: Monitoring
RPM: nagios
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: nagios-2.0b1-alt-cgi.patch
Download
Download
--- nagios-2.0b1/cgi/status.c.orig 2004-11-06 15:44:12 +1000
+++ nagios-2.0b1/cgi/status.c 2005-01-09 01:16:32 +1000
@@ -1661,7 +1661,16 @@
}
temp_serviceextinfo=find_serviceextinfo(temp_service->host_name,temp_service->description);
if(temp_serviceextinfo!=NULL){
- if(temp_serviceextinfo->icon_image!=NULL){
+ if(temp_serviceextinfo->notes_url!=NULL){
+ printf("<TD align=center valign=center>");
+ printf("<A HREF='");
+ print_extra_service_url(temp_serviceextinfo->host_name,temp_serviceextinfo->description,temp_serviceextinfo->notes_url);
+ printf("' TARGET='main'>");
+ printf("<IMG SRC='%s%s' BORDER=0 WIDTH=%d HEIGHT=%d ALT='%s' TITLE='%s'>",url_images_path,temp_serviceextinfo->icon_image,STATUS_ICON_WIDTH,STATUS_ICON_HEIGHT,(temp_serviceextinfo->icon_image_alt==NULL)?"":temp_serviceextinfo->icon_image_alt,(temp_serviceextinfo->icon_image_alt==NULL)?"":temp_serviceextinfo->icon_image_alt);
+ printf("</A>");
+ printf("</TD>\n");
+ }
+ else if(temp_serviceextinfo->icon_image!=NULL){
printf("<TD ALIGN=center valign=center>");
printf("<A HREF='%s?type=%d&host=%s",EXTINFO_CGI,DISPLAY_SERVICE_INFO,url_encode(temp_service->host_name));
printf("&service=%s'>",url_encode(temp_service->description));
@@ -1669,6 +1678,15 @@
printf("</A>");
printf("</TD>\n");
}
+ if(temp_serviceextinfo->action_url!=NULL){
+ printf("<TD align=center valign=center>");
+ printf("<A HREF='");
+ print_extra_service_url(temp_serviceextinfo->host_name,temp_serviceextinfo->description,temp_serviceextinfo->action_url);
+ printf("' TARGET='main'>");
+ printf("<IMG SRC='%s%s' BORDER=0 WIDTH=%d HEIGHT=%d ALT='%s' TITLE='%s'>",url_images_path,ACTION_ICON,STATUS_ICON_WIDTH,STATUS_ICON_HEIGHT,"Perform Extra Host Actions","Perform Extra Host Actions");
+ printf("</A>");
+ printf("</TD>\n");
+ }
}
printf("</TR>\n");
printf("</TABLE>\n");