Merge branch 'ent-9657-derivado-el-trabajo-q-a-766-el-comando-cli-get_agents_id_name_by_alias-no-funciona-con' into 'develop'
Ent-9657-derivado-el-trabajo-q-a-766-el-comando-cli-get_agents_id_name_by_alias-no-funciona-con-comillas See merge request artica/pandorafms!6026
This commit is contained in:
commit
31608ac201
|
@ -5398,7 +5398,7 @@ sub cli_get_agent_status() {
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
sub cli_get_agents_id_name_by_alias() {
|
sub cli_get_agents_id_name_by_alias() {
|
||||||
my $agent_alias = @ARGV[2];
|
my $agent_alias = safe_input(@ARGV[2]);
|
||||||
my $strict = @ARGV[3];
|
my $strict = @ARGV[3];
|
||||||
my @agents;
|
my @agents;
|
||||||
my $where_value;
|
my $where_value;
|
||||||
|
@ -5418,14 +5418,13 @@ sub cli_get_agents_id_name_by_alias() {
|
||||||
print "[ERROR] No agents retrieved.\n\n";
|
print "[ERROR] No agents retrieved.\n\n";
|
||||||
} else {
|
} else {
|
||||||
if(is_metaconsole($conf) == 1) {
|
if(is_metaconsole($conf) == 1) {
|
||||||
print "alias, id_agente, id_tagente, id_server, server_name\n";
|
print "id_agente, alias, id_tagente, id_server, server_name\n";
|
||||||
|
|
||||||
foreach my $agent (@agents) {
|
foreach my $agent (@agents) {
|
||||||
|
print $agent->{'id_agente'}.", ".safe_output($agent->{'alias'}).", ".$agent->{'id_tagente'}.", ".$agent->{'id_server'}.", ".$agent->{'server_name'}."\n";
|
||||||
print safe_output($agent->{'alias'}).", ".$agent->{'id_agente'}.", ".$agent->{'id_tagente'}.", ".$agent->{'id_server'}.", ".$agent->{'server_name'}."\n";
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print "alias, id_agente\n";
|
print "id_agente, alias\n";
|
||||||
|
|
||||||
foreach my $agent (@agents) {
|
foreach my $agent (@agents) {
|
||||||
print $agent->{'id_agente'}.",".safe_output($agent->{'alias'})."\n";
|
print $agent->{'id_agente'}.",".safe_output($agent->{'alias'})."\n";
|
||||||
|
|
Loading…
Reference in New Issue