Fixed creation objects when select 'Any' module of agents. Tqiuet: #3062

This commit is contained in:
m-lopez-f 2015-12-14 14:59:50 +01:00
parent 6aaaaeb8f9
commit 994c99c1a8

View File

@ -496,30 +496,9 @@ switch ($activeTab) {
//Any module //Any module
if ($name_modules[0] == '0') { if ($name_modules[0] == '0') {
$id_modules = array();
$message .= visual_map_process_wizard_add_agents(
if ($id_server != 0) { $id_agents,
if (metaconsole_connect(null, $id_server) != NOERR) {
continue;
}
}
foreach ($id_agents as $id_agent) {
$id_modulo = agents_get_modules($id_agent, array('id_agente_modulo'));
if (empty($id_modulo)) $id_modulo = array();
foreach ($id_modulo as $id) {
$id_modules[] = $id['id_agente_modulo'];
}
}
if ($id_server != 0) {
metaconsole_restore_db();
}
$message .= visual_map_process_wizard_add_modules(
$id_modules,
$image, $image,
$idVisualConsole, $idVisualConsole,
$range, $range,
@ -531,7 +510,7 @@ switch ($activeTab) {
$max_value, $max_value,
$type_percentile, $type_percentile,
$value_show, $value_show,
$label_type, 'agent',
$type, $type,
$enable_link, $enable_link,
$id_server, $id_server,