mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch '2737-Optimización-de-tags-dev' of https://192.168.50.5:8081/artica/pandorafms into 2737-Optimización-de-tags-dev
This commit is contained in:
commit
5fd76bf8cb
@ -66,7 +66,6 @@ if ($enterpriseEnable) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$subsection = reporting_enterprise_add_graph_template_subsection('', $buttons);
|
$subsection = reporting_enterprise_add_graph_template_subsection('', $buttons);
|
||||||
reporting_enterprise_select_graph_template_tab();
|
|
||||||
|
|
||||||
$buttons['graph_container'] = array('active' => true,
|
$buttons['graph_container'] = array('active' => true,
|
||||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">' .
|
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">' .
|
||||||
|
@ -3667,7 +3667,6 @@ 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();
|
||||||
@ -8286,11 +8285,10 @@ function reporting_get_agentmodule_ttr ($id_agent_module, $period = 0, $date = 0
|
|||||||
* Get a detailed report of the modules of the agent
|
* Get a detailed report of the modules of the agent
|
||||||
*
|
*
|
||||||
* @param int $id_agent Agent id to get the report for.
|
* @param int $id_agent Agent id to get the report for.
|
||||||
* @param string $filter filter for get partial modules.
|
|
||||||
*
|
*
|
||||||
* @return array An array
|
* @return array An array
|
||||||
*/
|
*/
|
||||||
function reporting_get_agent_module_info ($id_agent, $filter = false) {
|
function reporting_get_agent_module_info ($id_agent) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$return = array ();
|
$return = array ();
|
||||||
@ -8306,12 +8304,7 @@ function reporting_get_agent_module_info ($id_agent, $filter = false) {
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($filter != '') {
|
$filter = array('disabled' => 0);
|
||||||
$filter = 'AND ';
|
|
||||||
}
|
|
||||||
|
|
||||||
$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) {
|
||||||
@ -8409,33 +8402,6 @@ function reporting_tiny_stats ($counts_info, $return = false, $type = 'agent', $
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($strict_user && $type == 'agent') {
|
|
||||||
|
|
||||||
$acltags = tags_get_user_groups_and_tags ($config['id_user'],'AR', $strict_user);
|
|
||||||
$filter['disabled'] = 0;
|
|
||||||
$id_agent = $counts_info['id_agente'];
|
|
||||||
|
|
||||||
$counts_info = array();
|
|
||||||
$counts_info['normal_count'] = count(tags_get_agent_modules ($id_agent, false, $acltags, false, $filter, false, AGENT_MODULE_STATUS_NORMAL));
|
|
||||||
$counts_info['warning_count'] = count(tags_get_agent_modules ($id_agent, false, $acltags, false, $filter, false, AGENT_MODULE_STATUS_WARNING));
|
|
||||||
$counts_info['critical_count'] = count(tags_get_agent_modules ($id_agent, false, $acltags, false, $filter, false, AGENT_MODULE_STATUS_CRITICAL_BAD));
|
|
||||||
$counts_info['notinit_count'] = count(tags_get_agent_modules ($id_agent, false, $acltags, false, $filter, false, AGENT_MODULE_STATUS_NOT_INIT));
|
|
||||||
$counts_info['unknown_count'] = count(tags_get_agent_modules ($id_agent, false, $acltags, false, $filter, false, AGENT_MODULE_STATUS_UNKNOWN));
|
|
||||||
$counts_info['total_count'] = $counts_info['normal_count'] + $counts_info['warning_count'] + $counts_info['critical_count'] + $counts_info['unknown_count'] + $counts_info['notinit_count'];
|
|
||||||
|
|
||||||
$all_agent_modules = tags_get_agent_modules ($id_agent, false, $acltags, false, $filter);
|
|
||||||
if (!empty($all_agent_modules)) {
|
|
||||||
$mod_clause = "(".implode(',', array_keys($all_agent_modules)).")";
|
|
||||||
|
|
||||||
$counts_info['fired_count'] = (int) db_get_sql ("SELECT COUNT(times_fired)
|
|
||||||
FROM talert_template_modules
|
|
||||||
WHERE times_fired != 0 AND id_agent_module IN ".$mod_clause);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$counts_info['fired_count'] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Store the counts in a data structure to print hidden divs with titles
|
// Store the counts in a data structure to print hidden divs with titles
|
||||||
$stats = array();
|
$stats = array();
|
||||||
|
|
||||||
|
@ -37,21 +37,8 @@ ui_print_page_header (__("Export data"), "images/server_export_mc.png");
|
|||||||
|
|
||||||
$group = get_parameter_post ('group', 0);
|
$group = get_parameter_post ('group', 0);
|
||||||
$agentName = get_parameter_post ('agent', 0);
|
$agentName = get_parameter_post ('agent', 0);
|
||||||
|
$agents = agents_get_agents(
|
||||||
switch ($config["dbtype"]) {
|
array('nombre LIKE "' . $agentName . '"'), array ('id_agente'));
|
||||||
case "mysql":
|
|
||||||
$agents = agents_get_agents(
|
|
||||||
array('nombre LIKE "' . $agentName . '"'), array ('id_agente'));
|
|
||||||
break;
|
|
||||||
case "postgresql":
|
|
||||||
$agents = agents_get_agents(
|
|
||||||
array('nombre LIKE \'' . $agentName . '\''), array ('id_agente'));
|
|
||||||
break;
|
|
||||||
case "oracle":
|
|
||||||
$agents = agents_get_agents(
|
|
||||||
array('nombre LIKE \'%' . $agentName . '%\''), array ('id_agente'));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$agent = $agents[0]['id_agente'];
|
$agent = $agents[0]['id_agente'];
|
||||||
|
|
||||||
$module = (array) get_parameter_post ('module_arr', array ());
|
$module = (array) get_parameter_post ('module_arr', array ());
|
||||||
@ -283,7 +270,6 @@ 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,6 @@ $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 +61,6 @@ $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 +75,6 @@ $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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user