aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type/Default.class.php
diff options
context:
space:
mode:
authorPim van den Berg2013-07-03 22:47:39 +0200
committerPim van den Berg2013-07-03 22:48:46 +0200
commitf275445ef31d40c7cfdbe2cf3767c9c6051ec057 (patch)
treee831d56d825282c32530bbd09ebd85fb7d2c2c47 /type/Default.class.php
parentplugin/snmp: add missing instantiation of Type_GenericIO class (diff)
downloadapt-panopticon_cgp-f275445ef31d40c7cfdbe2cf3767c9c6051ec057.zip
apt-panopticon_cgp-f275445ef31d40c7cfdbe2cf3767c9c6051ec057.tar.gz
apt-panopticon_cgp-f275445ef31d40c7cfdbe2cf3767c9c6051ec057.tar.bz2
apt-panopticon_cgp-f275445ef31d40c7cfdbe2cf3767c9c6051ec057.tar.xz
type/default: dont include y-axis description (-v option) when not set
It caused an "Unknown argument: undefined" error when using canvas.
Diffstat (limited to 'type/Default.class.php')
-rw-r--r--type/Default.class.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/type/Default.class.php b/type/Default.class.php
index 8632328..416a352 100644
--- a/type/Default.class.php
+++ b/type/Default.class.php
@@ -219,7 +219,8 @@ class Type_Default {
219 $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); 219 $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175);
220 $rrdgraph[] = '-l 0'; 220 $rrdgraph[] = '-l 0';
221 $rrdgraph[] = sprintf('-t "%s on %s"', $this->rrd_title, $this->args['host']); 221 $rrdgraph[] = sprintf('-t "%s on %s"', $this->rrd_title, $this->args['host']);
222 $rrdgraph[] = sprintf('-v "%s"', $this->rrd_vertical); 222 if ($this->rrd_vertical)
223 $rrdgraph[] = sprintf('-v "%s"', $this->rrd_vertical);
223 $rrdgraph[] = sprintf('-s e-%d', is_numeric($this->seconds) ? $this->seconds : 86400); 224 $rrdgraph[] = sprintf('-s e-%d', is_numeric($this->seconds) ? $this->seconds : 86400);
224 225
225 return $rrdgraph; 226 return $rrdgraph;