diff options
author | Pim van den Berg | 2013-05-18 16:05:43 +0200 |
---|---|---|
committer | Pim van den Berg | 2013-05-18 16:08:09 +0200 |
commit | 5793a8cd003643974206e44ea752ab0966cfa8c0 (patch) | |
tree | 387a6a327af9834f2986ad3316be2183949d897a /type/GenericIO.class.php | |
parent | jsrrdgraph: RrdGraph.js: fix undefined 2nd argument of RrdVdef function (diff) | |
download | apt-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/GenericIO.class.php')
-rw-r--r-- | type/GenericIO.class.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/type/GenericIO.class.php b/type/GenericIO.class.php index 42314fd..0cf3e22 100644 --- a/type/GenericIO.class.php +++ b/type/GenericIO.class.php | |||
@@ -15,9 +15,9 @@ class Type_GenericIO 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 | if (!$this->scale) | 21 | if (!$this->scale) |
22 | $rrdgraph[] = sprintf('VDEF:tot_%s=avg_%1$s,TOTAL', crc32hex($sources[$i])); | 22 | $rrdgraph[] = sprintf('VDEF:tot_%s=avg_%1$s,TOTAL', crc32hex($sources[$i])); |
23 | $i++; | 23 | $i++; |
@@ -52,12 +52,12 @@ class Type_GenericIO extends Type_Default { | |||
52 | 52 | ||
53 | foreach($sources as $source) { | 53 | foreach($sources as $source) { |
54 | $dsname = $this->ds_names[$source] != '' ? $this->ds_names[$source] : $source; | 54 | $dsname = $this->ds_names[$source] != '' ? $this->ds_names[$source] : $source; |
55 | $rrdgraph[] = sprintf('LINE1:avg_%s#%s:\'%s\'', crc32hex($source), $this->colors[$source], $this->rrd_escape($dsname)); | 55 | $rrdgraph[] = sprintf('"LINE1:avg_%s#%s:%s"', crc32hex($source), $this->colors[$source], $this->rrd_escape($dsname)); |
56 | $rrdgraph[] = sprintf('GPRINT:min_%s:MIN:\'%s Min,\'', crc32hex($source), $this->rrd_format); | 56 | $rrdgraph[] = sprintf('"GPRINT:min_%s:MIN:%s Min,"', crc32hex($source), $this->rrd_format); |
57 | $rrdgraph[] = sprintf('GPRINT:avg_%s:AVERAGE:\'%s Avg,\'', crc32hex($source), $this->rrd_format); | 57 | $rrdgraph[] = sprintf('"GPRINT:avg_%s:AVERAGE:%s Avg,"', crc32hex($source), $this->rrd_format); |
58 | $rrdgraph[] = sprintf('GPRINT:max_%s:MAX:\'%s Max,\'', crc32hex($source), $this->rrd_format); | 58 | $rrdgraph[] = sprintf('"GPRINT:max_%s:MAX:%s Max,"', crc32hex($source), $this->rrd_format); |
59 | $rrdgraph[] = sprintf('GPRINT:avg_%s:LAST:\'%s Last\'', crc32hex($source), $this->rrd_format); | 59 | $rrdgraph[] = sprintf('"GPRINT:avg_%s:LAST:%s Last"', crc32hex($source), $this->rrd_format); |
60 | $rrdgraph[] = sprintf('GPRINT:tot_%s:\'%s Total\l\'',crc32hex($source), $this->rrd_format); | 60 | $rrdgraph[] = sprintf('"GPRINT:tot_%s:%s Total\l"',crc32hex($source), $this->rrd_format); |
61 | } | 61 | } |
62 | 62 | ||
63 | return $rrdgraph; | 63 | return $rrdgraph; |