diff options
Diffstat (limited to 'type/Default.class.php')
-rw-r--r-- | type/Default.class.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/type/Default.class.php b/type/Default.class.php index 0c992e2..ad880b3 100644 --- a/type/Default.class.php +++ b/type/Default.class.php | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | class Type_Default { | 5 | class Type_Default { |
6 | var $datadir; | 6 | var $datadir; |
7 | var $rrdtool; | ||
7 | var $args; | 8 | var $args; |
8 | var $seconds; | 9 | var $seconds; |
9 | var $data_sources = array('value'); | 10 | var $data_sources = array('value'); |
@@ -21,8 +22,9 @@ class Type_Default { | |||
21 | var $tinstances; | 22 | var $tinstances; |
22 | var $identifiers; | 23 | var $identifiers; |
23 | 24 | ||
24 | function __construct($datadir) { | 25 | function __construct($config) { |
25 | $this->datadir = $datadir; | 26 | $this->datadir = $config['datadir']; |
27 | $this->rrdtool = $config['rrdtool']; | ||
26 | $this->parse_get(); | 28 | $this->parse_get(); |
27 | $this->rrd_files(); | 29 | $this->rrd_files(); |
28 | $this->identifiers = $this->file2identifier($this->files); | 30 | $this->identifiers = $this->file2identifier($this->files); |
@@ -124,7 +126,8 @@ class Type_Default { | |||
124 | } | 126 | } |
125 | 127 | ||
126 | function rrd_options() { | 128 | function rrd_options() { |
127 | $rrdgraph[] = '/usr/bin/rrdtool graph - -a PNG'; | 129 | $rrdgraph[] = $this->rrdtool; |
130 | $rrdgraph[] = 'graph - -a PNG'; | ||
128 | $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400); | 131 | $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400); |
129 | $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); | 132 | $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); |
130 | $rrdgraph[] = '-l 0'; | 133 | $rrdgraph[] = '-l 0'; |