From adcd7716a4388b2a7623c07adffad1d4e14727b6 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 12 Nov 2012 14:53:33 +0000 Subject: [PATCH] 2012-11-12 Miguel de Dios * include/functions_reporting.php: cleaned source code style. * include/functions_api.php: fixed typo error that stoped the execution of api. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7142 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/include/functions_api.php | 2 +- pandora_console/include/functions_reporting.php | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a39650af67..2e656a0d62 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2012-11-12 Miguel de Dios + + * include/functions_reporting.php: cleaned source code style. + + * include/functions_api.php: fixed typo error that stoped the + execution of api. + 2012-11-11 Junichi Satoh * extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: Fixed a typo. diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 7cc24baa2b..a57b11c2fb 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -1943,7 +1943,7 @@ function api_set_new_snmp_component($id, $thrash1, $other, $thrash2) { 'plugin_user' => '', 'plugin_pass' => '', 'tcp_port' => $other['data'][21], - 'id_modulo' => 2 + 'id_modulo' => 2, 'max_retries' => $other['data'][22], ); } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 3c78195c70..b6f5f337c2 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -751,7 +751,7 @@ function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $mi $id_downtime = $downtime['id_downtime']; $sql_date = "SELECT date_from, date_to FROM tplanned_downtime WHERE id=$id_downtime"; $date_downtime = db_get_row_sql($sql_date); - + if ($date_downtime != false) { // Delete data of the planned downtime and put the last data on the upper limit $interval_data_indexed[$date_downtime['date_from']]['data'] = 0; @@ -804,7 +804,7 @@ function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $mi //Set initial conditions $first_data = array_shift ($interval_data); $previous_utimestamp = $date - $period; - + $previous_value = $first_data ['datos']; $previous_status = 0; @@ -2643,7 +2643,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f $dataslice[0] = modules_get_agentmodule_agent_name ($sla['id_agent_module']); $dataslice[0] .= "
"; $dataslice[0] .= modules_get_agentmodule_name ($sla['id_agent_module']); - + $dataslice[1] = graph_sla_slicebar ($sla['id_agent_module'], $content['period'], $sla['sla_min'], $sla['sla_max'], $report['datetime'], $content, $content['time_from'], $content['time_to'], 650, 25, ui_get_full_url(false) . '/', 1, $sla_data_arrays[$k]);