2013-10-25 Miguel de Dios <miguel.dedios@artica.es>
* godmode/massive/massive_copy_modules.php, include/functions_modules.php: fixed the module massive copy from agent with remote configuration to agent without remote configuration and with a network module. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8957 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f30c711875
commit
6a0bc8087b
|
@ -1,3 +1,10 @@
|
|||
2013-10-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/massive/massive_copy_modules.php,
|
||||
include/functions_modules.php: fixed the module massive copy from
|
||||
agent with remote configuration to agent without remote
|
||||
configuration and with a network module.
|
||||
|
||||
2013-10-24 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* godmode/agentes/module_manager_editor_common.php: Store the
|
||||
|
|
|
@ -39,14 +39,16 @@ $destiny_recursion = get_parameter ('destiny_recursion');
|
|||
$do_operation = (bool) get_parameter ('do_operation');
|
||||
|
||||
if ($do_operation) {
|
||||
$result = agents_process_manage_config ($source_id_agent, $destiny_id_agents);
|
||||
|
||||
$result = agents_process_manage_config($source_id_agent,
|
||||
$destiny_id_agents);
|
||||
if ($result) {
|
||||
db_pandora_audit("Massive management", "Copy modules", false, false,
|
||||
db_pandora_audit("Massive management", "Copy modules", false,
|
||||
false,
|
||||
'Source agent: ' . json_encode($source_id_agent) . ' Destinity agent: ' . json_encode($destiny_id_agents));
|
||||
}
|
||||
else {
|
||||
db_pandora_audit("Massive management", "Fail to try copy modules", false, false,
|
||||
db_pandora_audit("Massive management",
|
||||
"Fail to try copy modules", false, false,
|
||||
'Source agent: ' . json_encode($source_id_agent) . ' Destinity agent: ' . json_encode($destiny_id_agents));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,7 +154,8 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent
|
|||
unset ($new_module['id_agente_modulo']);
|
||||
unset ($new_module['id_agente']);
|
||||
|
||||
$id_new_module = modules_create_agent_module($id_destiny_agent, $new_module['nombre'], $new_module);
|
||||
$id_new_module = modules_create_agent_module($id_destiny_agent,
|
||||
$new_module['nombre'], $new_module);
|
||||
|
||||
if ($id_new_module === false) {
|
||||
return false;
|
||||
|
@ -164,7 +165,8 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent
|
|||
|
||||
// If the module is synthetic we duplicate the operations too
|
||||
if ($module['id_modulo'] == 5) {
|
||||
$synth_ops = db_get_all_rows_field_filter('tmodule_synth','id_agent_module_target',$module['id_agente_modulo']);
|
||||
$synth_ops = db_get_all_rows_field_filter('tmodule_synth',
|
||||
'id_agent_module_target', $module['id_agente_modulo']);
|
||||
|
||||
if ($synth_ops === false) {
|
||||
$synth_ops = array();
|
||||
|
@ -200,13 +202,15 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent
|
|||
|
||||
$id_agente = modules_get_agentmodule_agent($id_agent_module);
|
||||
|
||||
if (enterprise_installed()) {
|
||||
if (config_agents_has_remote_configuration($id_agente)) {
|
||||
$result = enterprise_hook('config_agents_copy_agent_module_to_agent',
|
||||
array($id_agent_module, $id_new_module));
|
||||
|
||||
if ($result === false)
|
||||
return false;
|
||||
if ($module['id_modulo'] == MODULE_DATA) {
|
||||
if (enterprise_installed()) {
|
||||
if (config_agents_has_remote_configuration($id_agente)) {
|
||||
$result = enterprise_hook(
|
||||
'config_agents_copy_agent_module_to_agent',
|
||||
array($id_agent_module, $id_new_module));
|
||||
if ($result === false)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue