diff options
author | Pim van den Berg | 2013-07-03 22:47:39 +0200 |
---|---|---|
committer | Pim van den Berg | 2013-07-03 22:48:46 +0200 |
commit | f275445ef31d40c7cfdbe2cf3767c9c6051ec057 (patch) | |
tree | e831d56d825282c32530bbd09ebd85fb7d2c2c47 /type/Default.class.php | |
parent | plugin/snmp: add missing instantiation of Type_GenericIO class (diff) | |
download | apt-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.php | 3 |
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; |