2012-02-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php: Fixed a bug in flash charts due to my last commit. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5478 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f99d1f1bd8
commit
56f789e4fa
|
@ -1,3 +1,8 @@
|
|||
2012-02-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_graph.php: Fixed a bug in flash charts due to
|
||||
my last commit.
|
||||
|
||||
2012-02-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_graph.php
|
||||
|
|
|
@ -51,6 +51,8 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
|||
$avg_only = 1;
|
||||
}
|
||||
|
||||
$flash_chart = $config['flash_charts'];
|
||||
|
||||
// Get event data (contains alert data too)
|
||||
if ($show_events == 1 || $show_alerts == 1) {
|
||||
$events = db_get_all_rows_filter ('tevento',
|
||||
|
@ -196,21 +198,41 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
|||
$k++;
|
||||
}
|
||||
|
||||
// Set the title and time format
|
||||
if ($period <= 21600) {
|
||||
$time_format = 'H:i:s';
|
||||
}
|
||||
elseif ($period < 86400) {
|
||||
$time_format = 'H:i';
|
||||
}
|
||||
elseif ($period < 1296000) {
|
||||
$time_format = "M \nd H:i";
|
||||
}
|
||||
elseif ($period < 2592000) {
|
||||
$time_format = "M \nd H\h";
|
||||
if (!$flash_chart) {
|
||||
// Set the title and time format
|
||||
if ($period <= 21600) {
|
||||
$time_format = 'H:i:s';
|
||||
}
|
||||
elseif ($period < 86400) {
|
||||
$time_format = 'H:i';
|
||||
}
|
||||
elseif ($period < 1296000) {
|
||||
$time_format = "M \nd H:i";
|
||||
}
|
||||
elseif ($period < 2592000) {
|
||||
$time_format = "M \nd H\h";
|
||||
}
|
||||
else {
|
||||
$time_format = "M \nd H\h";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$time_format = "M \nd H\h";
|
||||
// Set the title and time format
|
||||
if ($period <= 21600) {
|
||||
$time_format = 'H:i:s';
|
||||
}
|
||||
elseif ($period < 86400) {
|
||||
$time_format = 'H:i';
|
||||
}
|
||||
elseif ($period < 1296000) {
|
||||
$time_format = "M d H:i";
|
||||
}
|
||||
elseif ($period < 2592000) {
|
||||
$time_format = "M d H\h";
|
||||
}
|
||||
else {
|
||||
$time_format = "M d H\h";
|
||||
}
|
||||
}
|
||||
|
||||
$timestamp_short = date($time_format, $timestamp);
|
||||
|
@ -331,7 +353,6 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
|||
$legend['min'] = __('Min') . ' (' . format_for_graph($min_value) . ')';
|
||||
$legend['baseline'] = __('Baseline');
|
||||
|
||||
$flash_chart = $config['flash_charts'];
|
||||
if ($only_image) {
|
||||
$flash_chart = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue