summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 20f9591)
raw | patch | inline | side by side (parent: 20f9591)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 14 Mar 2009 12:31:00 +0000 (13:31 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 14 Mar 2009 12:31:00 +0000 (13:31 +0100) |
contrib/collection3/bin/graph.cgi | patch | blob | history |
index c246bda6a078db65ccff92f85045f2b472037f8d..c096dc9444215f1707d18540b0f59b8b725bdc91 100755 (executable)
our $Begin = param ('begin');
our $End = param ('end');
our $GraphWidth = param ('width');
+our $GraphHeight = param ('height');
our $Index = param ('index') || 0;
our $OutputFormat = 'PNG';
our $ContentType = 'image/png';
$GraphWidth = gc_get_scalar ('GraphWidth', 400);
}
+if ($GraphHeight)
+{
+ $GraphHeight =~ s/\D//g;
+}
+
+if (!$GraphHeight)
+{
+ $GraphHeight = gc_get_scalar ('GraphHeight', 100);
+}
+
{ # Sanitize begin and end times
$End ||= 0;
$Begin ||= 0;
}
$| = 1;
- RRDs::graph ('-', '-a', $OutputFormat, '--width', $GraphWidth, @timesel, @$args);
+ RRDs::graph ('-', '-a', $OutputFormat, '--width', $GraphWidth, '--height', $GraphHeight, @timesel, @$args);
if (my $err = RRDs::error ())
{
print STDERR "RRDs::graph failed: $err\n";