diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3d4fcfb59a..5ab73477a6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2009-10-14 Miguel de Dios + + * include/javascript/pandora_modules.js, + godmode/agentes/module_manager_editor.php: add the type as parse in the + module data in the local component, in the ajax (request in php and load + in js). + 2009-10-14 Miguel de Dios * operation/agentes/status_monitor.php: fix, show only monitor in unknow diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index b2c26456b8..7e3f58390a 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -14,6 +14,7 @@ // GNU General Public License for more details. require_once ('include/functions_network_components.php'); +require_once ($config['homedir'].'/'.ENTERPRISE_DIR.'/include/functions_local_components.php'); if (is_ajax ()) { $get_network_component = (bool) get_parameter ('get_network_component'); @@ -61,6 +62,10 @@ if (is_ajax ()) { $component = get_db_row ('tlocal_component', 'id', $id_component); + $typeName = parseLocalModuleExtractValue('module_type',$component['data']); + + $component['type'] = get_db_value_sql('SELECT id_tipo FROM ttipo_modulo WHERE nombre LIKE "' . $typeName . '"'); + echo json_encode ($component); return; } diff --git a/pandora_console/include/javascript/pandora_modules.js b/pandora_console/include/javascript/pandora_modules.js index 809b4c2d75..25fcf40780 100644 --- a/pandora_console/include/javascript/pandora_modules.js +++ b/pandora_console/include/javascript/pandora_modules.js @@ -74,7 +74,8 @@ function configure_modules_form () { $("#textarea_description").attr ("value", html_entity_decode (data["description"])); $("#textarea_configuration_data").attr ("value", configuration_data); $("#component_loading").hide (); - $("#id_module_type").change (); + + $("#id_module_type option[value="+data["type"]+"]").select (1); }, "json" );