aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/collectd.inc.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 /inc/collectd.inc.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 'inc/collectd.inc.php')
-rw-r--r--inc/collectd.inc.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/inc/collectd.inc.php b/inc/collectd.inc.php
index ad15774..1df8bb0 100644
--- a/inc/collectd.inc.php
+++ b/inc/collectd.inc.php
@@ -169,12 +169,21 @@ function graphs_from_plugin($host, $plugin, $overview=false) {
169 ? $CONFIG['time_range'][$plugin] 169 ? $CONFIG['time_range'][$plugin]
170 : $CONFIG['time_range']['default']; 170 : $CONFIG['time_range']['default'];
171 171
172 printf('<a href="%s%s"><img src="%s%s"></a>'."\n", 172 if ($CONFIG['graph_type'] == 'canvas') {
173 $CONFIG['weburl'], 173 chdir($CONFIG['webdir']);
174 build_url('detail.php', $items, $time), 174 isset($items['p']) ? $_GET['p'] = $items['p'] : $_GET['p'] = '';
175 $CONFIG['weburl'], 175 isset($items['pi']) ? $_GET['pi'] = $items['pi'] : $_GET['pi'] = '';
176 build_url('graph.php', $items, $time) 176 isset($items['t']) ? $_GET['t'] = $items['t'] : $_GET['t'] = '';
177 ); 177 isset($items['ti']) ? $_GET['ti'] = $items['ti'] : $_GET['ti'] = '';
178 include $CONFIG['webdir'].'/plugin/'.$plugin.'.php';
179 } else {
180 printf('<a href="%s%s"><img src="%s%s"></a>'."\n",
181 $CONFIG['weburl'],
182 build_url('detail.php', $items, $time),
183 $CONFIG['weburl'],
184 build_url('graph.php', $items, $time)
185 );
186 }
178 } 187 }
179} 188}
180 189