aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type/GenericStacked.class.php
diff options
context:
space:
mode:
authorPim van den Berg2013-05-18 16:05:43 +0200
committerPim van den Berg2013-05-18 16:08:09 +0200
commit5793a8cd003643974206e44ea752ab0966cfa8c0 (patch)
tree387a6a327af9834f2986ad3316be2183949d897a /type/GenericStacked.class.php
parentjsrrdgraph: RrdGraph.js: fix undefined 2nd argument of RrdVdef function (diff)
downloadapt-panopticon_cgp-5793a8cd003643974206e44ea752ab0966cfa8c0.zip
apt-panopticon_cgp-5793a8cd003643974206e44ea752ab0966cfa8c0.tar.gz
apt-panopticon_cgp-5793a8cd003643974206e44ea752ab0966cfa8c0.tar.bz2
apt-panopticon_cgp-5793a8cd003643974206e44ea752ab0966cfa8c0.tar.xz
integrate jsrrdgraph in CGP
Diffstat (limited to 'type/GenericStacked.class.php')
-rw-r--r--type/GenericStacked.class.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/type/GenericStacked.class.php b/type/GenericStacked.class.php
index 7c65ddd..5d1a556 100644
--- a/type/GenericStacked.class.php
+++ b/type/GenericStacked.class.php
@@ -15,9 +15,9 @@ class Type_GenericStacked extends Type_Default {
15 $i=0; 15 $i=0;
16 foreach ($this->tinstances as $tinstance) { 16 foreach ($this->tinstances as $tinstance) {
17 foreach ($this->data_sources as $ds) { 17 foreach ($this->data_sources as $ds) {
18 $rrdgraph[] = sprintf('DEF:min_%s%s="%s":%s:MIN', crc32hex($sources[$i]), $raw, $this->rrd_escape($this->files[$tinstance]), $ds); 18 $rrdgraph[] = sprintf('DEF:min_%s%s=%s:%s:MIN', crc32hex($sources[$i]), $raw, $this->parse_filename($this->files[$tinstance]), $ds);
19 $rrdgraph[] = sprintf('DEF:avg_%s%s="%s":%s:AVERAGE', crc32hex($sources[$i]), $raw, $this->rrd_escape($this->files[$tinstance]), $ds); 19 $rrdgraph[] = sprintf('DEF:avg_%s%s=%s:%s:AVERAGE', crc32hex($sources[$i]), $raw, $this->parse_filename($this->files[$tinstance]), $ds);
20 $rrdgraph[] = sprintf('DEF:max_%s%s="%s":%s:MAX', crc32hex($sources[$i]), $raw, $this->rrd_escape($this->files[$tinstance]), $ds); 20 $rrdgraph[] = sprintf('DEF:max_%s%s=%s:%s:MAX', crc32hex($sources[$i]), $raw, $this->parse_filename($this->files[$tinstance]), $ds);
21 $i++; 21 $i++;
22 } 22 }
23 } 23 }
@@ -51,11 +51,11 @@ class Type_GenericStacked extends Type_Default {
51 foreach ($sources as $source) { 51 foreach ($sources as $source) {
52 $dsname = $this->ds_names[$source] != '' ? $this->ds_names[$source] : $source; 52 $dsname = $this->ds_names[$source] != '' ? $this->ds_names[$source] : $source;
53 $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]) : $this->colors; 53 $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]) : $this->colors;
54 $rrdgraph[] = sprintf('LINE1:area_%s#%s:\'%s\'', crc32hex($source), $this->validate_color($color), $this->rrd_escape($dsname)); 54 $rrdgraph[] = sprintf('"LINE1:area_%s#%s:%s"', crc32hex($source), $this->validate_color($color), $this->rrd_escape($dsname));
55 $rrdgraph[] = sprintf('GPRINT:min_%s:MIN:\'%s Min,\'', crc32hex($source), $this->rrd_format); 55 $rrdgraph[] = sprintf('"GPRINT:min_%s:MIN:%s Min,"', crc32hex($source), $this->rrd_format);
56 $rrdgraph[] = sprintf('GPRINT:avg_%s:AVERAGE:\'%s Avg,\'', crc32hex($source), $this->rrd_format); 56 $rrdgraph[] = sprintf('"GPRINT:avg_%s:AVERAGE:%s Avg,"', crc32hex($source), $this->rrd_format);
57 $rrdgraph[] = sprintf('GPRINT:max_%s:MAX:\'%s Max,\'', crc32hex($source), $this->rrd_format); 57 $rrdgraph[] = sprintf('"GPRINT:max_%s:MAX:%s Max,"', crc32hex($source), $this->rrd_format);
58 $rrdgraph[] = sprintf('GPRINT:avg_%s:LAST:\'%s Last\\l\'', crc32hex($source), $this->rrd_format); 58 $rrdgraph[] = sprintf('"GPRINT:avg_%s:LAST:%s Last\\l"', crc32hex($source), $this->rrd_format);
59 } 59 }
60 60
61 return $rrdgraph; 61 return $rrdgraph;