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; }