diff options
author | Pim van den Berg | 2010-06-22 20:39:26 +0200 |
---|---|---|
committer | Pim van den Berg | 2010-06-22 20:39:26 +0200 |
commit | f5ea7f0e3c07da7651f369f5dd51f95b529927d9 (patch) | |
tree | 156ce248b51cead7c023afd5875ee5acbc2ecc8d | |
parent | Default time range on the summary page is now configurable (diff) | |
download | apt-panopticon_cgp-f5ea7f0e3c07da7651f369f5dd51f95b529927d9.zip apt-panopticon_cgp-f5ea7f0e3c07da7651f369f5dd51f95b529927d9.tar.gz apt-panopticon_cgp-f5ea7f0e3c07da7651f369f5dd51f95b529927d9.tar.bz2 apt-panopticon_cgp-f5ea7f0e3c07da7651f369f5dd51f95b529927d9.tar.xz |
use the same time range for the link to the detail page
Diffstat (limited to '')
-rw-r--r-- | inc/collectd.inc.php | 11 |
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 | } |