diff -Naur nagios-3.2.3+Fixes/cgi/cgiutils.c nagios-3.2.3+SmallPatches/cgi/cgiutils.c --- nagios-3.2.3+Fixes/cgi/cgiutils.c 2010-11-05 13:18:34.000000000 +0100 +++ nagios-3.2.3+SmallPatches/cgi/cgiutils.c 2010-11-05 20:16:50.000000000 +0100 @@ -118,6 +118,8 @@ int color_transparency_index_g=255; int color_transparency_index_b=255; +int tab_friendly_titles=FALSE; + extern hostgroup *hostgroup_list; extern contactgroup *contactgroup_list; extern command *command_list; @@ -431,6 +433,9 @@ else if(!strcmp(var,"use_ssl_authentication")) use_ssl_authentication=(atoi(val)>0)?TRUE:FALSE; + + else if(!strcmp(var,"tab_friendly_titles")) + tab_friendly_titles=(atoi(val)>0)?TRUE:FALSE; } /* free memory and close the file */ diff -Naur nagios-3.2.3+Fixes/cgi/extinfo.c nagios-3.2.3+SmallPatches/cgi/extinfo.c --- nagios-3.2.3+Fixes/cgi/extinfo.c 2010-11-05 14:32:29.000000000 +0100 +++ nagios-3.2.3+SmallPatches/cgi/extinfo.c 2010-11-05 20:23:24.000000000 +0100 @@ -70,6 +70,8 @@ extern int enable_splunk_integration; +extern int tab_friendly_titles; + extern char *notes_url_target; extern char *action_url_target; @@ -606,7 +608,20 @@ printf("\n"); printf("\n",url_images_path); printf("\n"); - printf("Extended Information\n"); + if (tab_friendly_titles){ + if ((display_type==DISPLAY_HOST_INFO)&&host_name&&(*host_name!='\0')) + printf ("[%s]\n",html_encode(host_name,FALSE)); + else if ((display_type==DISPLAY_SERVICE_INFO)&&service_desc&&(*service_desc!='\0')){ + printf ("%s\n",service_desc); + if (host_name&&(*host_name!='\0')) printf ("@ %s\n",html_encode(host_name,FALSE)); + } + else if ((display_type==DISPLAY_HOSTGROUP_INFO)&&hostgroup_name&&(*hostgroup_name!='\0')) + printf ("{%s}\n",html_encode(hostgroup_name,FALSE)); + else if ((display_type==DISPLAY_SERVICEGROUP_INFO)&&servicegroup_name + &&(*servicegroup_name!='\0')) printf ("(%s)\n",html_encode(servicegroup_name,FALSE)); + else printf("Extended Information\n"); + } + else printf("Extended Information\n"); printf("\n"); if(use_stylesheet==TRUE){ diff -Naur nagios-3.2.3+Fixes/cgi/status.c nagios-3.2.3+SmallPatches/cgi/status.c --- nagios-3.2.3+Fixes/cgi/status.c 2010-10-28 14:31:40.000000000 +0200 +++ nagios-3.2.3+SmallPatches/cgi/status.c 2010-11-05 20:26:48.000000000 +0100 @@ -58,6 +58,8 @@ extern int enable_splunk_integration; +extern int tab_friendly_titles; + extern host *host_list; extern service *service_list; extern hostgroup *hostgroup_list; @@ -536,7 +538,16 @@ printf("\n"); printf("\n",url_images_path); printf("\n"); - printf("Current Network Status\n"); + if (tab_friendly_titles){ + if ((display_type==DISPLAY_HOSTS)&&(!show_all_hosts)&&host_name&&(*host_name!='\0')) + printf ("[%s]\n",html_encode(host_name,FALSE)); + else if ((display_type==DISPLAY_HOSTGROUPS)&&(!show_all_hostgroups)&&hostgroup_name + &&(*hostgroup_name!='\0')) printf ("{%s}\n",html_encode(hostgroup_name,FALSE)); + else if ((display_type==DISPLAY_SERVICEGROUPS)&&(!show_all_servicegroups)&&servicegroup_name + &&(*servicegroup_name!='\0')) printf ("(%s)\n",html_encode(servicegroup_name,FALSE)); + else printf("Current Network Status\n"); + } + else printf("Current Network Status\n"); printf("\n"); if(use_stylesheet==TRUE){ diff -Naur nagios-3.2.3+Fixes/sample-config/cgi.cfg.in nagios-3.2.3+SmallPatches/sample-config/cgi.cfg.in --- nagios-3.2.3+Fixes/sample-config/cgi.cfg.in 2009-06-17 17:13:52.000000000 +0200 +++ nagios-3.2.3+SmallPatches/sample-config/cgi.cfg.in 2010-11-05 20:30:26.000000000 +0100 @@ -355,3 +355,18 @@ + +# TAB-FRIENDLY S +# Activating this option changes the <title> of status.cgi +# and extinfo.cgi when they refer to a single host, service, +# or group. They will then read: +# [Host] +# {HostGroup} +# ServiceDesc @ Host +# (ServiceGroup) +# These are easier to read and find if you use (many) tabs +# in your browser. + +#tab_friendly_titles=1 + +