From 67d1b9b75044a0cf4930a6c4a6e012fe3b35e888 Mon Sep 17 00:00:00 2001 From: slerena Date: Wed, 13 Apr 2011 15:12:40 +0000 Subject: [PATCH] 2011-04-13 Sancho Lerena * operation/servers/view_server_detail.php, godmode/servers/manage_recontask.php, godmode/servers/manage_recontask_form.php: Fixes bug #3286027. Also implement the new "manual" mode for recon tasks. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4210 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/godmode/servers/manage_recontask.php | 7 +++++-- pandora_console/godmode/servers/manage_recontask_form.php | 6 +++--- pandora_console/operation/servers/view_server_detail.php | 7 ++++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b027243f32..3bd34ede1d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-04-13 Sancho Lerena + + * operation/servers/view_server_detail.php, + godmode/servers/manage_recontask.php, + godmode/servers/manage_recontask_form.php: Fixes bug #3286027. Also implement + the new "manual" mode for recon tasks. + + 2011-04-13 Miguel de Dios * include/functions_graph.php, diff --git a/pandora_console/godmode/servers/manage_recontask.php b/pandora_console/godmode/servers/manage_recontask.php index 6a2b3baee1..255fa7f456 100644 --- a/pandora_console/godmode/servers/manage_recontask.php +++ b/pandora_console/godmode/servers/manage_recontask.php @@ -218,8 +218,11 @@ if ($result !== false) { } else { $data[5] = "-"; } - // INTEVAL - $data[6] =human_time_description_raw($row["interval_sweep"]); + // INTERVAL + if ($row["interval_sweep"]==0) + $data[6] = __("Manual"); + else + $data[6] =human_time_description_raw($row["interval_sweep"]); // PORTS if ($row["id_recon_script"] == 0){ diff --git a/pandora_console/godmode/servers/manage_recontask_form.php b/pandora_console/godmode/servers/manage_recontask_form.php index 3de8fa0298..af40b89776 100644 --- a/pandora_console/godmode/servers/manage_recontask_form.php +++ b/pandora_console/godmode/servers/manage_recontask_form.php @@ -13,7 +13,6 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. - // Load global vars global $config; @@ -56,10 +55,10 @@ if (isset ($_GET["update"])) { // Edit mode $network = ""; $description = ""; $id_recon_server = 0; - $interval = 43200; + $interval = 0; $id_group = 0; $create_incident = 1; - $snmp_community = "public"; + $snmp_community = "public"; $id_network_profile = 1; $id_os = -1; // Any $recon_ports = ""; // Any @@ -116,6 +115,7 @@ $table->data[3][1] = print_input_text ('network', $network, '', 25, 0, true); // Interval $values = array (); +$values[0] = __('Manual'); $values[3600] = __('%d hour', 1); $values[7200] = __('%d hours', 2); $values[21600] = __('%d hours', 6); diff --git a/pandora_console/operation/servers/view_server_detail.php b/pandora_console/operation/servers/view_server_detail.php index 816f4d1886..3012aa2211 100644 --- a/pandora_console/operation/servers/view_server_detail.php +++ b/pandora_console/operation/servers/view_server_detail.php @@ -103,7 +103,12 @@ foreach ($recon_tasks as $task) { $data[1] = ''. $task["name"].''; - $data[2] = human_time_description_raw ($task["interval_sweep"]); + if ($task["interval_sweep"] == 0){ + $data[2] = __("Manual"); + } + else { + $data[2] = human_time_description_raw ($task["interval_sweep"]); + } if ($task["id_recon_script"] == 0){ $data[3] = $task["subnet"];