From f3de10c345cb02049e3623eee4a188888ee8a650 Mon Sep 17 00:00:00 2001 From: cesar991 Date: Thu, 29 Sep 2016 13:30:19 +0200 Subject: [PATCH 1/2] Repair test D --- tests/console/Network_components.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/console/Network_components.py b/tests/console/Network_components.py index a2c28c5af6..6778b34193 100644 --- a/tests/console/Network_components.py +++ b/tests/console/Network_components.py @@ -174,7 +174,7 @@ class Network_components(PandoraWebDriverTestCase): """ driver = self.driver - + agent_name = gen_random_string(6) plugin_component_name = gen_random_string(6) @@ -207,14 +207,15 @@ class Network_components(PandoraWebDriverTestCase): time.sleep(3) Select(driver.find_element_by_id("network_component")).select_by_visible_text(plugin_component_name) - + + self.assertEqual("80" in driver.page_source,True) + driver.find_element_by_id("submit-crtbutton").click() - search_module (driver,agent_name,plugin_component_name,go_to_module=True) + search_module (driver,agent_name,plugin_component_name) - self.assertEqual("127.0.0.1" in driver.page_source,True) + self.assertEqual(plugin_component_name in driver.page_source,True) - self.assertEqual("80" in driver.page_source,True) if __name__ == "__main__": unittest2.main() From e48e1ddd7e0cfeb1b41d701e7441f98ffe18ed29 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 29 Sep 2016 14:30:07 +0200 Subject: [PATCH 2/2] ticket: 4069 add actions for defect in templates html #4069 --- .../alerts/configure_alert_template.php | 64 ++++++++++++++++--- 1 file changed, 55 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php index 34476b996f..a10ebe9b02 100644 --- a/pandora_console/godmode/alerts/configure_alert_template.php +++ b/pandora_console/godmode/alerts/configure_alert_template.php @@ -632,11 +632,13 @@ if ($step == 2) { $table->colspan['example'][1] = 4; } else if ($step == 3) { - $table->style[0] = 'font-weight: bold; vertical-align: top'; + $table->style[0] = 'font-weight: bold; vertical-align: middle'; $table->style[1] = 'font-weight: bold; vertical-align: top'; $table->style[2] = 'font-weight: bold; vertical-align: top'; $table->size = array (); - $table->size[0] = '20%'; + $table->size[0] = '10%'; + $table->size[1] = '45%'; + $table->size[2] = '45%'; /* Alert recover */ if (! $recovery_notify) { @@ -673,11 +675,36 @@ else if ($step == 3) { //$table->rowclass['field'.$i] = 'row_field'; - $table->data['field'.$i][0] = sprintf(__('Field %s'), $i) . - ui_print_help_icon ('alert_macros', true); - $table->data['field'.$i][1] = html_print_textarea('field'.$i, 1, 1, isset($fields[$i]) ? $fields[$i] : '', 'style="min-height:40px;" class="fields"', true); + + $table->data['field'.$i][0] = sprintf(__('Field %s'), $i) . ui_print_help_icon ('alert_macros', true); + //TinyMCE + //triggering fields + //basic + $table->data['field'.$i][1] = "
"; + $table->data['field'.$i][1] .= __('Basic') . "  "; + $table->data['field'.$i][1] .= html_print_radio_button_extended ('editor_type_value_'.$i, 0, '', false, false, "removeTinyMCE('textarea_field".$i."')", '', true); + //Advanced + $table->data['field'.$i][1] .= "    "; + $table->data['field'.$i][1] .= __('Advanced') . "  "; + $table->data['field'.$i][1] .= html_print_radio_button_extended ('editor_type_value_'.$i, 0, '', true, false, "addTinyMCE('textarea_field".$i."')", '', true); + $table->data['field'.$i][1] .= "
"; + + //Texarea + $table->data['field'.$i][1] .= html_print_textarea('field'.$i, 1, 1, isset($fields[$i]) ? $fields[$i] : '', 'style="min-height:40px;" class="fields"', true); + // Recovery - $table->data['field'.$i][2] = html_print_textarea ('field'.$i.'_recovery', 1, 1, isset($fields_recovery[$i]) ? $fields_recovery[$i] : '', 'style="min-height:40px" class="fields"', true); + //basic + $table->data['field'.$i][2] = "
"; + $table->data['field'.$i][2] .= __('Basic') . "  "; + $table->data['field'.$i][2] .= html_print_radio_button_extended ('editor_type_recovery_value_'.$i, 0, '', false, false, "removeTinyMCE('textarea_field".$i."_recovery')", '', true); + //advanced + $table->data['field'.$i][2] .= "    "; + $table->data['field'.$i][2] .= __('Advanced') . "  "; + $table->data['field'.$i][2] .= html_print_radio_button_extended ('editor_type_recovery_value_'.$i, 0, '', true, false, "addTinyMCE('textarea_field".$i."_recovery')", '', true); + $table->data['field'.$i][2] .= "
"; + + //Texarea + $table->data['field'.$i][2] .= html_print_textarea ('field'.$i.'_recovery', 1, 1, isset($fields_recovery[$i]) ? $fields_recovery[$i] : '', 'style="min-height:40px" class="fields"', true); } } else { @@ -804,6 +831,7 @@ enterprise_hook('close_meta_frame'); ui_require_javascript_file ('pandora_alerts'); ui_include_time_picker(); ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascript/i18n/"); +ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/'); ?>