aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type
diff options
context:
space:
mode:
authorPim van den Berg2014-07-16 23:35:23 +0200
committerPim van den Berg2014-07-16 23:37:24 +0200
commit5c090c0f64b290960c99b18ce28f3d2fda0e3391 (patch)
treeedceb258e03c3e7f66dba9fffc0a3093a5b7a4df /type
parenttype/default: optionally draw min/max spikes in a lighter color in graphs (diff)
downloadapt-panopticon_cgp-5c090c0f64b290960c99b18ce28f3d2fda0e3391.zip
apt-panopticon_cgp-5c090c0f64b290960c99b18ce28f3d2fda0e3391.tar.gz
apt-panopticon_cgp-5c090c0f64b290960c99b18ce28f3d2fda0e3391.tar.bz2
apt-panopticon_cgp-5c090c0f64b290960c99b18ce28f3d2fda0e3391.tar.xz
graph: don't overwrite config rrdtool_opts by rrdtool_opts from json plugin
Closes #86
Diffstat (limited to 'type')
-rw-r--r--type/Base.class.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/type/Base.class.php b/type/Base.class.php
index 5af4c29..b74c1b1 100644
--- a/type/Base.class.php
+++ b/type/Base.class.php
@@ -5,7 +5,7 @@
5class Type_Base { 5class Type_Base {
6 var $datadir; 6 var $datadir;
7 var $rrdtool; 7 var $rrdtool;
8 var $rrdtool_opts; 8 var $rrdtool_opts = array();
9 var $cache; 9 var $cache;
10 var $args; 10 var $args;
11 var $seconds; 11 var $seconds;
@@ -36,7 +36,8 @@ class Type_Base {
36 function __construct($config, $_get) { 36 function __construct($config, $_get) {
37 $this->datadir = $config['datadir']; 37 $this->datadir = $config['datadir'];
38 $this->rrdtool = $config['rrdtool']; 38 $this->rrdtool = $config['rrdtool'];
39 $this->rrdtool_opts = $config['rrdtool_opts']; 39 if (!empty($config['rrdtool_opts']))
40 $this->rrdtool_opts[] = $config['rrdtool_opts'];
40 $this->cache = $config['cache']; 41 $this->cache = $config['cache'];
41 $this->parse_get($_get); 42 $this->parse_get($_get);
42 $this->rrd_title = sprintf( 43 $this->rrd_title = sprintf(
@@ -253,8 +254,9 @@ class Type_Base {
253 default: 254 default:
254 break; 255 break;
255 } 256 }
256 if ($this->rrdtool_opts != '') 257 if (!empty($this->rrdtool_opts))
257 $rrdgraph[] = $this->rrdtool_opts; 258 foreach($this->rrdtool_opts as $opt)
259 $rrdgraph[] = $opt;
258 if ($this->graph_smooth) 260 if ($this->graph_smooth)
259 $rrdgraph[] = '-E'; 261 $rrdgraph[] = '-E';
260 if ($this->base) 262 if ($this->base)