mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
2013-03-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_modules.php: improved the style. * include/functions_reporting.php: fixed into the function "reporting_get_agentmodule_sla_array" when have one data of a module. Fixes: #3606811 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7789 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b31630b986
commit
7a1ff1e9c3
@ -1,3 +1,13 @@
|
||||
2013-03-05 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_modules.php: improved the style.
|
||||
|
||||
* include/functions_reporting.php: fixed into the function
|
||||
"reporting_get_agentmodule_sla_array" when have one data of a
|
||||
module.
|
||||
|
||||
Fixes: #3606811
|
||||
|
||||
2013-03-05 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* pandoradb_data.sql
|
||||
@ -9,6 +19,16 @@
|
||||
and Process inventory change types to black list in default
|
||||
SQL data script for bug 3606111
|
||||
|
||||
2013-03-05 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_modules.php: improved the style.
|
||||
|
||||
* include/functions_reporting.php: fixed into the function
|
||||
"reporting_get_agentmodule_sla_array" when have one data of a
|
||||
module.
|
||||
|
||||
Fixes: #3606811
|
||||
|
||||
2013-03-05 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* extensions/snmp_explorer.php: improved the code style.
|
||||
|
@ -667,6 +667,7 @@ function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $mi
|
||||
$interval_data = array ();
|
||||
}
|
||||
|
||||
|
||||
// Indexing data
|
||||
$interval_data_indexed = array();
|
||||
foreach($interval_data as $idata) {
|
||||
@ -726,13 +727,14 @@ function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $mi
|
||||
|
||||
// Get next data (This adds data before the interval of the report)
|
||||
$next_data = modules_get_next_data ($id_agent_module, $date);
|
||||
|
||||
if ($next_data !== false) {
|
||||
$interval_data_indexed[$date]['data'] = $previous_data['datos'];
|
||||
}
|
||||
else if (count ($interval_data_indexed) > 0) {
|
||||
// Propagate the last known data to the end of the interval (if there is no module data at the end point)
|
||||
ksort($interval_data_indexed);
|
||||
$last_data = array_pop($interval_data_indexed);
|
||||
$last_data = end($interval_data_indexed);
|
||||
$interval_data_indexed[$date] = $last_data;
|
||||
}
|
||||
|
||||
@ -3213,10 +3215,17 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
}
|
||||
|
||||
//Get the array of the sla values
|
||||
$data_sla = reporting_get_agentmodule_sla_array ($sla['id_agent_module'], $content['period'],
|
||||
$sla['sla_min'], $sla['sla_max'], $report['datetime'], $content, $content['time_from'],
|
||||
$data_sla = reporting_get_agentmodule_sla_array (
|
||||
$sla['id_agent_module'],
|
||||
$content['period'],
|
||||
$sla['sla_min'],
|
||||
$sla['sla_max'],
|
||||
$report['datetime'],
|
||||
$content,
|
||||
$content['time_from'],
|
||||
$content['time_to']);
|
||||
|
||||
|
||||
if ($data_sla == false) {
|
||||
$data_sla = array();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user