Jesse said:

>The issue with long hostnames in graphs is a side-effect of trying to
>use the same variable ("$hostname") for too many things.  This is
>fairly deeply embedded in the front-end code, and while there is a
>work-around in trunk, it could be handled more elegantly.  But, the
>problem is fundamentally a *display* problem, not one dealing with how
>the RRD files are stored (thankfully!).

I see the new $strip_domainname in conf.php.  I like it on small graphs, but 
not on large ones, where I would rather see the FQDN.  So I was thinking it 
should just be a function of graph size.  Then it would not even be needed in 
conf.php.  Something like:

Index: web/graph.php
===================================================================
--- web/graph.php       (revision 1732)
+++ web/graph.php       (working copy)
@@ -38,6 +38,9 @@

 $height  = $graph_sizes[ $size ][ 'height' ];
 $width   = $graph_sizes[ $size ][ 'width' ];
+
+$strip_domainname = $width < 350 ? true : false;
+
 $fudge_0 = $graph_sizes[ $size ][ 'fudge_0' ];
 $fudge_1 = $graph_sizes[ $size ][ 'fudge_1' ];
 $fudge_2 = $graph_sizes[ $size ][ 'fudge_2' ];

Actually, 350 could be replaced with $strip_domain_width, and then that could 
be in conf.php instead so that users can choose at what graph width they want 
to strip the domain.  0 = FQDN, 5000 = hostname, 350 = reasonable default.

-twitham

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to