From 6ba4a26564dd04e3e673a3bfb9cdf5a5f0294e47 Mon Sep 17 00:00:00 2001 From: Luis Date: Tue, 10 Dec 2019 11:54:30 +0100 Subject: [PATCH] Added timeoout option to command event responses --- pandora_console/extras/mr/34.sql | 5 +++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 1 + .../godmode/events/event_responses.editor.php | 12 ++++++++++++ pandora_console/godmode/events/event_responses.php | 3 +++ pandora_console/include/ajax/events.php | 14 +++++++++++--- pandora_console/include/functions_api.php | 6 ++++-- pandora_console/pandoradb.sql | 1 + pandora_console/pandoradb_data.sql | 2 +- 8 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 pandora_console/extras/mr/34.sql diff --git a/pandora_console/extras/mr/34.sql b/pandora_console/extras/mr/34.sql new file mode 100644 index 0000000000..7ed6610f1d --- /dev/null +++ b/pandora_console/extras/mr/34.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +ALTER TABLE `tevent_response` ADD COLUMN `command_timeout` int(5) unsigned NOT NULL DEFAULT 90; + +COMMIT; diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index e7f00559f9..3d40b68b41 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1776,6 +1776,7 @@ ALTER TABLE tserver ADD COLUMN exec_proxy tinyint(1) UNSIGNED NOT NULL default 0 -- Table `tevent_response` -- --------------------------------------------------------------------- ALTER TABLE tevent_response ADD COLUMN server_to_exec int(10) unsigned NOT NULL DEFAULT 0; +ALTER TABLE tevent_response ADD COLUMN command_timeout int(5) unsigned NOT NULL DEFAULT 90; -- --------------------------------------------------------------------- -- Table `tmodule` diff --git a/pandora_console/godmode/events/event_responses.editor.php b/pandora_console/godmode/events/event_responses.editor.php index c514ded346..80ca390b51 100644 --- a/pandora_console/godmode/events/event_responses.editor.php +++ b/pandora_console/godmode/events/event_responses.editor.php @@ -52,6 +52,7 @@ if ($event_response_id > 0) { $event_response['modal_height'] = 0; $event_response['params'] = ''; $event_response['server_to_exec'] = ''; + $event_response['command_timeout'] = 90; } $table = new stdClass(); @@ -175,6 +176,11 @@ $data[3] = '