From 5847755f8008b010e1df7ca9ad398ca9b006ff56 Mon Sep 17 00:00:00 2001 From: darode Date: Wed, 6 Mar 2013 17:37:49 +0000 Subject: [PATCH] 2013-03-06 Dario Rodriguez * operation/agentes/ver_agente.php: Adapted to new way to detect if an agent is a VMware entity. MERGED FROM 4.0.3 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7800 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/operation/agentes/ver_agente.php | 15 ++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 784b45d960..0483e24fa2 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-03-06 Dario Rodriguez + + * operation/agentes/ver_agente.php: Adapted to new way to detect + if an agent is a VMware entity. + + MERGED FROM 4.0.3 + 2013-03-06 Miguel de Dios * include/functions_io.php, include/db/mysql.php: fixed warnings diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index f014ba04d3..c7cc8a9e0f 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -857,18 +857,11 @@ foreach($config['extensions'] as $extension) { if ($extension['extension_ope_tab']['id'] === "vmware_manager") { //Check if OS is vmware - $id_os = db_get_value("id_os", "tconfig_os", "name", "VMware"); - if ($id_os != $agent['id_os']) { - continue; - } + $id_remote_field = db_get_value ("id_field", "tagent_custom_fields", "name", "vmware_type"); + + $vmware_type = db_get_value_filter("description", "tagent_custom_data", array("id_field" => $id_remote_field, "id_agent" => $agent["id_agente"])); - //This extension is only for virtual machines - $vmware_type_id = db_get_value("id_field", "tagent_custom_fields", "name", "vmware_type"); - $sql_type = "SELECT description FROM tagent_custom_data WHERE id_field = ".$vmware_type_id. - " AND id_agent = ".$agent['id_agente']; - $vmware_type= db_get_value_sql($sql_type); - - if ($vmware_type !== "vm") { + if ($vmware_type != "vm") { continue; }