From a5a80b9718ed75a660482517ccbc94b411a99316 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Fri, 30 May 2014 11:33:10 +0000 Subject: [PATCH] 2014-05-30 Sergio Martin * godmode/servers/manage_recontask_form.php: Changed the recon task interval control to be more user friendly improving usability for manual intervals choices. Ticket #839 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10049 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 +++++ .../godmode/servers/manage_recontask_form.php | 26 ++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c47275b365..ec3b180d87 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2014-05-30 Sergio Martin + + * godmode/servers/manage_recontask_form.php: Changed the recon task + interval control to be more user friendly improving usability + for manual intervals choices. Ticket #839 + 2014-05-30 Hirofumi Kosaka * include/javascript/jquery.pandora.controls.js, diff --git a/pandora_console/godmode/servers/manage_recontask_form.php b/pandora_console/godmode/servers/manage_recontask_form.php index 1e034d1c72..45964ba9a0 100644 --- a/pandora_console/godmode/servers/manage_recontask_form.php +++ b/pandora_console/godmode/servers/manage_recontask_form.php @@ -197,8 +197,15 @@ $table->data[3][1] = html_print_input_text ('network', $network, '', 25, 0, true $table->data[4][0] = "".__('Interval'); -$table->data[4][1] = html_print_extended_select_for_time ('interval' , $interval, '', '', '0', false, true, false, false); +$table->data[4][0] .= ui_print_help_tip (__('Manual interval means that it will be executed only On-demand'), true); + +$values = array (0 => __('Defined'), 1 => __('Manual')); +$table->data[4][1] = html_print_select ($values, "interval_manual_defined", (int)($interval == 0), '','','',true); + +$table->data[4][1] .= ''; +$table->data[4][1] .= html_print_extended_select_for_time ('interval' , $interval, '', '', '0', false, true, false, false); $table->data[4][1] .= ui_print_help_tip (__('The minimum recomended interval for Recon Task is 5 minutes'), true); +$table->data[4][1] .= ''; // Module template @@ -344,6 +351,23 @@ $(document).ready (function () { }); }); +$("#interval_manual_defined").change(function() { + if ($("#interval_manual_defined").val() == 1) { + $('#interval_manual_container').css('visibility', 'hidden'); + $('#text-interval_text').val('0'); + $('#hidden-interval').val('0'); + } + else { + $('#interval_manual_container').css('visibility', ''); + $('#text-interval_text').val('10'); + $('#hidden-interval').val('600'); + $('#interval_units').val('60'); + } +}); + +$("#interval_manual_defined").trigger('change'); + + function get_explanation_recon_script(id) { jQuery.post ("ajax.php", {"page" : "godmode/servers/manage_recontask_form",