mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Upload more files from previous commit.
This commit is contained in:
parent
3d46327f55
commit
f02abea556
@ -759,7 +759,9 @@ function agents_common_modules ($id_agent, $filter = false, $indexed = true, $ge
|
|||||||
*
|
*
|
||||||
* @return array An array with all agents in the group or an empty array
|
* @return array An array with all agents in the group or an empty array
|
||||||
*/
|
*/
|
||||||
function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower", $noACL = false, $childGroups = false) {
|
function agents_get_group_agents ($id_group = 0, $search = false,
|
||||||
|
$case = "lower", $noACL = false, $childGroups = false) {
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$filter = array();
|
$filter = array();
|
||||||
@ -773,6 +775,8 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($childGroups) {
|
if ($childGroups) {
|
||||||
if (is_array($id_group)) {
|
if (is_array($id_group)) {
|
||||||
foreach ($id_group as $parent) {
|
foreach ($id_group as $parent) {
|
||||||
@ -858,6 +862,11 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower
|
|||||||
if (defined('METACONSOLE') && isset($search['id_server'])) {
|
if (defined('METACONSOLE') && isset($search['id_server'])) {
|
||||||
$filter['id_tmetaconsole_setup'] = $search['id_server'];
|
$filter['id_tmetaconsole_setup'] = $search['id_server'];
|
||||||
|
|
||||||
|
if ($filter['id_tmetaconsole_setup'] == 0) {
|
||||||
|
// All nodes
|
||||||
|
unset ($filter['id_tmetaconsole_setup']);
|
||||||
|
}
|
||||||
|
|
||||||
unset ($search["id_server"]);
|
unset ($search["id_server"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -889,6 +898,8 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower
|
|||||||
|
|
||||||
$result = db_get_all_rows_filter($table_name, $filter, $fields);
|
$result = db_get_all_rows_filter($table_name, $filter, $fields);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($result === false)
|
if ($result === false)
|
||||||
return array (); //Return an empty array
|
return array (); //Return an empty array
|
||||||
|
|
||||||
@ -1139,8 +1150,10 @@ function agents_get_modules ($id_agent = null, $details = false,
|
|||||||
io_safe_output(implode (",", (array) $details)),
|
io_safe_output(implode (",", (array) $details)),
|
||||||
$where);
|
$where);
|
||||||
|
|
||||||
|
|
||||||
$result = db_get_all_rows_sql ($sql);
|
$result = db_get_all_rows_sql ($sql);
|
||||||
|
|
||||||
|
|
||||||
if (empty ($result)) {
|
if (empty ($result)) {
|
||||||
return array ();
|
return array ();
|
||||||
}
|
}
|
||||||
|
@ -1167,14 +1167,16 @@ function visual_map_process_wizard_add ($id_agents, $image, $id_layout, $range,
|
|||||||
*
|
*
|
||||||
* @return string Return the message status to insert DB.
|
* @return string Return the message status to insert DB.
|
||||||
*/
|
*/
|
||||||
function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout,
|
function visual_map_process_wizard_add_modules ($id_modules, $image,
|
||||||
$range, $width = 0, $height = 0, $period, $process_value, $percentileitem_width,
|
$id_layout, $range, $width = 0, $height = 0, $period,
|
||||||
$max_value, $type_percentile, $value_show, $label_type, $type, $enable_link = true,
|
$process_value, $percentileitem_width, $max_value, $type_percentile,
|
||||||
|
$value_show, $label_type, $type, $enable_link = true,
|
||||||
$id_server = 0, $kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
|
$id_server = 0, $kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
|
||||||
$item_in_the_map = 0) {
|
$item_in_the_map = 0) {
|
||||||
|
|
||||||
if (empty ($id_modules)) {
|
if (empty ($id_modules)) {
|
||||||
$return = ui_print_error_message (__('No modules selected'), '', true);
|
$return = ui_print_error_message(
|
||||||
|
__('No modules selected'), '', true);
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1190,6 +1192,7 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout,
|
|||||||
$pos_y = $pos_y + $range;
|
$pos_y = $pos_y + $range;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($id_server != 0) {
|
if ($id_server != 0) {
|
||||||
$connection = db_get_row_filter('tmetaconsole_setup',
|
$connection = db_get_row_filter('tmetaconsole_setup',
|
||||||
array('id' => $id_server));
|
array('id' => $id_server));
|
||||||
@ -1310,20 +1313,23 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout,
|
|||||||
*
|
*
|
||||||
* @return string Return the message status to insert DB.
|
* @return string Return the message status to insert DB.
|
||||||
*/
|
*/
|
||||||
function visual_map_process_wizard_add_agents ($id_agents, $image, $id_layout,
|
function visual_map_process_wizard_add_agents ($id_agents, $image,
|
||||||
$range, $width = 0, $height = 0, $period, $process_value, $percentileitem_width,
|
$id_layout, $range, $width = 0, $height = 0, $period,
|
||||||
$max_value, $type_percentile, $value_show, $label_type, $type, $enable_link = 1,
|
$process_value, $percentileitem_width, $max_value, $type_percentile,
|
||||||
$id_server = 0, $kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
|
$value_show, $label_type, $type, $enable_link = 1, $id_server = 0,
|
||||||
|
$kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
|
||||||
$item_in_the_map = 0) {
|
$item_in_the_map = 0) {
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if (empty ($id_agents)) {
|
if (empty ($id_agents)) {
|
||||||
$return = ui_print_error_message (__('No agents selected'), '', true);
|
$return = ui_print_error_message(
|
||||||
|
__('No agents selected'), '', true);
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$id_agents = (array) $id_agents;
|
$id_agents = (array)$id_agents;
|
||||||
|
|
||||||
$error = false;
|
$error = false;
|
||||||
$pos_y = 10;
|
$pos_y = 10;
|
||||||
@ -1339,7 +1345,14 @@ function visual_map_process_wizard_add_agents ($id_agents, $image, $id_layout,
|
|||||||
$relationship = false;
|
$relationship = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach ($id_agents as $id_agent) {
|
foreach ($id_agents as $id_agent) {
|
||||||
|
if (is_array($id_agent)) {
|
||||||
|
$id_a = $id_agent['id_agent'];
|
||||||
|
$id_server = $id_agent['id_server'];
|
||||||
|
$id_agent = $id_a;
|
||||||
|
}
|
||||||
|
|
||||||
if ($pos_x > 600) {
|
if ($pos_x > 600) {
|
||||||
$pos_x = 10;
|
$pos_x = 10;
|
||||||
$pos_y = $pos_y + $range;
|
$pos_y = $pos_y + $range;
|
||||||
@ -1383,6 +1396,7 @@ function visual_map_process_wizard_add_agents ($id_agents, $image, $id_layout,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($id_server != 0) {
|
if ($id_server != 0) {
|
||||||
|
|
||||||
$connection = db_get_row_filter('tmetaconsole_setup',
|
$connection = db_get_row_filter('tmetaconsole_setup',
|
||||||
array('id' => $id_server));
|
array('id' => $id_server));
|
||||||
if (metaconsole_load_external_db($connection) != NOERR) {
|
if (metaconsole_load_external_db($connection) != NOERR) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user