diff options
Diffstat (limited to 'inc/collectd.inc.php')
-rw-r--r-- | inc/collectd.inc.php | 21 |
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 | ||