vvuksan/ganglia-misc — Issue #68: proposal - expand json for graph generation with fudge
Author: tmetschke
Created: 2011-10-19 16:36:01+00:00
State: open

Hi,

I got my hands dirty today to understand what happens with the new and awesome way to define graphs with json.
What I am missing is the possibility to add fudge to them - the aim is to have equal high graphs in the cluster and host overview with medium sized graphs.

{
"report_name" : "load_report",
"report_type" : "standard",
"title" : "Load",
...,
"fudge" : "100" <-- additional hight in pixels
}

if you would change

https://github.com/vvuksan/ganglia-misc/blob/master/ganglia-web/functions.php#L905
to something like that

if( $graph_config['fudge'] ) {
$rrdtool_graph['height'] += ($size == 'medium') ? $graph_config['fudge'] : 0;
} else {
$rrdtool_graph['height'] += ($size == 'medium') ? 28 : 0;
if( $conf['graphreport_stats'] ) {
$rrdtool_graph['height'] += ($size == 'medium') ? 52 : 0;
}
}

all would work for me.