diff options
-rw-r--r-- | conf/config.php | 10 | ||||
-rw-r--r-- | detail.php | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/conf/config.php b/conf/config.php index 1862044..b2fdc78 100644 --- a/conf/config.php +++ b/conf/config.php | |||
@@ -25,6 +25,16 @@ $CONFIG['time_range']['uptime'] = 31536000; | |||
25 | # show load averages on overview page | 25 | # show load averages on overview page |
26 | $CONFIG['showload'] = true; | 26 | $CONFIG['showload'] = true; |
27 | 27 | ||
28 | $CONFIG['term'] = array( | ||
29 | '2hour' => 3600 * 2, | ||
30 | '8hour' => 3600 * 8, | ||
31 | 'day' => 86400, | ||
32 | 'week' => 86400 * 7, | ||
33 | 'month' => 86400 * 31, | ||
34 | 'quarter'=> 86400 * 31 * 3, | ||
35 | 'year' => 86400 * 365, | ||
36 | ); | ||
37 | |||
28 | # show graphs in bits or bytes | 38 | # show graphs in bits or bytes |
29 | $CONFIG['network_datasize'] = 'bytes'; | 39 | $CONFIG['network_datasize'] = 'bytes'; |
30 | 40 | ||
@@ -39,19 +39,9 @@ plugins_list($host, $selected_plugins); | |||
39 | echo '<div class="graphs">'; | 39 | echo '<div class="graphs">'; |
40 | plugin_header($host, $plugin); | 40 | plugin_header($host, $plugin); |
41 | 41 | ||
42 | $term = array( | ||
43 | '2hour' => 3600*2, | ||
44 | '8hour' => 3600*8, | ||
45 | 'day' => 86400, | ||
46 | 'week' => 86400*7, | ||
47 | 'month' => 86400*31, | ||
48 | 'quarter'=> 86400*31*3, | ||
49 | 'year' => 86400*365, | ||
50 | ); | ||
51 | |||
52 | $args = $_GET; | 42 | $args = $_GET; |
53 | print '<ul class="time-range">' . "\n"; | 43 | print '<ul class="time-range">' . "\n"; |
54 | foreach($term as $key => $s) { | 44 | foreach($CONFIG['term'] as $key => $s) { |
55 | $args['s'] = $s; | 45 | $args['s'] = $s; |
56 | $selected = selected_timerange($seconds, $s); | 46 | $selected = selected_timerange($seconds, $s); |
57 | printf('<li><a %s href="%s%s">%s</a></li>'."\n", | 47 | printf('<li><a %s href="%s%s">%s</a></li>'."\n", |