aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--inc/collectd.inc.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/inc/collectd.inc.php b/inc/collectd.inc.php
index 3c8d48c..4e5d0e4 100644
--- a/inc/collectd.inc.php
+++ b/inc/collectd.inc.php
@@ -127,13 +127,16 @@ function graphs_from_plugin($host, $plugin) {
127 't' => $t, 127 't' => $t,
128 'ti' => $ti 128 'ti' => $ti
129 ); 129 );
130
131 $time = array_key_exists($plugin, $CONFIG['time_range'])
132 ? $CONFIG['time_range'][$plugin]
133 : 86400;
134
130 printf('<a href="%s/%s"><img src="%s/%s"></a>'."\n", 135 printf('<a href="%s/%s"><img src="%s/%s"></a>'."\n",
131 $CONFIG['weburl'], 136 $CONFIG['weburl'],
132 build_url('detail.php', $items), 137 build_url('detail.php', $items, $time),
133 $CONFIG['weburl'], 138 $CONFIG['weburl'],
134 (array_key_exists($plugin, $CONFIG['time_range']) ? 139 build_url('graph.php', $items, $time)
135 build_url('graph.php', $items, $CONFIG['time_range'][$plugin]) :
136 build_url('graph.php', $items) )
137 ); 140 );
138 } 141 }
139 } 142 }