aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type/GenericStacked.class.php
diff options
context:
space:
mode:
authorPim van den Berg2010-03-01 20:28:17 +0100
committerPim van den Berg2010-03-01 20:31:30 +0100
commit0b1741c59352a1842f9f81e31b8a8dc5b94323b7 (patch)
tree5e61c3fdc37ef9e52d24a8f626fbdbd65b81f2c3 /type/GenericStacked.class.php
parentmake rrdfiles using utf8 and spaces work (diff)
downloadapt-panopticon_cgp-0b1741c59352a1842f9f81e31b8a8dc5b94323b7.zip
apt-panopticon_cgp-0b1741c59352a1842f9f81e31b8a8dc5b94323b7.tar.gz
apt-panopticon_cgp-0b1741c59352a1842f9f81e31b8a8dc5b94323b7.tar.bz2
apt-panopticon_cgp-0b1741c59352a1842f9f81e31b8a8dc5b94323b7.tar.xz
utf8 filename support for all types
Types GenenericIO and GenericStacked were not included in commit: 596dd7d414 [make rrdfiles using utf8 and spaces work]
Diffstat (limited to 'type/GenericStacked.class.php')
-rw-r--r--type/GenericStacked.class.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/type/GenericStacked.class.php b/type/GenericStacked.class.php
index 7595385..89e9f65 100644
--- a/type/GenericStacked.class.php
+++ b/type/GenericStacked.class.php
@@ -12,32 +12,32 @@ class Type_GenericStacked extends Type_Default {
12 $i=0; 12 $i=0;
13 foreach ($this->tinstances as $tinstance) { 13 foreach ($this->tinstances as $tinstance) {
14 foreach ($this->data_sources as $ds) { 14 foreach ($this->data_sources as $ds) {
15 $rrdgraph[] = sprintf('DEF:min_%s=%s:%s:MIN', $sources[$i], $this->files[$tinstance], $ds); 15 $rrdgraph[] = sprintf('DEF:min_%s=%s:%s:MIN', crc32hex($sources[$i]), $this->files[$tinstance], $ds);
16 $rrdgraph[] = sprintf('DEF:avg_%s=%s:%s:AVERAGE', $sources[$i], $this->files[$tinstance], $ds); 16 $rrdgraph[] = sprintf('DEF:avg_%s=%s:%s:AVERAGE', crc32hex($sources[$i]), $this->files[$tinstance], $ds);
17 $rrdgraph[] = sprintf('DEF:max_%s=%s:%s:MAX', $sources[$i], $this->files[$tinstance], $ds); 17 $rrdgraph[] = sprintf('DEF:max_%s=%s:%s:MAX', crc32hex($sources[$i]), $this->files[$tinstance], $ds);
18 $i++; 18 $i++;
19 } 19 }
20 } 20 }
21 21
22 for ($i=count($sources)-1 ; $i>=0 ; $i--) { 22 for ($i=count($sources)-1 ; $i>=0 ; $i--) {
23 if ($i == (count($sources)-1)) 23 if ($i == (count($sources)-1))
24 $rrdgraph[] = sprintf('CDEF:area_%s=avg_%1$s', $sources[$i]); 24 $rrdgraph[] = sprintf('CDEF:area_%s=avg_%1$s', crc32hex($sources[$i]));
25 else 25 else
26 $rrdgraph[] = sprintf('CDEF:area_%s=area_%s,avg_%1$s,+', $sources[$i], $sources[$i+1]); 26 $rrdgraph[] = sprintf('CDEF:area_%s=area_%s,avg_%1$s,+', crc32hex($sources[$i]), crc32hex($sources[$i+1]));
27 } 27 }
28 28
29 foreach ($sources as $source) { 29 foreach ($sources as $source) {
30 $color = $this->get_faded_color($this->colors[$source]); 30 $color = $this->get_faded_color($this->colors[$source]);
31 $rrdgraph[] = sprintf('AREA:area_%s#%s', $source, $color); 31 $rrdgraph[] = sprintf('AREA:area_%s#%s', crc32hex($source), $color);
32 } 32 }
33 33
34 foreach ($sources as $source) { 34 foreach ($sources as $source) {
35 $dsname = $this->ds_names[$source] != '' ? $this->ds_names[$source] : $source; 35 $dsname = $this->ds_names[$source] != '' ? $this->ds_names[$source] : $source;
36 $rrdgraph[] = sprintf('LINE1:area_%s#%s:\'%s\'', $source, $this->validate_color($this->colors[$source]), $dsname); 36 $rrdgraph[] = sprintf('LINE1:area_%s#%s:\'%s\'', crc32hex($source), $this->validate_color($this->colors[$source]), $dsname);
37 $rrdgraph[] = sprintf('GPRINT:min_%s:MIN:\'%s Min,\'', $source, $this->rrd_format); 37 $rrdgraph[] = sprintf('GPRINT:min_%s:MIN:\'%s Min,\'', crc32hex($source), $this->rrd_format);
38 $rrdgraph[] = sprintf('GPRINT:avg_%s:AVERAGE:\'%s Avg,\'', $source, $this->rrd_format); 38 $rrdgraph[] = sprintf('GPRINT:avg_%s:AVERAGE:\'%s Avg,\'', crc32hex($source), $this->rrd_format);
39 $rrdgraph[] = sprintf('GPRINT:max_%s:MAX:\'%s Max,\'', $source, $this->rrd_format); 39 $rrdgraph[] = sprintf('GPRINT:max_%s:MAX:\'%s Max,\'', crc32hex($source), $this->rrd_format);
40 $rrdgraph[] = sprintf('GPRINT:avg_%s:LAST:\'%s Last\\l\'', $source, $this->rrd_format); 40 $rrdgraph[] = sprintf('GPRINT:avg_%s:LAST:\'%s Last\\l\'', crc32hex($source), $this->rrd_format);
41 } 41 }
42 42
43 return $rrdgraph; 43 return $rrdgraph;