minor fixes in report item
This commit is contained in:
parent
36eb084824
commit
b8c6922902
pandora_console
|
@ -3139,6 +3139,10 @@ $class = 'databox filters';
|
|||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if ($selected_agent_os_filter === null) {
|
||||
$selected_agent_os_filter = 0;
|
||||
}
|
||||
|
||||
html_print_select_from_sql(
|
||||
'SELECT id_os, name FROM tconfig_os',
|
||||
'agent_os_filter[]',
|
||||
|
@ -3193,6 +3197,10 @@ $class = 'databox filters';
|
|||
$fields[AGENT_STATUS_NOT_NORMAL] = __('Not normal');
|
||||
$fields[AGENT_STATUS_NOT_INIT] = __('Not init');
|
||||
|
||||
if ($selected_agent_status_filter === null) {
|
||||
$selected_agent_status_filter = -1;
|
||||
}
|
||||
|
||||
html_print_select(
|
||||
$fields,
|
||||
'agent_status_filter[]',
|
||||
|
@ -3239,7 +3247,7 @@ $class = 'databox filters';
|
|||
<td class="bolder">
|
||||
<?php
|
||||
echo __('Agent has remote configuration').ui_print_help_tip(
|
||||
__('Filter by agents by remote configuration enabled or disabled.'),
|
||||
__('Filter agents by remote configuration enabled.'),
|
||||
true
|
||||
);
|
||||
?>
|
||||
|
|
|
@ -2310,7 +2310,7 @@ function reporting_agents_inventory($report, $content)
|
|||
}
|
||||
|
||||
if ($es_agent_group_filter != 0) {
|
||||
$search_sql .= ' AND tagente.id_grupo = '.$es_agent_group_filter;
|
||||
$search_sql .= ' AND (tagente.id_grupo = '.$es_agent_group_filter.' OR tasg.id_group = '.$es_agent_group_filter.')';
|
||||
}
|
||||
|
||||
if ($es_agent_remote_conf != 0) {
|
||||
|
@ -2331,7 +2331,7 @@ function reporting_agents_inventory($report, $content)
|
|||
tagente.remote
|
||||
FROM tagente LEFT JOIN tagent_secondary_group tasg
|
||||
ON tagente.id_agente = tasg.id_agent
|
||||
INNER JOIN tagente_modulo tam
|
||||
LEFT JOIN tagente_modulo tam
|
||||
ON tam.id_agente = tagente.id_agente
|
||||
WHERE (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s))
|
||||
%s',
|
||||
|
@ -2346,7 +2346,7 @@ function reporting_agents_inventory($report, $content)
|
|||
$servers_ids = [0];
|
||||
}
|
||||
|
||||
$return['data'] = [];
|
||||
$return_data = [];
|
||||
|
||||
foreach ($servers_ids as $server_id) {
|
||||
if (is_metaconsole()) {
|
||||
|
@ -2412,13 +2412,23 @@ function reporting_agents_inventory($report, $content)
|
|||
}
|
||||
}
|
||||
|
||||
$return['data'] = array_merge($return['data'], $agents);
|
||||
$return_data[$server_id] = $agents;
|
||||
|
||||
if (is_metaconsole()) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
}
|
||||
|
||||
$all_data = [];
|
||||
|
||||
foreach ($return_data as $server_agents) {
|
||||
foreach ($server_agents as $agent) {
|
||||
$all_data[] = $agent;
|
||||
}
|
||||
}
|
||||
|
||||
$return['data'] = $all_data;
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue