From f5ea7f0e3c07da7651f369f5dd51f95b529927d9 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Tue, 22 Jun 2010 20:39:26 +0200 Subject: use the same time range for the link to the detail page --- inc/collectd.inc.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'inc/collectd.inc.php') 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) { 't' => $t, 'ti' => $ti ); + + $time = array_key_exists($plugin, $CONFIG['time_range']) + ? $CONFIG['time_range'][$plugin] + : 86400; + printf(''."\n", $CONFIG['weburl'], - build_url('detail.php', $items), + build_url('detail.php', $items, $time), $CONFIG['weburl'], - (array_key_exists($plugin, $CONFIG['time_range']) ? - build_url('graph.php', $items, $CONFIG['time_range'][$plugin]) : - build_url('graph.php', $items) ) + build_url('graph.php', $items, $time) ); } } -- cgit v1.1