From 96f77c75953639a6d0ed8dd21d50f8de6c3a3c6d Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 30 Dec 2015 11:16:11 +0100 Subject: [PATCH] Fixed the form to search modules in an agent. TICKET: #3071 --- .../godmode/agentes/configurar_agente.php | 20 +++++++++++-------- .../godmode/agentes/module_manager.php | 8 +++++--- .../operation/reporting/custom_reporting.php | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index fdb2ea0cbf..74adc895f7 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -190,12 +190,16 @@ if ($create_agent) { $id_agente = db_process_sql_insert ('tagente', array ('nombre' => $nombre_agente, 'direccion' => $direccion_agente, - 'id_grupo' => $grupo, 'intervalo' => $intervalo, - 'comentarios' => $comentarios, 'modo' => $modo, - 'id_os' => $id_os, 'disabled' => $disabled, + 'id_grupo' => $grupo, + 'intervalo' => $intervalo, + 'comentarios' => $comentarios, + 'modo' => $modo, + 'id_os' => $id_os, + 'disabled' => $disabled, 'cascade_protection' => $cascade_protection, 'server_name' => $server_name, - 'id_parent' => $id_parent, 'custom_id' => $custom_id, + 'id_parent' => $id_parent, + 'custom_id' => $custom_id, 'icon_path' => $icon_path, 'update_gis_data' => $update_gis_data, 'url_address' => $url_description, @@ -736,11 +740,11 @@ if ($update_agent) { // if modified some agent paramenter 'url_address' => $url_description, 'url_address' => $url_description, 'quiet' => $quiet); - + if ($config['metaconsole_agent_cache'] == 1) { $values['update_module_count'] = 1; // Force an update of the agent cache. } - + $result = db_process_sql_update ('tagente', $values, array ('id_agente' => $id_agente)); if ($result === false) { ui_print_error_message( @@ -838,7 +842,7 @@ if ($update_module || $create_module) { // Don't read as (float) because it lost it's decimals when put into MySQL // where are very big and PHP uses scientific notation, p.e: // 1.23E-10 is 0.000000000123 - + $post_process = (string) get_parameter ('post_process', 0.0); //$prediction_module = 0; @@ -1594,7 +1598,7 @@ switch ($tab) { // Control the tab and subtab hover. When mouse leave one, // check if is hover the other before hide the subtab $('.agent_wizard_tab').hover(agent_wizard_tab_show, agent_wizard_tab_hide); - + }); // Set the position and width of the subtab diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index cedc5b6f81..b935e26cc7 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -99,6 +99,8 @@ if (!isset($policy_page)) $show_creation = false; +echo ""; + if (($policy_page) || (isset($agent))) { if ($policy_page) { $show_creation = true; @@ -110,7 +112,7 @@ if (($policy_page) || (isset($agent))) { if ($show_creation) { // Create module/type combo - //echo '
'; + echo ''; echo ''; echo __("Type"); html_print_select ($modules, 'moduletype', '', '', '', '', false, false, false, '', false, 'max-width:300px;' ); @@ -120,12 +122,12 @@ if (($policy_page) || (isset($agent))) { echo ''; echo ''; echo ''; - //echo "
"; + echo ""; } } echo ""; -echo ""; + echo '
'; echo ""; diff --git a/pandora_console/operation/reporting/custom_reporting.php b/pandora_console/operation/reporting/custom_reporting.php index 555bd84c23..beb8bb4751 100644 --- a/pandora_console/operation/reporting/custom_reporting.php +++ b/pandora_console/operation/reporting/custom_reporting.php @@ -61,7 +61,7 @@ foreach ($reports as $report) { $data[2] = '' . html_print_image("images/reporting.png", true) . ''; $data[3] = '' . html_print_image("images/database_lightning.png", true) . ''; //I chose ajax.php because it's supposed to give XML anyway - + enterprise_hook ('load_custom_reporting_2'); array_push ($table->data, $data); }