From 9ff4ba195836df84e0d3d0a8ec588698b73dde73 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 3 Feb 2015 12:43:15 +0100 Subject: [PATCH] Fixed the graph for string module data. TICKET: #1749 --- pandora_console/include/functions_graph.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 1506d1c262..fdc6732de1 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -3609,11 +3609,18 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events, for ($i = 0; $i < $resolution; $i++) { $timestamp = $datelimit + ($interval * $i); - $count = 0; - $total = 0; + $count = 0; + $total = 0; // Read data that falls in the current interval - while (isset($data[$j]) && isset ($data[$j]) !== null && $data[$j]['utimestamp'] >= $timestamp && $data[$j]['utimestamp'] <= ($timestamp + $interval)) { - $last_known = $data[$j]; + while (isset($data[$j]) && + isset ($data[$j]) !== null && + $data[$j]['utimestamp'] >= $timestamp && + $data[$j]['utimestamp'] <= ($timestamp + $interval)) { + + // --------------------------------------------------------- + // FIX TICKET #1749 + $last_known = $count; + // --------------------------------------------------------- $count++; $j++; }