From aa3352267053b731f18f750cc17095a9771f65d5 Mon Sep 17 00:00:00 2001 From: alejandro-campos <alejandro.campos@artica.es> Date: Thu, 11 Oct 2018 15:22:36 +0200 Subject: [PATCH] added check to prevent alert creation form from being printed in alert cluster for step 5 --- .../godmode/alerts/alert_list.builder.php | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php index 85ce6c3c02..ad64eee74e 100644 --- a/pandora_console/godmode/alerts/alert_list.builder.php +++ b/pandora_console/godmode/alerts/alert_list.builder.php @@ -136,22 +136,25 @@ if (check_acl ($config['id_user'], 0, "LM")) { $table->data[3][1] .= ' ' . __('seconds') . ui_print_help_icon ('action_threshold', true); -echo '<form class="add_alert_form" method="post">'; - -if (!isset($step) || $step!=5) +if (!isset($step) || $step!=5) { + echo '<form class="add_alert_form" method="post">'; html_print_table ($table); +} echo '<div class="action-buttons" style="width: '.$table->width.'">'; -if($id_cluster){ - echo "<input onclick='window.location.replace(\"index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_view&id=".$id_cluster."\");' type=button style='float:right;margin-left:20px;' name='store' class='sub upd' value='".__('Finish and view cluster')."'>"; +if (!isset($step) || $step!=5) { + if($id_cluster){ + echo "<input onclick='window.location.replace(\"index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_view&id=".$id_cluster."\");' type=button style='float:right;margin-left:20px;' name='store' class='sub upd' value='".__('Finish and view cluster')."'>"; + } + + + + html_print_submit_button (__('Add alert'), 'add', false, 'class="sub wand"'); + html_print_input_hidden ('create_alert', 1); + echo '</div></form>'; } - -html_print_submit_button (__('Add alert'), 'add', false, 'class="sub wand"'); -html_print_input_hidden ('create_alert', 1); -echo '</div></form>'; - ui_require_css_file ('cluetip'); ui_require_jquery_file ('cluetip'); ui_require_jquery_file ('pandora.controls');