mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 00:34:46 +02:00
[Tags performance] Added TODOS to revise agents_get_modules
This commit is contained in:
parent
995bfe0fad
commit
28b879f058
@ -285,6 +285,7 @@ function mainAgentsModules() {
|
|||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
foreach ($agents as $agent) {
|
foreach ($agents as $agent) {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$module = agents_get_modules($agent, false,
|
$module = agents_get_modules($agent, false,
|
||||||
$filter_module_group, true, true);
|
$filter_module_group, true, true);
|
||||||
if ($module == false) {
|
if ($module == false) {
|
||||||
@ -327,6 +328,7 @@ function mainAgentsModules() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$all_modules = agents_get_modules($agents, false,
|
$all_modules = agents_get_modules($agents, false,
|
||||||
$filter_module_group, true, true);
|
$filter_module_group, true, true);
|
||||||
}
|
}
|
||||||
@ -487,6 +489,7 @@ function mainAgentsModules() {
|
|||||||
<a class='$rowcolor' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>" .
|
<a class='$rowcolor' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>" .
|
||||||
$alias['alias'] .
|
$alias['alias'] .
|
||||||
"</a></td>";
|
"</a></td>";
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$agent_modules = agents_get_modules($agent['id_agente'], false, $filter_module_group, true, true);
|
$agent_modules = agents_get_modules($agent['id_agente'], false, $filter_module_group, true, true);
|
||||||
|
|
||||||
$nmodules = 0;
|
$nmodules = 0;
|
||||||
|
@ -174,6 +174,7 @@ function mainInsertData() {
|
|||||||
$table->data[1][0] = __('Module');
|
$table->data[1][0] = __('Module');
|
||||||
$modules = array ();
|
$modules = array ();
|
||||||
if ($agent_id){
|
if ($agent_id){
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules ($agent_id, false, array("delete_pending" => 0));
|
$modules = agents_get_modules ($agent_id, false, array("delete_pending" => 0));
|
||||||
}
|
}
|
||||||
$table->data[1][1] = html_print_select ($modules, 'id_agent_module', $id_agent_module, true,
|
$table->data[1][1] = html_print_select ($modules, 'id_agent_module', $id_agent_module, true,
|
||||||
|
@ -612,7 +612,7 @@ echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic
|
|||||||
|
|
||||||
$server_name = db_get_value_sql("SELECT name FROM tserver WHERE master = 1");
|
$server_name = db_get_value_sql("SELECT name FROM tserver WHERE master = 1");
|
||||||
$agent_id= db_get_value_sql ("SELECT id_agente FROM tagente WHERE nombre = '$server_name'");
|
$agent_id= db_get_value_sql ("SELECT id_agente FROM tagente WHERE nombre = '$server_name'");
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$id_modules = agents_get_modules($agent_id);
|
$id_modules = agents_get_modules($agent_id);
|
||||||
|
|
||||||
$id_modules = array (
|
$id_modules = array (
|
||||||
|
@ -70,6 +70,7 @@ if (! $id_agente) {
|
|||||||
|
|
||||||
$table->data[0][0] = __('Module');
|
$table->data[0][0] = __('Module');
|
||||||
$modules = array ();
|
$modules = array ();
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
if ($id_agente)
|
if ($id_agente)
|
||||||
$modules = agents_get_modules ($id_agente, false, array("delete_pending" => 0));
|
$modules = agents_get_modules ($id_agente, false, array("delete_pending" => 0));
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ function process_manage_add ($id_agents, $modules, $id_tags) {
|
|||||||
|
|
||||||
if (count($modules) == 1 && $modules[0] == '0') {
|
if (count($modules) == 1 && $modules[0] == '0') {
|
||||||
foreach ($id_agents as $id_agent) {
|
foreach ($id_agents as $id_agent) {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules_temp = agents_get_modules($id_agent);
|
$modules_temp = agents_get_modules($id_agent);
|
||||||
foreach ($modules_temp as $id_module => $name_module) {
|
foreach ($modules_temp as $id_module => $name_module) {
|
||||||
$modules_id[] = $id_module;
|
$modules_id[] = $id_module;
|
||||||
|
@ -120,6 +120,7 @@ $table->class = 'databox filters';
|
|||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
|
|
||||||
$modules = array ();
|
$modules = array ();
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
if ($source_id_agent)
|
if ($source_id_agent)
|
||||||
$modules = agents_get_modules ($source_id_agent, 'nombre');
|
$modules = agents_get_modules ($source_id_agent, 'nombre');
|
||||||
|
|
||||||
|
@ -120,6 +120,7 @@ function process_manage_delete ($id_alert_template, $id_agents, $module_names) {
|
|||||||
$modules_id = array();
|
$modules_id = array();
|
||||||
|
|
||||||
foreach ($id_agents as $id_agent) {
|
foreach ($id_agents as $id_agent) {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$current_modules_agent = agents_get_modules($id_agent, 'id_agente_modulo', array ('disabled' => 0));
|
$current_modules_agent = agents_get_modules($id_agent, 'id_agente_modulo', array ('disabled' => 0));
|
||||||
if ($current_modules_agent != false) {
|
if ($current_modules_agent != false) {
|
||||||
// And their modules
|
// And their modules
|
||||||
|
@ -137,6 +137,7 @@ function process_manage_delete ($module_name, $id_agents, $module_status = 'all'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules ($id_agents, 'id_agente_modulo',
|
$modules = agents_get_modules ($id_agents, 'id_agente_modulo',
|
||||||
$filter_for_module_deletion, true);
|
$filter_for_module_deletion, true);
|
||||||
}
|
}
|
||||||
@ -212,6 +213,7 @@ function process_manage_delete ($module_name, $id_agents, $module_status = 'all'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules ($id_agents, 'id_agente_modulo',
|
$modules = agents_get_modules ($id_agents, 'id_agente_modulo',
|
||||||
sprintf('nombre IN ("%s")', implode('","',$module_name)), true);
|
sprintf('nombre IN ("%s")', implode('","',$module_name)), true);
|
||||||
}
|
}
|
||||||
@ -439,7 +441,7 @@ if ($module_type != '') {
|
|||||||
else {
|
else {
|
||||||
$filter = false;
|
$filter = false;
|
||||||
}
|
}
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$names = agents_get_modules (array_keys ($agents),
|
$names = agents_get_modules (array_keys ($agents),
|
||||||
'DISTINCT(nombre)', $filter, false);
|
'DISTINCT(nombre)', $filter, false);
|
||||||
foreach ($names as $name) {
|
foreach ($names as $name) {
|
||||||
|
@ -276,7 +276,7 @@ if ($module_type != '') {
|
|||||||
else {
|
else {
|
||||||
$filter = false;
|
$filter = false;
|
||||||
}
|
}
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$names = agents_get_modules (array_keys ($agents),
|
$names = agents_get_modules (array_keys ($agents),
|
||||||
'DISTINCT(nombre)', $filter, false);
|
'DISTINCT(nombre)', $filter, false);
|
||||||
foreach ($names as $name) {
|
foreach ($names as $name) {
|
||||||
|
@ -416,6 +416,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
}
|
}
|
||||||
if ($cell_content_enterprise === false) {
|
if ($cell_content_enterprise === false) {
|
||||||
if (!defined('METACONSOLE')) {
|
if (!defined('METACONSOLE')) {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules($layoutData['id_agent']);
|
$modules = agents_get_modules($layoutData['id_agent']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -560,7 +560,7 @@ switch ($activeTab) {
|
|||||||
foreach ($name_modules as $mod) {
|
foreach ($name_modules as $mod) {
|
||||||
|
|
||||||
foreach ($id_agents as $ag) {
|
foreach ($id_agents as $ag) {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$id_module = agents_get_modules($ag,
|
$id_module = agents_get_modules($ag,
|
||||||
array('id_agente_modulo'),
|
array('id_agente_modulo'),
|
||||||
array('nombre' => $mod));
|
array('nombre' => $mod));
|
||||||
|
@ -960,6 +960,7 @@ switch ($action) {
|
|||||||
//Make the html of select box of modules about id_agent.
|
//Make the html of select box of modules about id_agent.
|
||||||
if (($elementFields['id_agent'] != 0)
|
if (($elementFields['id_agent'] != 0)
|
||||||
&&($elementFields['id_layout_linked'] == 0)) {
|
&&($elementFields['id_layout_linked'] == 0)) {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules(
|
$modules = agents_get_modules(
|
||||||
$elementFields['id_agent'], false,
|
$elementFields['id_agent'], false,
|
||||||
array('disabled' => 0,
|
array('disabled' => 0,
|
||||||
@ -1022,6 +1023,7 @@ switch ($action) {
|
|||||||
$elementFields['id_agent_string'] = $elementFields['id_agent'];
|
$elementFields['id_agent_string'] = $elementFields['id_agent'];
|
||||||
if (($elementFields['id_agent_string'] != 0)
|
if (($elementFields['id_agent_string'] != 0)
|
||||||
&& ($elementFields['id_layout_linked'] == 0)) {
|
&& ($elementFields['id_layout_linked'] == 0)) {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules(
|
$modules = agents_get_modules(
|
||||||
$elementFields['id_agent'], false,
|
$elementFields['id_agent'], false,
|
||||||
array('disabled' => 0,
|
array('disabled' => 0,
|
||||||
@ -1050,6 +1052,7 @@ switch ($action) {
|
|||||||
$elementFields['id_agent_string'] = $elementFields['id_agent'];
|
$elementFields['id_agent_string'] = $elementFields['id_agent'];
|
||||||
if (($elementFields['id_agent_string'] != 0)
|
if (($elementFields['id_agent_string'] != 0)
|
||||||
&& ($elementFields['id_layout_linked'] == 0)) {
|
&& ($elementFields['id_layout_linked'] == 0)) {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules(
|
$modules = agents_get_modules(
|
||||||
$elementFields['id_agent'], false,
|
$elementFields['id_agent'], false,
|
||||||
array('disabled' => 0,
|
array('disabled' => 0,
|
||||||
|
@ -205,6 +205,7 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$id_agent = (array) $id_agent;
|
$id_agent = (array) $id_agent;
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$id_modules = array_keys (agents_get_modules ($id_agent, false, array('delete_pending' => 0)));
|
$id_modules = array_keys (agents_get_modules ($id_agent, false, array('delete_pending' => 0)));
|
||||||
|
|
||||||
if (empty ($id_modules))
|
if (empty ($id_modules))
|
||||||
@ -592,7 +593,7 @@ function agents_process_manage_config ($source_id_agent, $destiny_id_agents, $co
|
|||||||
$module = modules_get_agentmodule ($id_agent_module);
|
$module = modules_get_agentmodule ($id_agent_module);
|
||||||
if ($module === false)
|
if ($module === false)
|
||||||
return false;
|
return false;
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules ($id_destiny_agent, false,
|
$modules = agents_get_modules ($id_destiny_agent, false,
|
||||||
array ('nombre' => $module['nombre'], 'disabled' => false));
|
array ('nombre' => $module['nombre'], 'disabled' => false));
|
||||||
|
|
||||||
@ -1349,6 +1350,7 @@ function agents_get_modules_data_count ($id_agent = 0) {
|
|||||||
foreach ($id_agent as $agent_id) {
|
foreach ($id_agent as $agent_id) {
|
||||||
//Init value
|
//Init value
|
||||||
$count[$agent_id] = 0;
|
$count[$agent_id] = 0;
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = array_keys (agents_get_modules ($agent_id));
|
$modules = array_keys (agents_get_modules ($agent_id));
|
||||||
foreach ($query as $sql) {
|
foreach ($query as $sql) {
|
||||||
//Add up each table's data
|
//Add up each table's data
|
||||||
@ -1679,6 +1681,7 @@ function agents_get_status($id_agent = 0, $noACLs = false) {
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if (!$noACLs) {
|
if (!$noACLs) {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules ($id_agent, 'id_agente_modulo',
|
$modules = agents_get_modules ($id_agent, 'id_agente_modulo',
|
||||||
array('disabled' => 0), true, false);
|
array('disabled' => 0), true, false);
|
||||||
}
|
}
|
||||||
@ -2126,7 +2129,7 @@ function agents_monitor_total ($id_agent, $filter = '', $disabled = false) {
|
|||||||
//Get alert fired for this agent
|
//Get alert fired for this agent
|
||||||
|
|
||||||
function agents_get_alerts_fired ($id_agent, $filter="") {
|
function agents_get_alerts_fired ($id_agent, $filter="") {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules_agent = agents_get_modules($id_agent, "id_agente_modulo", $filter);
|
$modules_agent = agents_get_modules($id_agent, "id_agente_modulo", $filter);
|
||||||
|
|
||||||
if (empty($modules_agent)) {
|
if (empty($modules_agent)) {
|
||||||
@ -2374,8 +2377,7 @@ function agents_get_network_interfaces ($agents = false, $agents_filter = false)
|
|||||||
else
|
else
|
||||||
$columns[] = 'descripcion';
|
$columns[] = 'descripcion';
|
||||||
|
|
||||||
$filter = " id_agente = $agent_id AND disabled = 0 AND id_tipo_modulo IN (".implode(",", $accepted_module_types).") AND (nombre LIKE '%_ifOperStatus' OR nombre LIKE 'ifOperStatus_%')";
|
$filter = " tagente_modulo.id_agente = $agent_id AND tagente_modulo.disabled = 0 AND tagente_modulo.id_tipo_modulo IN (".implode(",", $accepted_module_types).") AND (tagente_modulo.nombre LIKE '%_ifOperStatus' OR tagente_modulo.nombre LIKE 'ifOperStatus_%')";
|
||||||
|
|
||||||
$modules = agents_get_modules($agent_id, $columns, $filter, true, false);
|
$modules = agents_get_modules($agent_id, $columns, $filter, true, false);
|
||||||
|
|
||||||
if (!empty($modules)) {
|
if (!empty($modules)) {
|
||||||
@ -2441,9 +2443,11 @@ function agents_get_network_interfaces ($agents = false, $agents_filter = false)
|
|||||||
);
|
);
|
||||||
|
|
||||||
if($type_interface){
|
if($type_interface){
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$interface_traffic_modules = agents_get_modules($agent_id, $columns, "nombre LIKE '". $interface_name . "_if%Octets'");
|
$interface_traffic_modules = agents_get_modules($agent_id, $columns, "nombre LIKE '". $interface_name . "_if%Octets'");
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$interface_traffic_modules = agents_get_modules($agent_id, $columns, "nombre LIKE 'if%Octets_$interface_name'");
|
$interface_traffic_modules = agents_get_modules($agent_id, $columns, "nombre LIKE 'if%Octets_$interface_name'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2641,6 +2641,7 @@ function grafico_db_agentes_purge ($id_agent, $width = 380, $height = 300) {
|
|||||||
$query = "";
|
$query = "";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules($id_agent);
|
$modules = agents_get_modules($id_agent);
|
||||||
$module_ids = array_keys($modules);
|
$module_ids = array_keys($modules);
|
||||||
|
|
||||||
@ -4836,6 +4837,7 @@ function graph_monitor_wheel ($width = 550, $height = 600, $filter = false) {
|
|||||||
|
|
||||||
$module_groups = modules_get_modulegroups();
|
$module_groups = modules_get_modulegroups();
|
||||||
$module_groups[0] = __('Not assigned');
|
$module_groups[0] = __('Not assigned');
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules(array_keys($agents), '*');
|
$modules = agents_get_modules(array_keys($agents), '*');
|
||||||
|
|
||||||
$data_agents = array();
|
$data_agents = array();
|
||||||
|
@ -142,14 +142,14 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent
|
|||||||
|
|
||||||
if ($forced_name !== false)
|
if ($forced_name !== false)
|
||||||
$module['nombre'] = $forced_name;
|
$module['nombre'] = $forced_name;
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules ($id_destiny_agent, false,
|
$modules = agents_get_modules ($id_destiny_agent, false,
|
||||||
array ('nombre' => $module['nombre'], 'disabled' => false));
|
array ('nombre' => $module['nombre'], 'disabled' => false));
|
||||||
|
|
||||||
// The module already exist in the target
|
// The module already exist in the target
|
||||||
if (! empty ($modules))
|
if (! empty ($modules))
|
||||||
return array_pop (array_keys ($modules));
|
return array_pop (array_keys ($modules));
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modulesDisabled = agents_get_modules ($id_destiny_agent, false,
|
$modulesDisabled = agents_get_modules ($id_destiny_agent, false,
|
||||||
array ('nombre' => $module['nombre'], 'disabled' => true));
|
array ('nombre' => $module['nombre'], 'disabled' => true));
|
||||||
|
|
||||||
|
@ -390,15 +390,11 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
|
|||||||
|
|
||||||
$filter = array();
|
$filter = array();
|
||||||
$filter['disabled'] = 0;
|
$filter['disabled'] = 0;
|
||||||
|
|
||||||
// Get agent modules data
|
// Get agent modules data
|
||||||
if ($strict_user) {
|
// TODO TAGS agents_get_modules
|
||||||
$modules = tags_get_agent_modules ($agent['id_agente'], false, $acltags, false, $filter, false);
|
$modules = agents_get_modules($agent['id_agente'], '*', $filter, true, true);
|
||||||
}
|
|
||||||
else {
|
|
||||||
$modules = agents_get_modules($agent['id_agente'], '*', $filter, true, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($modules === false)
|
if ($modules === false)
|
||||||
$modules = array();
|
$modules = array();
|
||||||
|
|
||||||
@ -774,12 +770,8 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get agent modules data
|
// Get agent modules data
|
||||||
if ($strict_user) {
|
// TODO TAGS agents_get_modules
|
||||||
$filter['disabled'] = 0;
|
$modules = agents_get_modules ($agent['id_agente'], false, array('disabled' => 0), true, false);
|
||||||
$modules = tags_get_agent_modules ($agent['id_agente'], false, $acltags, false, $filter, false);
|
|
||||||
} else {
|
|
||||||
$modules = agents_get_modules ($agent['id_agente'], false, array('disabled' => 0), true, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse modules
|
// Parse modules
|
||||||
foreach ($modules as $key => $module) {
|
foreach ($modules as $key => $module) {
|
||||||
|
@ -1800,7 +1800,7 @@ function reporting_agent_module($report, $content) {
|
|||||||
$row = array();
|
$row = array();
|
||||||
$row['agent_status'][$agent] = agents_get_status($agent);
|
$row['agent_status'][$agent] = agents_get_status($agent);
|
||||||
$row['agent_name'] = agents_get_alias($agent);
|
$row['agent_name'] = agents_get_alias($agent);
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$agent_modules = agents_get_modules($agent);
|
$agent_modules = agents_get_modules($agent);
|
||||||
|
|
||||||
$row['modules'] = array();
|
$row['modules'] = array();
|
||||||
@ -3079,7 +3079,7 @@ function reporting_alert_report_agent($report, $content) {
|
|||||||
$return["description"] = $content["description"];
|
$return["description"] = $content["description"];
|
||||||
$return["date"] = reporting_get_date_text($report, $content);
|
$return["date"] = reporting_get_date_text($report, $content);
|
||||||
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
|
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$module_list = agents_get_modules($content['id_agent']);
|
$module_list = agents_get_modules($content['id_agent']);
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
@ -3669,7 +3669,7 @@ function reporting_agent_configuration($report, $content) {
|
|||||||
$agent_configuration['description'] = $agent_data['comentarios'];
|
$agent_configuration['description'] = $agent_data['comentarios'];
|
||||||
$agent_configuration['enabled'] = (int)!$agent_data['disabled'];
|
$agent_configuration['enabled'] = (int)!$agent_data['disabled'];
|
||||||
$agent_configuration['group'] = $report["group"];
|
$agent_configuration['group'] = $report["group"];
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules ($content['id_agent']);
|
$modules = agents_get_modules ($content['id_agent']);
|
||||||
|
|
||||||
$agent_configuration['modules'] = array();
|
$agent_configuration['modules'] = array();
|
||||||
@ -8313,7 +8313,7 @@ function reporting_get_agent_module_info ($id_agent, $filter = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$filter = 'disabled = 0';
|
$filter = 'disabled = 0';
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules($id_agent, false, $filter, true, false);
|
$modules = agents_get_modules($id_agent, false, $filter, true, false);
|
||||||
|
|
||||||
if ($modules === false) {
|
if ($modules === false) {
|
||||||
|
@ -3346,6 +3346,7 @@ function reporting_get_agent_monitors_table ($id_agent, $period = 0, $date = 0)
|
|||||||
function reporting_get_agent_modules_table ($id_agent, $period = 0, $date = 0) {
|
function reporting_get_agent_modules_table ($id_agent, $period = 0, $date = 0) {
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
$n_a_string = __('N/A').'(*)';
|
$n_a_string = __('N/A').'(*)';
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules ($id_agent, array ("nombre", "descripcion"));
|
$modules = agents_get_modules ($id_agent, array ("nombre", "descripcion"));
|
||||||
if ($modules === false)
|
if ($modules === false)
|
||||||
$modules = array();
|
$modules = array();
|
||||||
|
@ -273,7 +273,6 @@ $table_data->head_colspan[0] = 3;
|
|||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = '<b>' . __('Group') . '</b>';
|
$data[0] = '<b>' . __('Group') . '</b>';
|
||||||
$data[1] = '<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$agent["id_grupo"].'">'.groups_get_name ($agent["id_grupo"]).'</a>';
|
$data[1] = '<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$agent["id_grupo"].'">'.groups_get_name ($agent["id_grupo"]).'</a>';
|
||||||
|
|
||||||
// ACCESS RATE GRAPH
|
// ACCESS RATE GRAPH
|
||||||
$access_agent = db_get_value_sql("SELECT COUNT(id_agent)
|
$access_agent = db_get_value_sql("SELECT COUNT(id_agent)
|
||||||
FROM tagent_access
|
FROM tagent_access
|
||||||
|
@ -138,17 +138,14 @@ echo "</h4>";
|
|||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
|
|
||||||
print_form_filter_monitors($id_agente, $status_filter_monitor, $status_text_monitor, $status_hierachy_mode);
|
print_form_filter_monitors($id_agente, $status_filter_monitor, $status_text_monitor, $status_hierachy_mode);
|
||||||
|
|
||||||
echo "<div id='module_list_loading'>" .
|
echo "<div id='module_list_loading'>" .
|
||||||
html_print_image('images/spinner.gif', true) .
|
html_print_image('images/spinner.gif', true) .
|
||||||
'</div>';
|
'</div>';
|
||||||
echo "<div id='module_list'>" .
|
echo "<div id='module_list'>" .
|
||||||
|
|
||||||
"</div>";
|
"</div>";
|
||||||
|
|
||||||
|
|
||||||
$html_toggle = ob_get_clean();
|
$html_toggle = ob_get_clean();
|
||||||
ui_toggle($html_toggle,
|
ui_toggle($html_toggle,
|
||||||
__('List of modules'),
|
__('List of modules'),
|
||||||
|
@ -283,6 +283,7 @@ if (empty($export_btn) || $show_form) {
|
|||||||
$table->data[2][0] .= ui_print_help_tip(__("No modules of type string. You can not calculate their average"),true);
|
$table->data[2][0] .= ui_print_help_tip(__("No modules of type string. You can not calculate their average"),true);
|
||||||
|
|
||||||
if ($agent > 0) {
|
if ($agent > 0) {
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules ($agent);
|
$modules = agents_get_modules ($agent);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -47,7 +47,7 @@ $option_type = get_parameter('option_type', 0);
|
|||||||
// - others
|
// - others
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
$list_modules = array();
|
$list_modules = array();
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules_networkmap_no_proc = agents_get_modules(
|
$modules_networkmap_no_proc = agents_get_modules(
|
||||||
$id_agente, false, array(
|
$id_agente, false, array(
|
||||||
'id_modulo' => 2, // networkmap type
|
'id_modulo' => 2, // networkmap type
|
||||||
@ -62,7 +62,7 @@ $modules_networkmap_no_proc = agents_get_modules(
|
|||||||
));
|
));
|
||||||
if (empty($modules_networkmap_no_proc))
|
if (empty($modules_networkmap_no_proc))
|
||||||
$modules_networkmap_no_proc = array();
|
$modules_networkmap_no_proc = array();
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules_others = agents_get_modules(
|
$modules_others = agents_get_modules(
|
||||||
$id_agente, false, array(
|
$id_agente, false, array(
|
||||||
'id_tipo_modulo' => array(
|
'id_tipo_modulo' => array(
|
||||||
@ -77,7 +77,7 @@ $modules_others = agents_get_modules(
|
|||||||
|
|
||||||
if (empty($modules_others))
|
if (empty($modules_others))
|
||||||
$modules_others = array();
|
$modules_others = array();
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules_boolean = agents_get_modules(
|
$modules_boolean = agents_get_modules(
|
||||||
$id_agente, false, array(
|
$id_agente, false, array(
|
||||||
'id_tipo_modulo' => array(
|
'id_tipo_modulo' => array(
|
||||||
|
@ -595,7 +595,7 @@ if (is_ajax ()) {
|
|||||||
|
|
||||||
if ($check_changes_num_modules) {
|
if ($check_changes_num_modules) {
|
||||||
$id = (int)get_parameter('id', 0);
|
$id = (int)get_parameter('id', 0);
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$modules = agents_get_modules($id);
|
$modules = agents_get_modules($id);
|
||||||
|
|
||||||
$return = array();
|
$return = array();
|
||||||
|
@ -29,7 +29,6 @@ ui_require_javascript_file('openlayers.pandora');
|
|||||||
enterprise_include_once ('operation/agentes/ver_agente.php');
|
enterprise_include_once ('operation/agentes/ver_agente.php');
|
||||||
|
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
||||||
if (is_ajax ()) {
|
if (is_ajax ()) {
|
||||||
$get_agent_json = (bool) get_parameter ('get_agent_json');
|
$get_agent_json = (bool) get_parameter ('get_agent_json');
|
||||||
$get_agent_modules_json = (bool) get_parameter ('get_agent_modules_json');
|
$get_agent_modules_json = (bool) get_parameter ('get_agent_modules_json');
|
||||||
@ -718,7 +717,7 @@ if (is_ajax ()) {
|
|||||||
$id_agent = array_keys(
|
$id_agent = array_keys(
|
||||||
agents_get_group_agents(
|
agents_get_group_agents(
|
||||||
array_keys (users_get_groups ()), $search, "none"));
|
array_keys (users_get_groups ()), $search, "none"));
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$agent_modules = agents_get_modules ($id_agent, $fields, $filter, $indexed, true, false, $tags);
|
$agent_modules = agents_get_modules ($id_agent, $fields, $filter, $indexed, true, false, $tags);
|
||||||
}
|
}
|
||||||
// Restore db connection
|
// Restore db connection
|
||||||
@ -731,7 +730,7 @@ if (is_ajax ()) {
|
|||||||
$id_agent = array_keys(
|
$id_agent = array_keys(
|
||||||
agents_get_group_agents(
|
agents_get_group_agents(
|
||||||
array_keys(users_get_groups ()), $search, "none"));
|
array_keys(users_get_groups ()), $search, "none"));
|
||||||
|
// TODO TAGS agents_get_modules
|
||||||
$agent_modules = agents_get_modules ($id_agent, $fields, $filter, $indexed, true, false, $tags);
|
$agent_modules = agents_get_modules ($id_agent, $fields, $filter, $indexed, true, false, $tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user