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>
|
2013-03-05 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* pandoradb_data.sql
|
* pandoradb_data.sql
|
||||||
|
@ -9,6 +19,16 @@
|
||||||
and Process inventory change types to black list in default
|
and Process inventory change types to black list in default
|
||||||
SQL data script for bug 3606111
|
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>
|
2013-03-05 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* extensions/snmp_explorer.php: improved the code style.
|
* 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 ();
|
$interval_data = array ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Indexing data
|
// Indexing data
|
||||||
$interval_data_indexed = array();
|
$interval_data_indexed = array();
|
||||||
foreach($interval_data as $idata) {
|
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)
|
// Get next data (This adds data before the interval of the report)
|
||||||
$next_data = modules_get_next_data ($id_agent_module, $date);
|
$next_data = modules_get_next_data ($id_agent_module, $date);
|
||||||
|
|
||||||
if ($next_data !== false) {
|
if ($next_data !== false) {
|
||||||
$interval_data_indexed[$date]['data'] = $previous_data['datos'];
|
$interval_data_indexed[$date]['data'] = $previous_data['datos'];
|
||||||
}
|
}
|
||||||
else if (count ($interval_data_indexed) > 0) {
|
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)
|
// 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);
|
ksort($interval_data_indexed);
|
||||||
$last_data = array_pop($interval_data_indexed);
|
$last_data = end($interval_data_indexed);
|
||||||
$interval_data_indexed[$date] = $last_data;
|
$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
|
//Get the array of the sla values
|
||||||
$data_sla = reporting_get_agentmodule_sla_array ($sla['id_agent_module'], $content['period'],
|
$data_sla = reporting_get_agentmodule_sla_array (
|
||||||
$sla['sla_min'], $sla['sla_max'], $report['datetime'], $content, $content['time_from'],
|
$sla['id_agent_module'],
|
||||||
|
$content['period'],
|
||||||
|
$sla['sla_min'],
|
||||||
|
$sla['sla_max'],
|
||||||
|
$report['datetime'],
|
||||||
|
$content,
|
||||||
|
$content['time_from'],
|
||||||
$content['time_to']);
|
$content['time_to']);
|
||||||
|
|
||||||
|
|
||||||
if ($data_sla == false) {
|
if ($data_sla == false) {
|
||||||
$data_sla = array();
|
$data_sla = array();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue