From e4db34e1dd18c01d53d17ebef5eec40821366cee Mon Sep 17 00:00:00 2001 From: darode Date: Thu, 18 Aug 2011 17:01:27 +0000 Subject: [PATCH] 2011-08-18 Dario Rodriguez * operation/agentes/ver_agente.php: Added feature to show vmware manager extension tab only when the agent is a virtual machine. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4778 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ .../operation/agentes/ver_agente.php | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a51215543b..fc52f9699a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2011-08-18 Dario Rodriguez + + * operation/agentes/ver_agente.php: Added feature to show vmware manager + extension tab only when the agent is a virtual machine. + 2011-08-18 Miguel de Dios * godmode/agentes/module_manager_editor_network.php: disabled snmp community diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index e674293dbd..3d5325d9f5 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -596,6 +596,23 @@ $onheader = array('manage' => $managetab, 'separator' => "", 'main' => $maintab, foreach($config['extensions'] as $extension) { if (isset($extension['extension_ope_tab'])) { + + //VMware extension is only available for VMware OS + 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; + } + + //This extension is only for virtual machines + if (strpos($agent['nombre'], "VM_") !== 0) { + continue; + } + + } + $image = $extension['extension_ope_tab']['icon']; $name = $extension['extension_ope_tab']['name']; $id = $extension['extension_ope_tab']['id'];