From 7daa367a4b1cafbdbc3e076f7a7f2aa34fb56e9e Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 6 Oct 2009 19:58:39 +0000 Subject: [PATCH] 2009-10-06 Miguel de Dios * godmode/reporting/reporting_builder.php: fix in part the bug #2870769, exactly the second and third paragraph. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2009 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ .../godmode/reporting/reporting_builder.php | 20 ++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 06f6bea2f0..8e39048519 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2009-10-06 Miguel de Dios + + * godmode/reporting/reporting_builder.php: fix in part the bug #2870769, + exactly the second and third paragraph. + 2009-10-06 Miguel de Dios * operation/agentes/estado_generalagente.php, diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index b14a414f61..c24a1c8b4e 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -456,12 +456,22 @@ if ($edit_sla_report_content) { } $data[1] = get_report_name ($report_content['type']); $data[2] = get_agent_name ($report_content['id_agent']); - $data[3] = '--'; - if (get_report_type_data_source ($report_content['type']) == 'module') { - if ($report_content['id_agent_module'] > 0) - $data[2] = strtolower (get_agentmodule_agent_name ($report_content['id_agent_module'])); - $data[3] = strtolower (get_db_value ('descripcion', 'tagente_modulo', 'id_agente_modulo', $report_content['id_agent_module'])); + + switch (get_report_type_data_source ($report_content['type'])) { + case 'module': + if ($report_content['id_agent_module'] > 0) + $data[2] = strtolower (get_agentmodule_agent_name ($report_content['id_agent_module'])); + $data[3] = '' . strtolower (get_db_value ('nombre', 'tagente_modulo', 'id_agente_modulo', $report_content['id_agent_module'])) . ""; + break; + case 'custom-graph': + $data[3] = $report_content['description']; + break; + default: + $data[3] = '--'; + break; } + $data[4] = human_time_description ($report_content['period']); $data[5] = ''; if ($report_content['type'] == 'SLA') {