Merge branch 'ent-5181-Pete-SQL-y-mal-funcionamineto-de-Auto-combined-graph' into 'develop'
Ent 5181 pete sql y mal funcionamineto de auto combined graph See merge request artica/pandorafms!3000
This commit is contained in:
commit
1f15fd5dae
|
@ -1446,9 +1446,20 @@ function graphic_combined_module(
|
|||
$data_module_graph['agent_name'] = modules_get_agentmodule_agent_name(
|
||||
$agent_module_id
|
||||
);
|
||||
$data_module_graph['agent_alias'] = modules_get_agentmodule_agent_alias(
|
||||
$agent_module_id
|
||||
);
|
||||
|
||||
if (is_metaconsole()) {
|
||||
$data_module_graph['agent_alias'] = db_get_value(
|
||||
'alias',
|
||||
'tagente',
|
||||
'id_agente',
|
||||
(int) $module_data['id_agente']
|
||||
);
|
||||
} else {
|
||||
$data_module_graph['agent_alias'] = modules_get_agentmodule_agent_alias(
|
||||
$agent_module_id
|
||||
);
|
||||
}
|
||||
|
||||
$data_module_graph['agent_id'] = $module_data['id_agente'];
|
||||
$data_module_graph['module_name'] = $module_data['nombre'];
|
||||
$data_module_graph['id_module_type'] = $module_data['id_tipo_modulo'];
|
||||
|
|
|
@ -325,6 +325,17 @@ function reporting_make_reporting_data(
|
|||
$content['id_agent']
|
||||
);
|
||||
|
||||
// This is for metaconsole. It is an array with modules and server (id node).
|
||||
if (is_array($content['id_agent_module'])) {
|
||||
$modules_server_array = $content['id_agent_module'];
|
||||
$modules_array = [];
|
||||
foreach ($modules_server_array as $value) {
|
||||
$modules_array[] = $value['module'];
|
||||
}
|
||||
|
||||
$content['id_agent_module'] = $modules_array;
|
||||
}
|
||||
|
||||
$modules = agents_get_modules(
|
||||
$agent_value,
|
||||
[
|
||||
|
@ -7599,16 +7610,18 @@ function reporting_custom_graph(
|
|||
$content['name'] = __('Simple graph');
|
||||
}
|
||||
|
||||
$module_source = db_get_all_rows_sql(
|
||||
'SELECT id_agent_module
|
||||
FROM tgraph_source
|
||||
WHERE id_graph = '.$content['id_gs']
|
||||
);
|
||||
if ($type_report != 'automatic_graph') {
|
||||
$module_source = db_get_all_rows_sql(
|
||||
'SELECT id_agent_module
|
||||
FROM tgraph_source
|
||||
WHERE id_graph = '.$content['id_gs']
|
||||
);
|
||||
|
||||
if (isset($module_source) && is_array($module_source)) {
|
||||
$modules = [];
|
||||
foreach ($module_source as $key => $value) {
|
||||
$modules[$key] = $value['id_agent_module'];
|
||||
if (isset($module_source) && is_array($module_source)) {
|
||||
$modules = [];
|
||||
foreach ($module_source as $key => $value) {
|
||||
$modules[$key] = $value['id_agent_module'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue