fix collectd graphs on graph browser

git-svn-id: http://www.observium.org/svn/observer/trunk@2570 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-25 22:10:03 +00:00
parent b230d8bc5e
commit 28b829b18d
2 changed files with 9 additions and 3 deletions

View File

@@ -204,6 +204,13 @@ if(isset($rrd_cmd))
$rrd_cmd .= " -s " . $from . " -e " . $to;
}
if ($_GET['legend'] == "no" || $_GET['legend'] == 0) { $rrd_cmd .= " -g "; }
if ($height < "99") { $rrd_cmd .= " --only-graph "; }
if ($width <= "300") { $rrd_cmd .= " --font LEGEND:7:" . $config['mono_font'] . " --font AXIS:6:" . $config['mono_font'] . " "; }
else { $rrd_cmd .= " --font LEGEND:8:" . $config['mono_font'] . " --font AXIS:7:" . $config['mono_font'] . " "; }
if (isset($_GET['debug'])) {
header('Content-Type: text/plain; charset=utf-8');
printf("Would have executed:\n%s\n", $rrd_cmd);