This commit is contained in:
cesar991 2016-09-13 12:07:07 +02:00
commit 217c350f12
2 changed files with 13 additions and 0 deletions

View File

@ -751,6 +751,9 @@ if ($update_agent) { // if modified some agent paramenter
__('There was a problem updating the agent'));
}
else {
// Update the agent from the metaconsole cache
enterprise_include_once('include/functions_agents.php');
enterprise_hook ('agent_update_from_cache', array($id_agente, $values));
if ($old_interval != $intervalo) {
enterprise_hook('config_agents_update_config_interval', array($id_agente, $intervalo));

View File

@ -101,6 +101,11 @@ if ($enable_agent) {
$result = db_process_sql_update('tagente', array('disabled' => 0), array('id_agente' => $enable_agent));
if ($result) {
// Update the agent from the metaconsole cache
enterprise_include_once('include/functions_agents.php');
$values = array('disabled' => 0);
enterprise_hook ('agent_update_from_cache', array($enable_agent, $values));
db_pandora_audit("Agent management", 'Enable ' . $enable_agent);
}
else {
@ -115,6 +120,11 @@ if ($disable_agent) {
$result = db_process_sql_update('tagente', array('disabled' => 1), array('id_agente' => $disable_agent));
if ($result) {
// Update the agent from the metaconsole cache
enterprise_include_once('include/functions_agents.php');
$values = array('disabled' => 1);
enterprise_hook ('agent_update_from_cache', array($disable_agent, $values));
db_pandora_audit("Agent management", 'Disable ' . $disable_agent);
}
else {