From 5fcf3eca234c207b9899354d9a0b697e4f7806e8 Mon Sep 17 00:00:00 2001 From: Junichi Satoh Date: Tue, 8 Jun 2021 14:43:43 +0900 Subject: [PATCH] Fixed problems in planned downtime below. - modules cannot be added to defined planned downtime with 'Quiet' mode. - pending modules for delete can be selected when modify defined planned downtime. --- .../godmode/agentes/planned_downtime.editor.php | 16 +++++++++++++++- .../include/ajax/planned_downtime.ajax.php | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index da48e8b26d..2891272be4 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -1015,7 +1015,21 @@ $table->data['module'][1] = " '', '', 0, - true + true, + false, + true, + '', + false, + false, + false, + false, + false, + '', + false, + false, + false, + false, + false )." ".'
'.''.html_print_image( 'images/add.png', diff --git a/pandora_console/include/ajax/planned_downtime.ajax.php b/pandora_console/include/ajax/planned_downtime.ajax.php index 687f9138cb..f1496dd64a 100644 --- a/pandora_console/include/ajax/planned_downtime.ajax.php +++ b/pandora_console/include/ajax/planned_downtime.ajax.php @@ -65,7 +65,7 @@ if ($get_modules_downtime) { $downtime_module_ids = extract_column($downtime_modules, 'id_agent_module'); $downtime_modules = array_fill_keys($downtime_module_ids, true); - $filter = ['id_agente' => $id_agent]; + $filter = ['id_agente' => $id_agent, 'delete_pending' => 0]; $modules = db_get_all_rows_filter('tagente_modulo', $filter); if (empty($modules)) { $modules = [];