diff options
author | Pim van den Berg | 2009-12-28 15:47:42 +0100 |
---|---|---|
committer | Pim van den Berg | 2009-12-28 15:47:42 +0100 |
commit | 5a138d4c0464b591177cf523ebb8e0603e32d650 (patch) | |
tree | 31ef3a927d160c6dfab67e689d08bf3b2342e262 /type/GenericIO.class.php | |
parent | replace duplicate code by function plugin_header (diff) | |
download | apt-panopticon_cgp-5a138d4c0464b591177cf523ebb8e0603e32d650.zip apt-panopticon_cgp-5a138d4c0464b591177cf523ebb8e0603e32d650.tar.gz apt-panopticon_cgp-5a138d4c0464b591177cf523ebb8e0603e32d650.tar.bz2 apt-panopticon_cgp-5a138d4c0464b591177cf523ebb8e0603e32d650.tar.xz |
replace duplicate code by function rrd_options
Diffstat (limited to 'type/GenericIO.class.php')
-rw-r--r-- | type/GenericIO.class.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/type/GenericIO.class.php b/type/GenericIO.class.php index 573abde..e91cb16 100644 --- a/type/GenericIO.class.php +++ b/type/GenericIO.class.php | |||
@@ -7,13 +7,7 @@ class Type_GenericIO extends Type_Default { | |||
7 | function rrd_gen_graph() { | 7 | function rrd_gen_graph() { |
8 | $filename = $this->get_filename(); | 8 | $filename = $this->get_filename(); |
9 | 9 | ||
10 | $rrdgraph[] = '/usr/bin/rrdtool graph - -a PNG'; | 10 | $rrdgraph = $this->rrd_options(); |
11 | $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400); | ||
12 | $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); | ||
13 | $rrdgraph[] = '-l 0'; | ||
14 | $rrdgraph[] = sprintf('-t "%s"', $this->rrd_title); | ||
15 | $rrdgraph[] = sprintf('-v "%s"', $this->rrd_vertical); | ||
16 | $rrdgraph[] = sprintf('-s -%d', is_numeric($this->seconds) ? $this->seconds : 86400); | ||
17 | 11 | ||
18 | if ($this->scale) | 12 | if ($this->scale) |
19 | $raw = '_raw'; | 13 | $raw = '_raw'; |