--------------010707050701090605020409
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 11/05/2010 05:30 PM, Michael Friedrich wrote:
> 2. Is a patch from Nagios Tracker, I've slightly modified the Javascrip=
t
> to fit into Icinga's index.html. Confirmed working on FF and Opera. If
> that's what you are referring to - https://dev.icinga.org/issues/954 bu=
t
> I am not sure if you are talking about the same as I am
No, not quite - it's not identifying the *Nagios* the page comes *from*
but the host/service/group it is *about*. Think "OK, the database is
finally fixed - now where's that warning about our mailserver again?". A
bazillion of tabs all called "Current Network Status" or "Extended
Information" isn't giving you much of a hint for that.
Or, to quote the sample-config/cgi.cfg.in part of the attached patch:
# TAB-FRIENDLY S
# Activating this option changes the 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.
=09
#tab_friendly_titles=3D1
Kind regards,
J. Bern
--=20
Jochen Bern, Systemingenieur --- LINworks GmbH
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=E4ftsf=FChrer Metin Dogan, Oliver Mic=
hel
--------------010707050701090605020409
Content-Type: text/plain;
name="nagios-3.2.3-TabTitles-patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="nagios-3.2.3-TabTitles-patch.txt"
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==T
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]