[PATCH] add hostname to html title
Jochen Bern
Jochen.Bern at LINworks.de
Fri Oct 8 14:25:31 CEST 2010
On 10/07/2010 03:13 AM, Craig Leres wrote:
> Attached is a short patch that uses javascript to add the current
> hostname to the page title in the html generated by index.php. For
> example, this changes the title from "Nagios" to "Nagios: ee.lbl.gov"
> and makes it easier to open the "right" browser window when running
> nagios on multiple servers.
FWIW: This gave me the idea to reflect not the Nagios host (which I can
recognize by color coding the favicon.ico), but the host/service/group
shown into the <title>, so as to better recognize the Firefox tabs I
opened to diagnose problem X (as opposed to those opened for the
simultaneous problems Y, Z, and WotNot ;-). Unfortunately, it's a patch
on top of an already-patched 3.2.1, so take the diffs with a grain of
salt ...
(Also, making the <title> read just "Service Desc", "[Hostname]",
"(Servicegroup)", and "{Hostgroup}", respectively, is aimed at keeping
ever-narrowing *tabs* legible. If you're using *windows* instead, expand
the text at your leisure.)
Regards,
J. Bern
--
Jochen Bern, Systemingenieur --- LINworks GmbH <http://www.LINworks.de/>
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nagios-3.2.1-HostSrvGrp-Titles-patch.txt
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20101008/ebb3d055/attachment.txt>
-------------- next part --------------
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list