mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Fixed visualconsole status modules and agents in metaconsole
This commit is contained in:
parent
18e047d25e
commit
2a9a7b931a
@ -3684,7 +3684,8 @@ function visual_map_get_layout_status ($id_layout = 0, $depth = 0, $elements_in_
|
|||||||
'id_layout_linked_weight',
|
'id_layout_linked_weight',
|
||||||
'id',
|
'id',
|
||||||
'id_layout',
|
'id_layout',
|
||||||
'element_group'));
|
'element_group',
|
||||||
|
'id_metaconsole'));
|
||||||
if ($result === false)
|
if ($result === false)
|
||||||
return VISUAL_MAP_STATUS_NORMAL;
|
return VISUAL_MAP_STATUS_NORMAL;
|
||||||
|
|
||||||
@ -3781,10 +3782,24 @@ function visual_map_get_layout_status ($id_layout = 0, $depth = 0, $elements_in_
|
|||||||
}
|
}
|
||||||
// Module
|
// Module
|
||||||
elseif ($data["id_agente_modulo"] != 0) {
|
elseif ($data["id_agente_modulo"] != 0) {
|
||||||
|
//Metaconsole db connection
|
||||||
|
if ($data['id_metaconsole'] != 0) {
|
||||||
|
$connection = db_get_row_filter ('tmetaconsole_setup',
|
||||||
|
array('id' => $data['id_metaconsole']));
|
||||||
|
if (metaconsole_load_external_db($connection) != NOERR) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$status = modules_get_agentmodule_status($data["id_agente_modulo"]);
|
$status = modules_get_agentmodule_status($data["id_agente_modulo"]);
|
||||||
if ($status == 4){
|
if ($status == 4){
|
||||||
$status = 3;
|
$status = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Restore db connection
|
||||||
|
if ($data['id_metaconsole'] != 0) {
|
||||||
|
metaconsole_restore_db();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Agent
|
// Agent
|
||||||
else {
|
else {
|
||||||
@ -3792,8 +3807,20 @@ function visual_map_get_layout_status ($id_layout = 0, $depth = 0, $elements_in_
|
|||||||
// ADDED NO CHECK ACL FOR AVOID CHECK TAGS THAT
|
// ADDED NO CHECK ACL FOR AVOID CHECK TAGS THAT
|
||||||
// MAKE VERY SLOW THE VISUALMAPS WITH ACL TAGS
|
// MAKE VERY SLOW THE VISUALMAPS WITH ACL TAGS
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
//Metaconsole db connection
|
||||||
|
if ($data['id_metaconsole'] != 0) {
|
||||||
|
$connection = db_get_row_filter ('tmetaconsole_setup',
|
||||||
|
array('id' => $data['id_metaconsole']));
|
||||||
|
if (metaconsole_load_external_db($connection) != NOERR) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
$status = agents_get_status($data["id_agent"], true);
|
$status = agents_get_status($data["id_agent"], true);
|
||||||
|
|
||||||
|
//Restore db connection
|
||||||
|
if ($data['id_metaconsole'] != 0) {
|
||||||
|
metaconsole_restore_db();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user