aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type
diff options
context:
space:
mode:
authorPim van den Berg2013-05-18 22:53:39 +0200
committerPim van den Berg2013-05-18 22:53:39 +0200
commit3deff291c5713091bdb0346752796b47afc03879 (patch)
tree307e9862a264d2bb665d14639b64d5f0beb7c638 /type
parenttype/default: add missing initial variable definitions (diff)
downloadapt-panopticon_cgp-3deff291c5713091bdb0346752796b47afc03879.zip
apt-panopticon_cgp-3deff291c5713091bdb0346752796b47afc03879.tar.gz
apt-panopticon_cgp-3deff291c5713091bdb0346752796b47afc03879.tar.bz2
apt-panopticon_cgp-3deff291c5713091bdb0346752796b47afc03879.tar.xz
add config option for showing smooth (curved) graphs
Diffstat (limited to 'type')
-rw-r--r--type/Default.class.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/type/Default.class.php b/type/Default.class.php
index dfbf2da..42d5090 100644
--- a/type/Default.class.php
+++ b/type/Default.class.php
@@ -21,6 +21,7 @@ class Type_Default {
21 var $heigth; 21 var $heigth;
22 var $graph_type; 22 var $graph_type;
23 var $negative_io; 23 var $negative_io;
24 var $graph_smooth;
24 25
25 var $files; 26 var $files;
26 var $tinstances; 27 var $tinstances;
@@ -40,6 +41,7 @@ class Type_Default {
40 if (empty($this->heigth)) $this->heigth = $config['heigth']; 41 if (empty($this->heigth)) $this->heigth = $config['heigth'];
41 $this->graph_type = $config['graph_type']; 42 $this->graph_type = $config['graph_type'];
42 $this->negative_io = $config['negative_io']; 43 $this->negative_io = $config['negative_io'];
44 $this->graph_smooth = $config['graph_smooth'];
43 } 45 }
44 46
45 function rainbow_colors() { 47 function rainbow_colors() {
@@ -211,6 +213,8 @@ class Type_Default {
211 } 213 }
212 if ($this->rrdtool_opts != '') 214 if ($this->rrdtool_opts != '')
213 $rrdgraph[] = $this->rrdtool_opts; 215 $rrdgraph[] = $this->rrdtool_opts;
216 if ($this->graph_smooth)
217 $rrdgraph[] = '-E';
214 $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400); 218 $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400);
215 $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); 219 $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175);
216 $rrdgraph[] = '-l 0'; 220 $rrdgraph[] = '-l 0';