2011-09-26 Dario Rodriguez <dario.rodriguez@artica.es>

* include/functions_graph.php: Fixed a problem with graphs which
	shows only a few points instead of all of them.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5004 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2011-09-26 11:51:55 +00:00
parent 8cea9bdb25
commit 556e9e2246
2 changed files with 14 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2011-09-26 Dario Rodriguez <dario.rodriguez@artica.es>
* include/functions_graph.php: Fixed a problem with graphs which
shows only a few points instead of all of them.
2011-09-26 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* install.php: Fixed height style attribute in step 3.

View File

@ -189,25 +189,25 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
}
// Set the title and time format
if ($period <= 3600) {
if ($period <= 21600) {
$title_period = __('Last hour');
$time_format = 'G:i:s';
$time_format = 'H:i:s';
}
elseif ($period <= 86400) {
elseif ($period < 86400) {
$title_period = __('Last day');
$time_format = 'G:i';
$time_format = 'H:i';
}
elseif ($period <= 604800) {
elseif ($period < 1296000) {
$title_period = __('Last week');
$time_format = 'M j';
$time_format = 'M d H:i';
}
elseif ($period <= 2419200) {
elseif ($period < 2592000) {
$title_period = __('Last month');
$time_format = 'M j';
$time_format = 'M d H\h';
}
else {
$title_period = __('Last %s days', format_numeric (($period / (3600 * 24)), 2));
$time_format = 'M j';
$time_format = 'M d H\h';
}
$timestamp_short = date($time_format, $timestamp);