aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type/GenericIO.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/GenericIO.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/GenericIO.class.php')
-rw-r--r--type/GenericIO.class.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/type/GenericIO.class.php b/type/GenericIO.class.php
index ee04316..944c82e 100644
--- a/type/GenericIO.class.php
+++ b/type/GenericIO.class.php
@@ -14,9 +14,9 @@ class Type_GenericIO extends Type_Default {
14 $i=0; 14 $i=0;
15 foreach ($this->tinstances as $tinstance) { 15 foreach ($this->tinstances as $tinstance) {
16 foreach ($this->data_sources as $ds) { 16 foreach ($this->data_sources as $ds) {
17 $rrdgraph[] = sprintf('DEF:min_%s%s=%s:%s:MIN', $sources[$i], $raw, $this->files[$tinstance], $ds); 17 $rrdgraph[] = sprintf('DEF:min_%s%s=%s:%s:MIN', crc32hex($sources[$i]), $raw, $this->files[$tinstance], $ds);
18 $rrdgraph[] = sprintf('DEF:avg_%s%s=%s:%s:AVERAGE', $sources[$i], $raw, $this->files[$tinstance], $ds); 18 $rrdgraph[] = sprintf('DEF:avg_%s%s=%s:%s:AVERAGE', crc32hex($sources[$i]), $raw, $this->files[$tinstance], $ds);
19 $rrdgraph[] = sprintf('DEF:max_%s%s=%s:%s:MAX', $sources[$i], $raw, $this->files[$tinstance], $ds); 19 $rrdgraph[] = sprintf('DEF:max_%s%s=%s:%s:MAX', crc32hex($sources[$i]), $raw, $this->files[$tinstance], $ds);
20 $i++; 20 $i++;
21 } 21 }
22 } 22 }
@@ -24,19 +24,19 @@ class Type_GenericIO extends Type_Default {
24 $i=0; 24 $i=0;
25 foreach ($this->tinstances as $tinstance) { 25 foreach ($this->tinstances as $tinstance) {
26 foreach ($this->data_sources as $ds) { 26 foreach ($this->data_sources as $ds) {
27 $rrdgraph[] = sprintf('CDEF:min_%s=min_%1$s_raw,%s,*', $sources[$i], $this->scale); 27 $rrdgraph[] = sprintf('CDEF:min_%s=min_%1$s_raw,%s,*', crc32hex($sources[$i]), $this->scale);
28 $rrdgraph[] = sprintf('CDEF:avg_%s=avg_%1$s_raw,%s,*', $sources[$i], $this->scale); 28 $rrdgraph[] = sprintf('CDEF:avg_%s=avg_%1$s_raw,%s,*', crc32hex($sources[$i]), $this->scale);
29 $rrdgraph[] = sprintf('CDEF:max_%s=max_%1$s_raw,%s,*', $sources[$i], $this->scale); 29 $rrdgraph[] = sprintf('CDEF:max_%s=max_%1$s_raw,%s,*', crc32hex($sources[$i]), $this->scale);
30 $i++; 30 $i++;
31 } 31 }
32 } 32 }
33 } 33 }
34 34
35 $rrdgraph[] = sprintf('CDEF:overlap=avg_%s,avg_%s,LT,avg_%1$s,avg_%2$s,IF', 35 $rrdgraph[] = sprintf('CDEF:overlap=avg_%s,avg_%s,LT,avg_%1$s,avg_%2$s,IF',
36 $sources[0], $sources[1]); 36 crc32hex($sources[0]), crc32hex($sources[1]));
37 37
38 foreach($sources as $source) { 38 foreach($sources as $source) {
39 $rrdgraph[] = sprintf('AREA:avg_%s#%s', $source, $this->get_faded_color($this->colors[$source])); 39 $rrdgraph[] = sprintf('AREA:avg_%s#%s', crc32hex($source), $this->get_faded_color($this->colors[$source]));
40 } 40 }
41 41
42 $rrdgraph[] = sprintf('AREA:overlap#%s', 42 $rrdgraph[] = sprintf('AREA:overlap#%s',
@@ -48,11 +48,11 @@ class Type_GenericIO extends Type_Default {
48 48
49 foreach($sources as $source) { 49 foreach($sources as $source) {
50 $dsname = $this->ds_names[$source] != '' ? $this->ds_names[$source] : $source; 50 $dsname = $this->ds_names[$source] != '' ? $this->ds_names[$source] : $source;
51 $rrdgraph[] = sprintf('LINE1:avg_%s#%s:\'%s\'', $source, $this->colors[$source], $dsname); 51 $rrdgraph[] = sprintf('LINE1:avg_%s#%s:\'%s\'', crc32hex($source), $this->colors[$source], $dsname);
52 $rrdgraph[] = sprintf('GPRINT:min_%s:MIN:\'%s Min,\'', $source, $this->rrd_format); 52 $rrdgraph[] = sprintf('GPRINT:min_%s:MIN:\'%s Min,\'', crc32hex($source), $this->rrd_format);
53 $rrdgraph[] = sprintf('GPRINT:avg_%s:AVERAGE:\'%s Avg,\'', $source, $this->rrd_format); 53 $rrdgraph[] = sprintf('GPRINT:avg_%s:AVERAGE:\'%s Avg,\'', crc32hex($source), $this->rrd_format);
54 $rrdgraph[] = sprintf('GPRINT:max_%s:MAX:\'%s Max,\'', $source, $this->rrd_format); 54 $rrdgraph[] = sprintf('GPRINT:max_%s:MAX:\'%s Max,\'', crc32hex($source), $this->rrd_format);
55 $rrdgraph[] = sprintf('GPRINT:avg_%s:LAST:\'%s Last\l\'', $source, $this->rrd_format); 55 $rrdgraph[] = sprintf('GPRINT:avg_%s:LAST:\'%s Last\l\'', crc32hex($source), $this->rrd_format);
56 } 56 }
57 57
58 return $rrdgraph; 58 return $rrdgraph;