From 74c2dafed05f2a5c07c63e2c6e778e32b4a94363 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 1 Feb 2022 14:30:25 +0100 Subject: [PATCH 1/2] added token to display or hide command in event response execution --- pandora_console/extras/mr/52.sql | 1 + .../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 | 2 ++ pandora_console/include/ajax/events.php | 7 +++++-- pandora_console/pandoradb.sql | 1 + pandora_console/pandoradb_data.sql | 2 +- 7 files changed, 23 insertions(+), 3 deletions(-) diff --git a/pandora_console/extras/mr/52.sql b/pandora_console/extras/mr/52.sql index d2d5e1be65..bde9fd57c3 100644 --- a/pandora_console/extras/mr/52.sql +++ b/pandora_console/extras/mr/52.sql @@ -1,5 +1,6 @@ START TRANSACTION; ALTER TABLE `tpolicy_queue` MODIFY COLUMN `progress` int(10) NOT NULL default '0'; CREATE INDEX `IDX_tservice_element` ON `tservice_element`(`id_service`,`id_agente_modulo`); +ALTER TABLE tevent_response ADD COLUMN display_command tinyint(1) default 0; COMMIT; \ No newline at end of file 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 d6db1ad76e..32c5c65123 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 @@ -2002,6 +2002,7 @@ ALTER TABLE `tserver` ADD COLUMN `port` int(5) unsigned NOT NULL default 0; -- --------------------------------------------------------------------- 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; +ALTER TABLE tevent_response ADD COLUMN display_command tinyint(1) DEFAULT 0; -- --------------------------------------------------------------------- -- Table `tmodule` diff --git a/pandora_console/godmode/events/event_responses.editor.php b/pandora_console/godmode/events/event_responses.editor.php index e044528cba..81bf8a5766 100644 --- a/pandora_console/godmode/events/event_responses.editor.php +++ b/pandora_console/godmode/events/event_responses.editor.php @@ -197,6 +197,18 @@ $data[0] = '