#11495 Fix agent name in metaconsole module selector

This commit is contained in:
miguel angel rasteu 2023-12-11 16:46:19 +01:00
parent 3a00ba0fd6
commit 94256559f1
3 changed files with 12 additions and 6 deletions

View File

@ -2335,7 +2335,7 @@ if (is_metaconsole() === true) {
$modulegroup,
$id_agents,
!$selection_a_m,
false
true
);
}

View File

@ -3664,7 +3664,7 @@ function select_modules_for_agent_group(
$sql = "SELECT * FROM
(
SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.nombre
SELECT (tagente_modulo.id_agente_modulo), tagente_modulo.nombre, tagente.alias
FROM tagente_modulo
$sql_tags_inner
INNER JOIN tagente
@ -3679,7 +3679,7 @@ function select_modules_for_agent_group(
$filter_not_string_modules
$sql_conditions_tags
) x
GROUP BY nombre
$selection_filter";
$modules = db_get_all_rows_sql($sql);

View File

@ -3774,10 +3774,16 @@ function get_modules_agents(
$t['id_node'] = $tserver;
if ($nodes[$tserver] !== null) {
if (isset($t['alias']) === true) {
$t['nombre'] = io_safe_output(
$nodes[$tserver]->server_name().' » '.$t['alias'].' » '.$t['nombre']
);
} else {
$t['nombre'] = io_safe_output(
$nodes[$tserver]->server_name().' » '.$t['nombre']
);
}
}
$carry[] = $t;
return $carry;