mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge remote-tracking branch 'remotes/origin/ent-3779-7612-Revision-de-llamadas-a-api-y-cli-agent-name-alias-name' into develop
This commit is contained in:
commit
89cf58f814
File diff suppressed because it is too large
Load Diff
@ -57,6 +57,7 @@ our @EXPORT = qw(
|
||||
get_addr_id
|
||||
get_agent_addr_id
|
||||
get_agent_id
|
||||
get_agent_ids_from_alias
|
||||
get_agent_address
|
||||
get_agent_alias
|
||||
get_agent_group
|
||||
@ -232,6 +233,17 @@ sub get_agent_id ($$) {
|
||||
return defined ($rc) ? $rc : -1;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
## Return agent IDs given an agent alias.
|
||||
########################################################################
|
||||
sub get_agent_ids_from_alias ($$) {
|
||||
my ($dbh, $agent_alias) = @_;
|
||||
|
||||
my @rc = get_db_rows ($dbh, "SELECT id_agente, nombre FROM tagente WHERE alias = ?", safe_input($agent_alias));
|
||||
|
||||
return @rc;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
## Return server ID given the name of server.
|
||||
########################################################################
|
||||
@ -956,7 +968,7 @@ sub db_process_insert($$$$;@) {
|
||||
}
|
||||
}
|
||||
my $columns_string = join(',', @columns_array);
|
||||
|
||||
|
||||
my $res = db_insert ($dbh,
|
||||
$index,
|
||||
"INSERT INTO $table ($columns_string) VALUES " . $wildcards, @values_array);
|
||||
|
@ -141,6 +141,7 @@ our @EXPORT = qw(
|
||||
long_to_ip
|
||||
ip_to_long
|
||||
get_enabled_servers
|
||||
dateTimeToTimestamp
|
||||
);
|
||||
|
||||
# ID of the different servers
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user