Fixed the graph for string module data. TICKET: #1749

(cherry picked from commit 5d14e8802d)
This commit is contained in:
mdtrooper 2015-02-03 12:43:15 +01:00
parent 54c906b4a8
commit 060dd23561
1 changed files with 11 additions and 4 deletions

View File

@ -3607,11 +3607,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++;
}