From 9931b16793707dfff249d8f5afe06ac467abe467 Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 8 Apr 2020 17:01:18 +0200 Subject: [PATCH] add nombre in api_get_i_name_by_alias API method --- pandora_console/include/functions_api.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 37ead3a465..b790e5f8cc 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -14294,7 +14294,7 @@ function api_get_agents_id_name_by_cluster_name($cluster_name, $trash1, $trash2, * @param $trash2 * @param string $returnType * Example: - * api.php?op=get&op2=agents_id_name_by_alias&return_type=json&apipass=1234&user=admin&pass=pandora&id=pandrora&id2=strict + * api.php?op=get&op2=agents_id_name_by_alias&return_type=json&apipass=1234&user=admin&pass=pandora&id=pandorafms&id2=strict */ function api_get_agents_id_name_by_alias($alias, $strict, $trash2, $returnType) { @@ -14307,9 +14307,9 @@ function api_get_agents_id_name_by_alias($alias, $strict, $trash2, $returnType) } if (is_metaconsole()) { - $all_agents = db_get_all_rows_sql("SELECT alias, id_agente, id_tagente,id_tmetaconsole_setup as 'id_server', server_name FROM tmetaconsole_agent WHERE $where_clause"); + $all_agents = db_get_all_rows_sql("SELECT alias, nombre, id_agente, id_tagente,id_tmetaconsole_setup as 'id_server', server_name FROM tmetaconsole_agent WHERE $where_clause"); } else { - $all_agents = db_get_all_rows_sql("SELECT alias, id_agente from tagente WHERE $where_clause"); + $all_agents = db_get_all_rows_sql("SELECT alias, nombre, id_agente from tagente WHERE $where_clause"); } if ($all_agents !== false) {