Fixed the charts (boolean and sparse) added lost time interval. TICKET: #2511

(cherry picked from commit fab99a416e835a0824e0a67449d4c6bddf9e454f)

Conflicts:
	pandora_console/include/functions_graph.php
This commit is contained in:
mdtrooper 2015-08-24 17:08:39 +02:00
parent 016584832e
commit 56bf721446

View File

@ -251,9 +251,12 @@ function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_i
// Calculate chart data
$last_known = $previous_data;
for ($i = 0; $i < $resolution; $i++) {
for ($i = 0; $i <= $resolution; $i++) {
$timestamp = $datelimit + ($interval * $i);
$total = 0;
$count = 0;
@ -523,6 +526,7 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
$flash_chart = $config['flash_charts'];
// Get event data (contains alert data too)
$events = array();
if ($show_unknown == 1 || $show_events == 1 || $show_alerts == 1) {
@ -555,6 +559,7 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
'order' => 'utimestamp ASC'),
array ('datos', 'utimestamp'), 'AND', $search_in_history_db);
// Get module warning_min and critical_min
$warning_min = db_get_value('min_warning','tagente_modulo','id_agente_modulo',$agent_module_id);
$critical_min = db_get_value('min_critical','tagente_modulo','id_agente_modulo',$agent_module_id);
@ -625,7 +630,9 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
if ($baseline) {
$baseline_data = array ();
if ($baseline == 1) {
$baseline_data = enterprise_hook ('reporting_enterprise_get_baseline', array ($agent_module_id, $period, $width, $height , $title, $unit_name, $date));
$baseline_data = enterprise_hook(
'reporting_enterprise_get_baseline',
array ($agent_module_id, $period, $width, $height , $title, $unit_name, $date));
if ($baseline_data === ENTERPRISE_NOT_HOOK) {
$baseline_data = array ();
}
@ -3063,7 +3070,7 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
// Calculate chart data
$last_known = $previous_data;
for ($i = 0; $i < $resolution; $i++) {
for ($i = 0; $i <= $resolution; $i++) {
$timestamp = $datelimit + ($interval * $i);
$zero = 0;