mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
2010-05-25 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DB.pm: Added a function to get the id of an action (needed by pandora_manage.pl). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2798 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3add856330
commit
acee408571
@ -1,3 +1,8 @@
|
|||||||
|
2010-05-25 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/DB.pm: Added a function to get the id of an action
|
||||||
|
(needed by pandora_manage.pl).
|
||||||
|
|
||||||
2010-05-25 Ramon Novoa <rnovoa@artica.es>
|
2010-05-25 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* lib/PandoraFMS/Tools.pm: Set a default verbosity level for logger().
|
* lib/PandoraFMS/Tools.pm: Set a default verbosity level for logger().
|
||||||
|
@ -31,6 +31,7 @@ our @EXPORT = qw(
|
|||||||
db_disconnect
|
db_disconnect
|
||||||
db_do
|
db_do
|
||||||
db_insert
|
db_insert
|
||||||
|
get_action_id
|
||||||
get_agent_id
|
get_agent_id
|
||||||
get_agent_name
|
get_agent_name
|
||||||
get_agent_module_id
|
get_agent_module_id
|
||||||
@ -79,6 +80,16 @@ sub db_disconnect ($) {
|
|||||||
$dbh->disconnect();
|
$dbh->disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
## Return action ID given the action name.
|
||||||
|
##########################################################################
|
||||||
|
sub get_action_id ($$) {
|
||||||
|
my ($dbh, $action_name) = @_;
|
||||||
|
|
||||||
|
my $rc = get_db_value ($dbh, "SELECT id FROM talert_actions WHERE name = ?", $action_name);
|
||||||
|
return defined ($rc) ? $rc : -1;
|
||||||
|
}
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
## Return agent ID given the agent name.
|
## Return agent ID given the agent name.
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user