changed event in progress method
This commit is contained in:
parent
26e0703617
commit
9632b36551
|
@ -16157,16 +16157,15 @@ function api_get_event_mcid($server_id, $console_event_id, $trash2, $returnType)
|
||||||
* Function to set events in progress status.
|
* Function to set events in progress status.
|
||||||
*
|
*
|
||||||
* @param [int] $event_id Id event (Node or Meta).
|
* @param [int] $event_id Id event (Node or Meta).
|
||||||
* @param [int] $server_id Id node event in tmetaconsole_event (optional).
|
|
||||||
* @param [string] $trash2 don't use.
|
* @param [string] $trash2 don't use.
|
||||||
* @param [string] $returnType
|
* @param [string] $returnType
|
||||||
*
|
*
|
||||||
* Example
|
* Example
|
||||||
* http://127.0.0.1/pandora_console/include/api.php?op=set&op2=event_in_progress&return_type=json&id=0&id2=0&apipass=1234&user=admin&pass=pandora
|
* http://127.0.0.1/pandora_console/include/api.php?op=set&op2=event_in_progress&return_type=json&id=0&apipass=1234&user=admin&pass=pandora
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function api_set_event_in_progress($event_id, $server_id, $trash2, $returnType)
|
function api_set_event_in_progress($event_id, $trash2, $returnType)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -16174,10 +16173,7 @@ function api_set_event_in_progress($event_id, $server_id, $trash2, $returnType)
|
||||||
$event = db_process_sql_update(
|
$event = db_process_sql_update(
|
||||||
'tmetaconsole_event',
|
'tmetaconsole_event',
|
||||||
['estado' => 2],
|
['estado' => 2],
|
||||||
[
|
['id_evento' => $event_id]
|
||||||
'server_id' => $server_id,
|
|
||||||
'id_evento' => $event_id,
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
if ($event !== false) {
|
if ($event !== false) {
|
||||||
returnData($returnType, ['type' => 'string', 'data' => $event]);
|
returnData($returnType, ['type' => 'string', 'data' => $event]);
|
||||||
|
|
|
@ -245,7 +245,7 @@ sub help_screen{
|
||||||
help_screen_line('--export_json_visual_console', '<id> [<path>] [<with_element_id>]', 'Creates a json with the visual console elements information');
|
help_screen_line('--export_json_visual_console', '<id> [<path>] [<with_element_id>]', 'Creates a json with the visual console elements information');
|
||||||
|
|
||||||
print "\nEVENTS\n\n" unless $param ne '';
|
print "\nEVENTS\n\n" unless $param ne '';
|
||||||
help_screen_line('--event_in_progress', '<id_event> <id_node>', 'Set event in progress');
|
help_screen_line('--event_in_progress', '<id_event> ', 'Set event in progress');
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
exit;
|
exit;
|
||||||
|
@ -7714,7 +7714,7 @@ sub pandora_manage_main ($$$) {
|
||||||
param_check($ltotal, 1, 0);
|
param_check($ltotal, 1, 0);
|
||||||
cli_reset_agent_counts();
|
cli_reset_agent_counts();
|
||||||
}elsif ($param eq '--event_in_progress') {
|
}elsif ($param eq '--event_in_progress') {
|
||||||
param_check($ltotal, 2, 0);
|
param_check($ltotal, 1, 0);
|
||||||
cli_event_in_progress();
|
cli_event_in_progress();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -8373,11 +8373,11 @@ sub cli_reset_agent_counts() {
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
sub cli_event_in_progress() {
|
sub cli_event_in_progress() {
|
||||||
my ($event_id, $server_id) = @ARGV[2..3];
|
my $event_id = @ARGV[2];
|
||||||
|
|
||||||
# Call the API.
|
# Call the API.
|
||||||
my $result = api_call(
|
my $result = api_call(
|
||||||
$conf, 'set', 'event_in_progress', $event_id, $server_id
|
$conf, 'set', 'event_in_progress', $event_id
|
||||||
);
|
);
|
||||||
|
|
||||||
print "\n$result\n";
|
print "\n$result\n";
|
||||||
|
|
Loading…
Reference in New Issue