Merge branch 'ent-5481-agregar-nombre-a-llamada-api-get-agent-id-name-by-alias' into 'develop'

add nombre in api_get_i_name_by_alias API method

See merge request artica/pandorafms!3150
This commit is contained in:
Alejandro Fraguas 2020-05-12 09:51:09 +02:00
commit 464699cbaa
1 changed files with 3 additions and 3 deletions

View File

@ -14294,7 +14294,7 @@ function api_get_agents_id_name_by_cluster_name($cluster_name, $trash1, $trash2,
* @param $trash2 * @param $trash2
* @param string $returnType * @param string $returnType
* Example: * 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) 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()) { 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 { } 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) { if ($all_agents !== false) {