From 60f9483e79bdbf13fb3857511716db36b24b23eb Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 19 Nov 2018 11:54:35 +0100 Subject: [PATCH 001/262] mandatory public_url if is set --- pandora_console/include/functions_ui.php | 45 ++++++++++++++---------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 7d02e1ac11..76ce70f59b 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2407,29 +2407,38 @@ function ui_get_full_url ($url = '', $no_proxy = false, $add_name_php_file = fal $port = $_SERVER['SERVER_PORT']; } } - - if (!$no_proxy) { - //Check if the PandoraFMS runs across the proxy like as - //mod_proxy of Apache - //and check if public_url is setted - if (!empty($config['public_url']) - && (!empty($_SERVER['HTTP_X_FORWARDED_HOST']))) { - $fullurl = $config['public_url']; - $proxy = true; + + if (!empty($config['public_url'])) { + $fullurl = $config['public_url']; + // if user had specify a custom public_url, disable internal homeurl & homeurl_static + $config['homeurl'] = ''; + $config['homeurl_static'] = ''; + + } else { + + if (!$no_proxy) { + //Check if the PandoraFMS runs across the proxy like as + //mod_proxy of Apache + //and check if public_url is set + if (!empty($config['public_url']) + && (!empty($_SERVER['HTTP_X_FORWARDED_HOST']))) { + $fullurl = $config['public_url']; + $proxy = true; + } + else { + $fullurl = $protocol.'://' . $_SERVER['SERVER_NAME']; + } } else { $fullurl = $protocol.'://' . $_SERVER['SERVER_NAME']; } - } - else { - $fullurl = $protocol.'://' . $_SERVER['SERVER_NAME']; - } - - // using a different port than the standard - if (!$proxy) { + // using a different port than the standard - if ( $port != null ) { - $fullurl .= ":" . $port; + if (!$proxy) { + // using a different port than the standard + if ( $port != null ) { + $fullurl .= ":" . $port; + } } } From b90da54c8621eec98d991ccbf5499eddaeffe57c Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 19 Nov 2018 13:16:53 +0100 Subject: [PATCH 002/262] fixed public_url mandatory in MC environments --- pandora_console/include/functions_ui.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 76ce70f59b..40236629f2 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2410,9 +2410,7 @@ function ui_get_full_url ($url = '', $no_proxy = false, $add_name_php_file = fal if (!empty($config['public_url'])) { $fullurl = $config['public_url']; - // if user had specify a custom public_url, disable internal homeurl & homeurl_static - $config['homeurl'] = ''; - $config['homeurl_static'] = ''; + $proxy = true; } else { From 08ea1b22837c95e4ee1aa53a3e4bb9db55c93b05 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 19 Nov 2018 14:15:34 +0100 Subject: [PATCH 003/262] minor fix ui_get_full_url --- pandora_console/include/functions_ui.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 40236629f2..cba6670e4c 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2411,7 +2411,7 @@ function ui_get_full_url ($url = '', $no_proxy = false, $add_name_php_file = fal if (!empty($config['public_url'])) { $fullurl = $config['public_url']; $proxy = true; - + $fullurl .= '/'; } else { if (!$no_proxy) { From 932802acb49e326e0c73ba4bb0a53b465b7735d0 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Thu, 28 Mar 2019 15:16:09 +0100 Subject: [PATCH 004/262] Fixed netflow reports resolution Former-commit-id: f49404e7c1129344df026a81e4059e9276acf9eb --- pandora_console/include/functions_netflow.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_netflow.php b/pandora_console/include/functions_netflow.php index 69aa0a1608..f1febb5c41 100644 --- a/pandora_console/include/functions_netflow.php +++ b/pandora_console/include/functions_netflow.php @@ -35,8 +35,8 @@ define('NETFLOW_RES_LOWD', 6); define('NETFLOW_RES_MEDD', 12); define('NETFLOW_RES_HID', 24); define('NETFLOW_RES_ULTRAD', 30); -define('NETFLOW_RES_HOURLY', 'hourly'); -define('NETFLOW_RES_DAILY', 'daily'); +define('NETFLOW_RES_HOURLY', -1); +define('NETFLOW_RES_DAILY', -2); define('NETFLOW_MAX_DATA_CIRCULAR_MESH', 10000); @@ -473,7 +473,7 @@ function netflow_get_data( // Put all points into an array. $intervals = [($start_date - $multiplier_time)]; - while ((end($intervals) < $end_date) === true) { + while (($next = (end($intervals) + $multiplier_time) < $end_date) === true) { $intervals[] = (end($intervals) + $multiplier_time); } From 74d64db497abc980379c2efbdee884c2cb56ef30 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Mon, 8 Apr 2019 15:29:02 +0200 Subject: [PATCH 005/262] change name label from functions_visual_map_editor.php Former-commit-id: 9dd7f0c86268d9657b6054fca109aefb18020962 --- pandora_console/include/functions_visual_map_editor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 151014cd01..3cb5c215ba 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -1245,7 +1245,7 @@ function visual_map_editor_print_toolbox() } echo '
'; - visual_map_print_button_editor('static_graph', __('Static Graph'), 'left', false, 'camera_min', true); + visual_map_print_button_editor('static_graph', __('Static Image'), 'left', false, 'camera_min', true); visual_map_print_button_editor('percentile_item', __('Percentile Item'), 'left', false, 'percentile_item_min', true); visual_map_print_button_editor('module_graph', __('Module Graph'), 'left', false, 'graph_min', true); visual_map_print_button_editor('donut_graph', __('Serialized pie graph'), 'left', false, 'donut_graph_min', true); From 550eb3cd3e8fd9699b0cb35eccb3ff0fd0768952 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Mon, 8 Apr 2019 15:30:07 +0200 Subject: [PATCH 006/262] change name label from visual_console_builder.elements.php Former-commit-id: 71201d54200624452c4dd75231894d4cd4e29031 --- .../godmode/reporting/visual_console_builder.elements.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index d2849ce5e0..720bb57a1c 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -171,7 +171,7 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)]['icon'] = html_print_image( 'images/camera.png', true, - ['title' => __('Static Graph')] + ['title' => __('Static Image')] ); break; From 4d98db86e711eb13baeb9767f1fa60c5a7dc7682 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Mon, 8 Apr 2019 15:30:48 +0200 Subject: [PATCH 007/262] change name label from functions_visual_map.php Former-commit-id: c6bf206301662993be9f41f1d1259e1373060776 --- pandora_console/include/functions_visual_map.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 5344eb15ee..0d3180fcf3 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -4241,7 +4241,7 @@ function visual_map_create_internal_name_item($label=null, $type, $image, $agent case 'static_graph': case STATIC_GRAPH: - $text = __('Static graph').' - '.$image; + $text = __('Static Image').' - '.$image; break; case 'simple_value': From 7a1a6822489ba03907c11119869d330d0a778a87 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Fri, 12 Apr 2019 13:09:26 +0200 Subject: [PATCH 008/262] Added advice when a primary group will be selected when is currentl a secondary group Former-commit-id: ca23bc1f24b901c2300385ee6d3468dc5059d51d --- pandora_console/godmode/agentes/agent_manager.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index a7fc1f156a..9996d0946e 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -999,6 +999,19 @@ ui_require_jquery_file('bgiframe'); } $(document).ready (function() { + + var previous_primary_group_select; + $("#grupo").on('focus', function () { + previous_primary_group_select = this.value; + }).change(function() { + if ($("#secondary_groups_selected option[value="+$("#grupo").val()+"]").length) { + alert(""); + $("#grupo").val(previous_primary_group_select); + } else { + previous_primary_group_select = this.value; + } + }); + $("select#id_os").pandoraSelectOS (); var checked = $("#checkbox-cascade_protection").is(":checked"); From bac1e44608283f0f09fdb092ae00389399b62816 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 16 Apr 2019 12:37:06 +0200 Subject: [PATCH 009/262] Removed autofill proxi in auth server Former-commit-id: 448622c39e6697ead1a3a515da3e573abfc0384d --- .../godmode/agentes/configurar_agente.php | 198 ++++++++++-------- pandora_console/include/constants.php | 6 + 2 files changed, 113 insertions(+), 91 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index dd7fad8fe8..9a6fdae246 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -23,10 +23,10 @@ ui_require_javascript_file('encode_decode_base64'); check_login(); -// Get tab parameter to check ACL in each tabs +// Get tab parameter to check ACL in each tabs. $tab = get_parameter('tab', 'main'); -// See if id_agente is set (either POST or GET, otherwise -1 +// See if id_agente is set (either POST or GET, otherwise -1. $id_agente = (int) get_parameter('id_agente'); $group = 0; $all_groups = [$group]; @@ -46,6 +46,7 @@ if (!check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) { break; default: + // Default. break; } @@ -63,11 +64,11 @@ require_once 'include/functions_modules.php'; require_once 'include/functions_alerts.php'; require_once 'include/functions_reporting.php'; -// Get passed variables +// Get passed variables. $alerttype = get_parameter('alerttype'); $id_agent_module = (int) get_parameter('id_agent_module'); -// Init vars +// Init vars. $descripcion = ''; $comentarios = ''; $campo_1 = ''; @@ -137,7 +138,7 @@ $alert_priority = 0; $server_name = ''; $grupo = 0; $id_os = 9; -// Windows +// Windows. $custom_id = ''; $cascade_protection = 0; $cascade_protection_modules = 0; @@ -156,7 +157,7 @@ $cps = 0; $create_agent = (bool) get_parameter('create_agent'); $module_macros = []; -// Create agent +// Create agent. if ($create_agent) { $mssg_warning = 0; $alias_safe_output = io_safe_output(get_parameter('alias', '')); @@ -165,14 +166,14 @@ if ($create_agent) { $direccion_agente = (string) get_parameter_post('direccion', ''); $unique_ip = (int) get_parameter_post('unique_ip', 0); - // safe_output only validate ip + // Safe_output only validate ip. $direccion_agente = trim(io_safe_output($direccion_agente)); if (!validate_address($direccion_agente)) { $mssg_warning = 1; } - // safe-input before validate ip + // Safe-input before validate ip. $direccion_agente = io_safe_input($direccion_agente); $nombre_agente = hash('sha256', $alias.'|'.$direccion_agente.'|'.time().'|'.sprintf('%04d', rand(0, 10000))); @@ -208,7 +209,7 @@ if ($create_agent) { $field_values[$field['id_field']] = (string) get_parameter_post('customvalue_'.$field['id_field'], ''); } - // Check if agent exists (BUG WC-50518-2) + // Check if agent exists (BUG WC-50518-2). if ($alias == '') { $agent_creation_error = __('No agent alias specified'); $agent_created_ok = 0; @@ -256,7 +257,7 @@ if ($create_agent) { } if ($id_agente !== false) { - // Create custom fields for this agent + // Create custom fields for this agent. foreach ($field_values as $key => $value) { $update_custom = db_process_sql_insert( 'tagent_custom_data', @@ -268,7 +269,7 @@ if ($create_agent) { ); } - // Create address for this agent in taddress + // Create address for this agent in taddress. if ($direccion_agente != '') { agents_add_address($id_agente, $direccion_agente); } @@ -311,7 +312,7 @@ if ($create_agent) { "Quiet":"'.(int) $quiet.'", "Cps":"'.(int) $cps.'"}'; - // Create the secondary groups + // Create the secondary groups. enterprise_hook( 'agents_update_secondary_groups', [ @@ -341,14 +342,14 @@ if ($create_agent) { } } -// Show tabs +// Show tabs. $img_style = [ 'class' => 'top', 'width' => 16, ]; if ($id_agente) { - // View tab + // View tab. $viewtab['text'] = ''.html_print_image('images/operation.png', true, ['title' => __('View')]).''; if ($tab == 'view') { @@ -359,7 +360,7 @@ if ($id_agente) { $viewtab['operation'] = 1; - // Main tab + // Main tab. $maintab['text'] = ''.html_print_image('images/gm_setup.png', true, ['title' => __('Setup')]).''; if ($tab == 'main') { $maintab['active'] = true; @@ -367,7 +368,7 @@ if ($id_agente) { $maintab['active'] = false; } - // Module tab + // Module tab. $moduletab['text'] = ''.html_print_image('images/gm_modules.png', true, ['title' => __('Modules')]).''; if ($tab == 'module') { @@ -376,7 +377,7 @@ if ($id_agente) { $moduletab['active'] = false; } - // Alert tab + // Alert tab. $alerttab['text'] = ''.html_print_image('images/gm_alerts.png', true, ['title' => __('Alerts')]).''; if ($tab == 'alert') { @@ -385,7 +386,7 @@ if ($id_agente) { $alerttab['active'] = false; } - // Template tab + // Template tab. $templatetab['text'] = ''.html_print_image('images/templates.png', true, ['title' => __('Module templates')]).''; if ($tab == 'template') { @@ -395,7 +396,7 @@ if ($id_agente) { } - // Inventory + // Inventory. $inventorytab = enterprise_hook('inventory_tab'); if ($inventorytab == -1) { @@ -412,7 +413,7 @@ if ($id_agente) { } if ($has_remote_conf === true) { - // Plugins + // Plugins. $pluginstab = enterprise_hook('plugins_tab'); if ($pluginstab == -1) { $pluginstab = ''; @@ -421,21 +422,21 @@ if ($id_agente) { $pluginstab = ''; } - // Collection + // Collection. $collectiontab = enterprise_hook('collection_tab'); if ($collectiontab == -1) { $collectiontab = ''; } - // Group tab + // Group tab. $grouptab['text'] = ''.html_print_image('images/group.png', true, [ 'title' => __('Group')]).''; $grouptab['active'] = false; $gistab = []; - // GIS tab + // GIS tab. if ($config['activate_gis']) { $gistab['text'] = ''.html_print_image('images/gm_gis.png', true, [ 'title' => __('GIS data')]).''; @@ -446,10 +447,10 @@ if ($id_agente) { } } - // Agent wizard tab + // Agent wizard tab. $agent_wizard['text'] = ''.html_print_image('images/wand_agent.png', true, [ 'title' => __('Agent wizard')]).''; - // Hidden subtab layer + // Hidden subtab layer. $agent_wizard['sub_menu'] = '
'; echo '
'; echo '

Remaining attempts: '.$attemps.'

'; - echo '
'; + echo ''; echo '
'; html_print_submit_button('Ok', 'hide-login-error', false); echo '
'; From 105695f1bd039abe2ef0f8aeb43037a531e784c1 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Fri, 17 May 2019 18:29:38 +0200 Subject: [PATCH 015/262] Added notification for serialize_precicion value --- .../include/class/ConsoleSupervisor.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 7259287d68..d9bea3ffbe 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -1233,6 +1233,7 @@ class ConsoleSupervisor $PHPdisable_functions = ini_get('disable_functions'); $PHPupload_max_filesize_min = config_return_in_bytes('800M'); $PHPmemory_limit_min = config_return_in_bytes('500M'); + $PHPSerialize_precision = ini_get('serialize_precision'); // PhantomJS status. $result_ejecution = exec($config['phantomjs_bin'].'/phantomjs --version'); @@ -1408,6 +1409,30 @@ class ConsoleSupervisor } else { $this->cleanNotifications('NOTIF.PHP.VERSION'); } + + if ($PHPSerialize_precision != -1) { + $url = 'https://www.php.net/manual/en/ini.core.php#ini.serialize-precision'; + if ($config['language'] == 'es') { + $url = 'https://www.php.net/manual/es/ini.core.php#ini.serialize-precision'; + } + + $this->notify( + [ + 'type' => 'NOTIF.PHP.SERIALIZE_PRECISION', + 'title' => sprintf( + __("Not recommended '%s' value in PHP configuration"), + 'serialze_precision' + ), 'message' => sprintf( + __('Recommended value is: %s'), + sprintf('-1') + ).'

'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator'), + 'url' => $url, + ] + ); + } else { + $this->cleanNotifications('NOTIF.PHP.VERSION'); + } + } From 2b59f3e184ff98be02f880d53a8aaae22c8dc4e2 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 13 Jun 2019 17:06:43 +0200 Subject: [PATCH 016/262] Changed Ignore Time texto to Scheduled shutdown fms --- pandora_console/include/functions_reporting_html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 10bef8631f..f0f3a1c168 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -753,7 +753,7 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0) $table1->size[10] = '2%'; $table1->data[0][10] = ''; $table1->size[11] = '15%'; - $table1->data[0][11] = ''.__('Ignore time').''; + $table1->data[0][11] = ''.__('Scheduled shutdown').''; if ($pdf === 0) { $table->colspan['legend']['cell'] = 2; @@ -3335,7 +3335,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0) $table2->size[10] = '2%'; $table2->data[0][10] = ''; $table2->size[11] = '15%'; - $table2->data[0][11] = ''.__('Ignore time').''; + $table2->data[0][11] = ''.__('Scheduled shutdown').''; } if ($pdf !== 0) { From f1700fa927e052d121194f571d8289dd21759f08 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 13 Jun 2019 17:21:33 +0200 Subject: [PATCH 017/262] Changed Ignore time to Scheduled shutdown fms --- pandora_console/include/functions_reporting_html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 10bef8631f..f0f3a1c168 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -753,7 +753,7 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0) $table1->size[10] = '2%'; $table1->data[0][10] = ''; $table1->size[11] = '15%'; - $table1->data[0][11] = ''.__('Ignore time').''; + $table1->data[0][11] = ''.__('Scheduled shutdown').''; if ($pdf === 0) { $table->colspan['legend']['cell'] = 2; @@ -3335,7 +3335,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0) $table2->size[10] = '2%'; $table2->data[0][10] = ''; $table2->size[11] = '15%'; - $table2->data[0][11] = ''.__('Ignore time').''; + $table2->data[0][11] = ''.__('Scheduled shutdown').''; } if ($pdf !== 0) { From 2fe0d22d7dfd692660352aa7a4d9baae53d2617c Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 13 Jun 2019 17:27:49 +0200 Subject: [PATCH 018/262] x --- .../visual_console_builder.editor.js | 97 +++++++++++++++++-- 1 file changed, 88 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index e5f1377be1..85cbd9be5e 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -1,3 +1,5 @@ +/* globals $ */ + // Pandora FMS - http://pandorafms.com // ================================================== // Copyright (c) 2005-2009 Artica Soluciones Tecnologicas @@ -31,6 +33,8 @@ var SIZE_GRID = 16; //Const the size (for width and height) of grid. var img_handler_start; var img_handler_end; +var default_cache_expiration = null; + function toggle_advance_options_palette(close) { if ($("#advance_options").css("display") == "none") { $("#advance_options").css("display", ""); @@ -679,12 +683,17 @@ function update_button_palette_callback() { return false; } } - if (values["module"] == 0) { + var radio_value = $("input[name='radio_choice']:checked").val(); + if (values["agent"] == "" && radio_value == "module_graph") { + dialog_message("#message_alert_no_agent"); + return false; + } + if (values["module"] == 0 && radio_value == "module_graph") { dialog_message("#message_alert_no_module"); return false; } - if (values["agent"] == "") { - dialog_message("#message_alert_no_agent"); + if (values["id_custom_graph"] == 0 && radio_value == "custom_graph") { + dialog_message("#message_alert_no_custom_graph"); return false; } if ($("input[name=width_module_graph]").val() == "") { @@ -1095,10 +1104,11 @@ function readFields() { var text = tinymce.get("text-label").getContent(); values["label"] = text; + values["percentile_label_color"] = $( + "input[name=percentile_label_color]" + ).val(); + if ($("input[name=percentile_label]").val().length > 0) { - values["percentile_label_color"] = $( - "input[name=percentile_label_color]" - ).val(); values["label"] = " Date: Fri, 14 Jun 2019 09:25:51 +0200 Subject: [PATCH 019/262] Changed Scheduled shutdown to Planned Downtime on fms --- pandora_console/include/functions_reporting_html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index f0f3a1c168..711c038cbc 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -753,7 +753,7 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0) $table1->size[10] = '2%'; $table1->data[0][10] = ''; $table1->size[11] = '15%'; - $table1->data[0][11] = ''.__('Scheduled shutdown').''; + $table1->data[0][11] = ''.__('Planned Downtime').''; if ($pdf === 0) { $table->colspan['legend']['cell'] = 2; @@ -3335,7 +3335,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0) $table2->size[10] = '2%'; $table2->data[0][10] = ''; $table2->size[11] = '15%'; - $table2->data[0][11] = ''.__('Scheduled shutdown').''; + $table2->data[0][11] = ''.__('Planned Downtime').''; } if ($pdf !== 0) { From f7f81f534434bb254a2fb4265a3bd77fcf7dc482 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Fri, 21 Jun 2019 16:26:13 +0200 Subject: [PATCH 020/262] Custom fields url improved --- pandora_console/include/functions_ui.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index c81148b9c9..c6806da2c8 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -48,15 +48,18 @@ if (isset($config['homedir'])) { */ function ui_bbcode_to_html($text, $allowed_tags=['[url]']) { - $return = $text; + $return = io_safe_output($text); if (array_search('[url]', $allowed_tags) !== false) { - $return = preg_replace( - '/\[url=([^\]]*)\]/', - '', - $return - ); - $return = str_replace('[/url]', '', $return); + // If link hasn't http, add it. + if (preg_match('/https?:\/\//', $return)) { + $html_bbcode = '$2'; + } else { + $html_bbcode = '$2'; + } + + // Replace bbcode format [url=www.example.org] String [/url] with or without http and slashes + $return = preg_replace('/\[url(?|](((?:https?:\/\/)?[^[]+))|(?:=[\'"]?((?:https?:\/\/)?[^]]+?)[\'"]?)](.+?))\[\/url]/', $html_bbcode, $return); } return $return; From 04d3f315b0b9a6c4489b242896fd5965ed541b04 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Tue, 25 Jun 2019 15:19:40 +0200 Subject: [PATCH 021/262] Added selector for all or common modules- #2140 --- .../godmode/agentes/agent_manager.php | 12 ++++++++- .../agent_wizard.snmp_interfaces_explorer.php | 27 ++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 7c6a3ab03b..f62354d910 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -77,6 +77,7 @@ if (is_ajax()) { } $get_modules_json_for_multiple_snmp = (bool) get_parameter('get_modules_json_for_multiple_snmp', 0); + $get_common_modules = (bool) get_parameter('get_common_modules', 1); if ($get_modules_json_for_multiple_snmp) { include_once 'include/graphs/functions_utils.php'; @@ -100,7 +101,16 @@ if (is_ajax()) { if ($out === false) { $out = $oid_snmp; } else { - $out = array_intersect($out, $oid_snmp); + $commons = array_intersect($out, $oid_snmp); + if ($get_common_modules) { + // Common modules is selected (default) + $out = $commons; + } else { + // All modules is selected + $array1 = array_diff($out, $oid_snmp); + $array2 = array_diff($oid_snmp, $out); + $out = array_merge($commons, $array1, $array2); + } } $oid_snmp = []; diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php index b08dc62c4f..33279059ea 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php @@ -583,7 +583,24 @@ if (!empty($interfaces_list)) { $table->data[0][2] = ''.__('Modules').''; $table->data[1][0] = html_print_select($interfaces_list, 'id_snmp[]', 0, false, '', '', true, true, true, '', false, 'width:500px; overflow: auto;'); - $table->data[1][1] = html_print_image('images/darrowright.png', true); + + $table->data[1][1] = __('When selecting interfaces'); + $table->data[1][1] .= '
'; + $table->data[1][1] .= html_print_select( + [ + 1 => __('Show common modules'), + 0 => __('Show all modules'), + ], + 'modules_selection_mode', + 1, + false, + '', + '', + true, + false, + false + ); + $table->data[1][2] = html_print_select([], 'module[]', 0, false, '', 0, true, true, true, '', false, 'width:200px;'); $table->data[1][2] .= html_print_input_hidden('agent', $id_agent, true); @@ -628,10 +645,17 @@ $(document).ready (function () { $("#no_snmp").hide (); $("#form_interfaces").hide (); }); + + // When select interfaces changes + $("#modules_selection_mode").change (function() { + $("#id_snmp").trigger('change'); + }); + }); function snmp_changed_by_multiple_snmp (event, id_snmp, selected) { var idSNMP = Array(); + var get_common_modules = $("#modules_selection_mode option:selected").val(); jQuery.each ($("#id_snmp option:selected"), function (i, val) { idSNMP.push($(val).val()); @@ -643,6 +667,7 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) { jQuery.post ('ajax.php', {"page" : "godmode/agentes/agent_manager", "get_modules_json_for_multiple_snmp": 1, + "get_common_modules" : get_common_modules, "id_snmp[]": idSNMP, "id_snmp_serialize": $("#hidden-id_snmp_serialize").val() }, From 77419ee70981894effaf89914b729351b1eb6456 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 27 Jun 2019 09:05:22 +0200 Subject: [PATCH 022/262] Modified jquery window function --- pandora_console/operation/users/webchat.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/users/webchat.php b/pandora_console/operation/users/webchat.php index db97864863..3de302b0be 100644 --- a/pandora_console/operation/users/webchat.php +++ b/pandora_console/operation/users/webchat.php @@ -120,11 +120,10 @@ echo "
".html_print_button( init_webchat(); }); - - $(window).unload(function () { + $(window).on("beforeunload",function () { exit_webchat(); }); - + function init_webchat() { send_login_message(); long_polling_check_messages(); @@ -305,6 +304,7 @@ echo "
".html_print_button( data: parameters, dataType: "json", success: function(data) { + console.log(data); } }); } From 0e1ad434222ca243a26b05a48c4e0433b9cdd666 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 27 Jun 2019 09:33:31 +0200 Subject: [PATCH 023/262] Update webchat.php. Forgotten console log --- pandora_console/operation/users/webchat.php | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_console/operation/users/webchat.php b/pandora_console/operation/users/webchat.php index 3de302b0be..4492c9703c 100644 --- a/pandora_console/operation/users/webchat.php +++ b/pandora_console/operation/users/webchat.php @@ -304,7 +304,6 @@ echo "
".html_print_button( data: parameters, dataType: "json", success: function(data) { - console.log(data); } }); } From 1ffb435d5a5e8f1256e52f259ec2a766ae28db88 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Thu, 27 Jun 2019 09:48:37 +0200 Subject: [PATCH 024/262] Fixed wrong img paths --- pandora_console/include/styles/js/cluetip.css | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/styles/js/cluetip.css b/pandora_console/include/styles/js/cluetip.css index 233dbf3cbb..a1360b0afe 100644 --- a/pandora_console/include/styles/js/cluetip.css +++ b/pandora_console/include/styles/js/cluetip.css @@ -2,19 +2,23 @@ #cluetip-close img { border: 0; } + #cluetip-title { overflow: hidden; } + #cluetip-title #cluetip-close { float: right; position: relative; } + #cluetip-waitimage { width: 43px; height: 11px; position: absolute; background-image: url(../../../images/wait.gif); } + .cluetip-arrows { display: none; position: absolute; @@ -25,9 +29,11 @@ background-repeat: no-repeat; background-position: 0 0; } + #cluetip-extra { display: none; } + /*************************************** =cluetipClass: 'default' -------------------------------------- */ @@ -36,11 +42,13 @@ background-color: #fff; text-align: left; } + .cluetip-default #cluetip-outer { position: relative; margin: 0; background-color: #fff; } + .cluetip-default h3 { margin: 0 0 5px; padding: 8px 10px 4px; @@ -49,6 +57,7 @@ background-color: #b1b1b1; color: #fff; } + .cluetip-default h3#cluetip-title { display: none; height: 0px; @@ -56,41 +65,49 @@ padding: 0; color: #fff; } + .cluetip-default #cluetip-title a { color: #fff; font-size: 0.95em; } + .cluetip-default #cluetip-inner { padding: 10px; } + .cluetip-default div#cluetip-close { text-align: right; margin: 0 5px 5px; color: #900; } + .cluetip-default ul { text-align: left; } + /* default arrows */ .clue-right-default .cluetip-arrows { - background-image: url(../../images/darrowleft.png); + background-image: url(../../../images/darrowleft.png); } + .clue-left-default .cluetip-arrows { - background-image: url(../../images/darrowright.png); + background-image: url(../../../images/darrowright.png); left: 100%; margin-right: -11px; } + .clue-top-default .cluetip-arrows { - background-image: url(../../images/darrowdown.png); + background-image: url(../../../images/darrowdown.png); top: 100%; left: 50%; margin-left: -11px; height: 11px; width: 22px; } + .clue-bottom-default .cluetip-arrows { - background-image: url(../../images/darrowup.png); + background-image: url(../../../images/darrowup.png); top: -11px; left: 50%; margin-left: -11px; From a2877b46f336b4b674549b6223dfa302bbdab119 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 27 Jun 2019 14:58:57 +0200 Subject: [PATCH 025/262] Solved wrong variable rewriting --- .../godmode/reporting/reporting_builder.item_editor.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index a5e59e46ce..211385cac8 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -847,7 +847,10 @@ $class = 'databox filters'; } ?> '.html_print_image('images/tip.png', true, ['title' => $text]).''; ?> From 411e62fb0dd8451437b75beb6d9a6a197653ef45 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 27 Jun 2019 16:38:00 +0200 Subject: [PATCH 026/262] Changed link to Discovery task list and added ui_get_full_url function over other links --- .../godmode/servers/servers.build_table.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index aa2f0a0735..f0e2a4ad08 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -152,12 +152,12 @@ foreach ($servers as $server) { $data[8] = ''; if ($server['type'] == 'recon') { - $data[8] .= ''; + $data[8] .= ''; $data[8] .= html_print_image( 'images/firts_task/icono_grande_reconserver.png', true, [ - 'title' => __('Manage recon tasks'), + 'title' => __('Manage Discovery tasks'), 'style' => 'width:21px;height:21px;', ] ); @@ -165,7 +165,7 @@ foreach ($servers as $server) { } if ($server['type'] == 'data') { - $data[8] .= ''; + $data[8] .= ''; $data[8] .= html_print_image( 'images/target.png', true, @@ -173,7 +173,7 @@ foreach ($servers as $server) { ); $data[8] .= ''; } else if ($server['type'] == 'enterprise snmp') { - $data[8] .= ''; + $data[8] .= ''; $data[8] .= html_print_image( 'images/target.png', true, @@ -182,7 +182,7 @@ foreach ($servers as $server) { $data[8] .= ''; } - $data[8] .= ''; + $data[8] .= ''; $data[8] .= html_print_image( 'images/config.png', true, @@ -191,7 +191,7 @@ foreach ($servers as $server) { $data[8] .= ''; if (($names_servers[$safe_server_name] === true) && ($server['type'] == 'data' || $server['type'] == 'enterprise satellite')) { - $data[8] .= ''; + $data[8] .= ''; $data[8] .= html_print_image( 'images/remote_configuration.png', true, @@ -201,7 +201,7 @@ foreach ($servers as $server) { $names_servers[$safe_server_name] = false; } - $data[8] .= ''; + $data[8] .= ''; $data[8] .= html_print_image( 'images/cross.png', true, From 25e5f0914ac5eb33595b20b1e18c5ae1f1e70b41 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 27 Jun 2019 16:58:48 +0200 Subject: [PATCH 027/262] Added delete_files entry for recon view deletion --- pandora_console/extras/delete_files/delete_files.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 pandora_console/extras/delete_files/delete_files.txt diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt new file mode 100644 index 0000000000..c0d8f0a9db --- /dev/null +++ b/pandora_console/extras/delete_files/delete_files.txt @@ -0,0 +1 @@ +operation/servers/recon_view.php \ No newline at end of file From 03edb75b7c1d9d16f2215b249c7581e5a1d95c79 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 27 Jun 2019 17:19:48 +0200 Subject: [PATCH 028/262] Modified agent alias name --- pandora_console/godmode/servers/plugin.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index a7fc94bcca..3eb385332c 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -70,7 +70,7 @@ if (is_ajax()) { $table->head[0] = __('Agent'); $table->head[1] = __('Module'); foreach ($modules as $mod) { - $agent_name = ''.modules_get_agentmodule_agent_name( + $agent_name = ''.modules_get_agentmodule_agent_alias( $mod['id_agente_modulo'] ).''; @@ -1215,4 +1215,3 @@ ui_require_javascript_file('pandora_modules'); - From 03842df33e3b7afc549e44b8ecca6549a4ef00a0 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 28 Jun 2019 11:19:13 +0200 Subject: [PATCH 029/262] Added mr and uncommented code --- pandora_console/extras/30.sql | 7 +++++++ .../models/VisualConsole/Items/Group.php | 16 ++-------------- .../models/VisualConsole/Items/Icon.php | 16 ++-------------- .../models/VisualConsole/Items/StaticGraph.php | 18 ++---------------- 4 files changed, 13 insertions(+), 44 deletions(-) create mode 100644 pandora_console/extras/30.sql diff --git a/pandora_console/extras/30.sql b/pandora_console/extras/30.sql new file mode 100644 index 0000000000..eb6650dc5a --- /dev/null +++ b/pandora_console/extras/30.sql @@ -0,0 +1,7 @@ +START TRANSACTION; + +UPDATE `tlayout_data` SET `height` = 70 , `width` = 70 WHERE `height` = 0 && `width` = 0 && ((`type` IN (0,5)) || +(`type` = 10 && `image` IS NOT NULL && `image` != '' && `image` != 'none') || +(`type` = 11 && `image` IS NOT NULL && `image` != '' && `image` != 'none' && `show_statistics` = 0)); + +COMMIT; \ No newline at end of file diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php b/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php index cbbe877f8d..53f2adcadd 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php @@ -291,21 +291,9 @@ final class Group extends Item $width = (int) $data['width']; $height = (int) $data['height']; if ($width === 0 || $height === 0) { - // TODO: This will be the default behaviour after we finish the - // builder. Don't delete this code. - // $sizeImage = getimagesize($config['homedir'].'/'.$imagePath); - // $data['width'] = $sizeImage[0]; - // $data['height'] = $sizeImage[1]; $sizeImage = getimagesize($config['homedir'].'/'.$imagePath); - $imageHeight = $sizeImage[1]; - - if ($width === 0) { - $data['width'] = 70; - } - - if ($height === 0) { - $data['height'] = ($imageHeight > 70) ? 70 : $imageHeight; - } + $data['width'] = $sizeImage[0]; + $data['height'] = $sizeImage[1]; } $data['html'] = ''; diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/Icon.php b/pandora_console/include/rest-api/models/VisualConsole/Items/Icon.php index 29605ffb4f..e67c76a6a7 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/Icon.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/Icon.php @@ -120,21 +120,9 @@ final class Icon extends Item $width = (int) $data['width']; $height = (int) $data['height']; if ($width === 0 || $height === 0) { - // TODO: This will be the default behaviour after we finish the - // builder. Don't delete this code. - // $sizeImage = getimagesize($config['homedir'].'/'.$imagePath); - // $data['width'] = $sizeImage[0]; - // $data['height'] = $sizeImage[1]; $sizeImage = getimagesize($config['homedir'].'/'.$imagePath); - $imageHeight = $sizeImage[1]; - - if ($width === 0) { - $data['width'] = 70; - } - - if ($height === 0) { - $data['height'] = ($imageHeight > 70) ? 70 : $imageHeight; - } + $data['width'] = $sizeImage[0]; + $data['height'] = $sizeImage[1]; } return $data; diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php b/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php index 9af4287d26..c43fb39136 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php @@ -184,23 +184,9 @@ final class StaticGraph extends Item $width = (int) $data['width']; $height = (int) $data['height']; if ($width === 0 || $height === 0) { - // TODO: This will be the default behaviour after we finish the - // builder. Don't delete this code. - // $sizeImage = getimagesize($config['homedir'].'/'.$imagePath); - // $data['width'] = $sizeImage[0]; - // $data['height'] = $sizeImage[1]; - // Default value. Will be replaced by a dynamic image size - // calculation after the phase 3. $sizeImage = getimagesize($config['homedir'].'/'.$imagePath); - $imageHeight = $sizeImage[1]; - - if ($width === 0) { - $data['width'] = 70; - } - - if ($height === 0) { - $data['height'] = ($imageHeight > 70) ? 70 : $imageHeight; - } + $data['width'] = $sizeImage[0]; + $data['height'] = $sizeImage[1]; } // Get last value. From 52025efbee2ddc95a1931a0c74c00368b8d330e7 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Mon, 1 Jul 2019 13:55:44 +0200 Subject: [PATCH 030/262] Modified control for module edition --- .../agentes/module_manager_editor_common.php | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index fbdd620f77..e09a14ae92 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -134,7 +134,9 @@ $largeClassDisabledBecauseInPolicy = ''; $page = get_parameter('page', ''); -if (strstr($page, 'policy_modules') === false && $id_agent_module) { +$in_policies_page = strstr($page, 'policy_modules'); + +if ($in_policies_page === false && $id_agent_module) { if ($config['enterprise_installed']) { if (policies_is_module_linked($id_agent_module) == 1) { $disabledBecauseInPolicy = 1; @@ -243,6 +245,12 @@ $table_simple->data[0][3] .= html_print_select_from_sql( $disabledBecauseInPolicy ); +if ((isset($id_agent_module) && $id_agent_module) || $id_policy_module != 0) { + $edit = false; +} else { + $edit = true; +} + $in_policy = strstr($page, 'policy_modules'); if (!$in_policy) { // Cannot select the current module to be itself parent @@ -273,17 +281,6 @@ if (!$in_policy) { $table_simple->data[2][0] = __('Type').' '.ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help'); $table_simple->data[2][0] .= html_print_input_hidden('id_module_type_hidden', $id_module_type, true); -if (isset($id_agent_module)) { - if ($id_agent_module) { - $edit = false; - } else { - $edit = true; - } -} else { - // Run into a policy - $edit = true; -} - if (!$edit) { $sql = sprintf( 'SELECT id_tipo, nombre From 4430f18ac5ca51ccd41269299665a0c9684a929a Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Tue, 2 Jul 2019 12:21:58 +0200 Subject: [PATCH 031/262] Resolved error query --- pandora_console/include/functions_events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 5f83669b4b..927a82da40 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -4861,7 +4861,7 @@ function events_get_count_events_by_agent( COUNT(*) AS count FROM %s t3 WHERE utimestamp > %d AND utimestamp <= %d - AND id_grupo IN (%s) %s + AND id_grupo IN (%s) GROUP BY id_agente', $tagente, $tevento, From 84cdbefebd6adffbe285389df775c0c2f71c03b2 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 2 Jul 2019 16:22:23 +0200 Subject: [PATCH 032/262] cleanup and fix in location reload --- pandora_console/index.php | 365 ++++++++++++++++++++++++-------------- 1 file changed, 235 insertions(+), 130 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 3c95074171..e299d0869d 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1,17 +1,32 @@ $value) { if ($key == 1) { continue; @@ -162,12 +181,12 @@ if (!empty($config['https']) && empty($_SERVER['HTTPS'])) { $url = ui_get_full_url($query); // Prevent HTTP response splitting attacks - // http://en.wikipedia.org/wiki/HTTP_response_splitting + // http://en.wikipedia.org/wiki/HTTP_response_splitting. $url = str_replace("\n", '', $url); header('Location: '.$url); + // Always exit after sending location headers. exit; - // Always exit after sending location headers } // Pure mode (without menu, header and footer). @@ -188,20 +207,21 @@ echo ''."\n"; echo ''."\n"; -// This starts the page head. In the call back function, things from $page['head'] array will be processed into the head +// This starts the page head. In the callback function, +// $page['head'] array content will be processed into the head. ob_start('ui_process_page_head'); -// Enterprise main +// Enterprise main. enterprise_include('index.php'); echo ''; // This tag is included in the buffer passed to ui_process_page_head so -// technically it can be stripped +// technically it can be stripped. echo ''."\n"; require_once 'include/functions_themes.php'; @@ -212,13 +232,13 @@ $config['remote_addr'] = $_SERVER['REMOTE_ADDR']; $sec2 = get_parameter_get('sec2'); $sec2 = safe_url_extraclean($sec2); $page = $sec2; -// Reference variable for old time sake +// Reference variable for old time sake. $sec = get_parameter_get('sec'); $sec = safe_url_extraclean($sec); $process_login = false; -// Update user password +// Update user password. $change_pass = get_parameter_post('renew_password', 0); if ($change_pass == 1) { @@ -235,14 +255,14 @@ $searchPage = false; $search = get_parameter_get('head_search_keywords'); if (strlen($search) > 0) { $config['search_keywords'] = io_safe_input(trim(io_safe_output(get_parameter('keywords')))); - // If not search category providad, we'll use an agent search + // If not search category providad, we'll use an agent search. $config['search_category'] = get_parameter('search_category', 'all'); if (($config['search_keywords'] != 'Enter keywords to search') && (strlen($config['search_keywords']) > 0)) { $searchPage = true; } } -// Login process +// Login process. if (! isset($config['id_user'])) { // Clear error messages. unset($_COOKIE['errormsg']); @@ -250,50 +270,53 @@ if (! isset($config['id_user'])) { if (isset($_GET['login'])) { include_once 'include/functions_db.php'; - // Include it to use escape_string_sql function + // Include it to use escape_string_sql function. $config['auth_error'] = ''; - // Set this to the error message from the authorization mechanism + // Set this to the error message from the authorization mechanism. $nick = get_parameter_post('nick'); - // This is the variable with the login + // This is the variable with the login. $pass = get_parameter_post('pass'); - // This is the variable with the password + // This is the variable with the password. $nick = db_escape_string_sql($nick); $pass = db_escape_string_sql($pass); - // Since now, only the $pass variable are needed + // Since now, only the $pass variable are needed. unset($_GET['pass'], $_POST['pass'], $_REQUEST['pass']); - // If the auth_code exists, we assume the user has come through the double auth page + // If the auth_code exists, we assume the user has come from + // double authorization page. if (isset($_POST['auth_code'])) { $double_auth_success = false; - // The double authentication is activated and the user has surpassed the first step (the login). + // The double authentication is activated and the user has + // surpassed the first step (the login). // Now the authentication code provided will be checked. if (isset($_SESSION['prepared_login_da'])) { if (isset($_SESSION['prepared_login_da']['id_user']) && isset($_SESSION['prepared_login_da']['timestamp']) ) { - // The user has a maximum of 5 minutes to introduce the double auth code + // The user has a maximum of 5 minutes to introduce + // the double auth code. $dauth_period = SECONDS_2MINUTES; $now = time(); $dauth_time = $_SESSION['prepared_login_da']['timestamp']; if (($now - $dauth_period) < $dauth_time) { - // Nick + // Nick. $nick = $_SESSION['prepared_login_da']['id_user']; - // Code + // Code. $code = (string) get_parameter_post('auth_code'); if (!empty($code)) { $result = validate_double_auth_code($nick, $code); if ($result === true) { - // Double auth success + // Double auth success. $double_auth_success = true; } else { - // Screen + // Screen. $login_screen = 'double_auth'; - // Error message + // Error message. $config['auth_error'] = __('Invalid code'); if (!isset($_SESSION['prepared_login_da']['attempts'])) { @@ -303,9 +326,9 @@ if (! isset($config['id_user'])) { $_SESSION['prepared_login_da']['attempts']++; } } else { - // Screen + // Screen. $login_screen = 'double_auth'; - // Error message + // Error message. $config['auth_error'] = __("The code shouldn't be empty"); if (!isset($_SESSION['prepared_login_da']['attempts'])) { @@ -315,27 +338,27 @@ if (! isset($config['id_user'])) { $_SESSION['prepared_login_da']['attempts']++; } } else { - // Expired login + // Expired login. unset($_SESSION['prepared_login_da']); - // Error message + // Error message. $config['auth_error'] = __('Expired login'); } } else { - // If the code doesn't exist, remove the prepared login + // If the code doesn't exist, remove the prepared login. unset($_SESSION['prepared_login_da']); - // Error message + // Error message. $config['auth_error'] = __('Login error'); } - } - // If $_SESSION['prepared_login_da'] doesn't exist, the user have to do the login again - else { - // Error message + } else { + // If $_SESSION['prepared_login_da'] doesn't exist, the user + // must login again. + // Error message. $config['auth_error'] = __('Login error'); } - // Remove the authenticator code + // Remove the authenticator code. unset($_POST['auth_code'], $code); if (!$double_auth_success) { @@ -347,6 +370,8 @@ if (! isset($config['id_user'])) { $_SERVER['REMOTE_ADDR'] ); while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); @@ -355,7 +380,8 @@ if (! isset($config['id_user'])) { $login_button_saml = get_parameter('login_button_saml', false); if (isset($double_auth_success) && $double_auth_success) { - // This values are true cause there are checked before complete the 2nd auth step + // This values are true cause there are checked before complete + // the 2nd auth step. $nick_in_db = $_SESSION['prepared_login_da']['id_user']; $expired_pass = false; } else if (($config['auth'] == 'saml') && ($login_button_saml)) { @@ -370,10 +396,13 @@ if (! isset($config['id_user'])) { $as->logout(); } } else { - // process_user_login is a virtual function which should be defined in each auth file. - // It accepts username and password. The rest should be internal to the auth file. - // The auth file can set $config["auth_error"] to an informative error output or reference their internal error messages to it - // process_user_login should return false in case of errors or invalid login, the nickname if correct + // Function process_user_login is a virtual function which should be + // defined in each auth file. It accepts username and password. The + // rest should be internal to the auth file. The auth file can set + // $config["auth_error"] to an informative error output or reference + // their internal error messages to it process_user_login should + // return false in case of errors or invalid login, the nickname + // if correct. $nick_in_db = process_user_login($nick, $pass); $expired_pass = false; @@ -391,28 +420,34 @@ if (! isset($config['id_user'])) { include_once 'general/login_page.php'; db_pandora_audit('Password expired', 'Password expired: '.$nick, $nick); while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); } - // Checks if password has expired + // Checks if password has expired. $check_status = check_pass_status($nick, $pass); switch ($check_status) { case PASSSWORD_POLICIES_FIRST_CHANGE: - // first change + // First change. case PASSSWORD_POLICIES_EXPIRED: - // pass expired + // Pass expired. $expired_pass = true; login_change_password($nick, '', $check_status); break; + + default: + // Ignore. + break; } } } if (($nick_in_db !== false) && $expired_pass) { - // login ok and password has expired + // Login ok and password has expired. include_once 'general/login_page.php'; db_pandora_audit( 'Password expired', @@ -420,30 +455,38 @@ if (! isset($config['id_user'])) { $nick ); while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); } else if (($nick_in_db !== false) && (!$expired_pass)) { - // login ok and password has not expired - // Double auth check - if ((!isset($double_auth_success) || !$double_auth_success) && is_double_auth_enabled($nick_in_db)) { - // Store this values in the session to know if the user login was correct + // Login ok and password has not expired. + // Double auth check. + if ((!isset($double_auth_success) + || !$double_auth_success) + && is_double_auth_enabled($nick_in_db) + ) { + // Store this values in the session to know if the user login + // was correct. $_SESSION['prepared_login_da'] = [ 'id_user' => $nick_in_db, 'timestamp' => time(), 'attempts' => 0, ]; - // Load the page to introduce the double auth code + // Load the page to introduce the double auth code. $login_screen = 'double_auth'; include_once 'general/login_page.php'; while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); } - // login ok and password has not expired + // Login ok and password has not expired. $process_login = true; if (is_user_admin($nick)) { @@ -455,7 +498,7 @@ if (! isset($config['id_user'])) { if (!isset($_GET['sec2']) && !isset($_GET['sec'])) { // Avoid the show homepage when the user go to // a specific section of pandora - // for example when timeout the sesion + // for example when timeout the sesion. unset($_GET['sec2']); $_GET['sec'] = 'general/logon_ok'; $home_page = ''; @@ -486,6 +529,7 @@ if (! isset($config['id_user'])) { break; case 'Default': + default: $_GET['sec'] = 'general/logon_ok'; break; @@ -521,11 +565,14 @@ if (! isset($config['id_user'])) { $_SESSION['id_usuario'] = $nick_in_db; $config['id_user'] = $nick_in_db; - // Check if connection goes through F5 balancer. If it does, then don't call config_prepare_session() or user will be back to login all the time + // Check if connection goes through F5 balancer. If it does, then + // don't call config_prepare_session() or user will be back to login + // all the time. $prepare_session = true; foreach ($_COOKIE as $key => $value) { if (preg_match('/BIGipServer*/', $key)) { $prepare_session = false; + break; } } @@ -534,9 +581,13 @@ if (! isset($config['id_user'])) { } if (is_user_admin($config['id_user'])) { - // PHP configuration values - $PHPupload_max_filesize = config_return_in_bytes(ini_get('upload_max_filesize')); - $PHPmemory_limit = config_return_in_bytes(ini_get('memory_limit')); + // PHP configuration values. + $PHPupload_max_filesize = config_return_in_bytes( + ini_get('upload_max_filesize') + ); + $PHPmemory_limit = config_return_in_bytes( + ini_get('memory_limit') + ); $PHPmax_execution_time = ini_get('max_execution_time'); if ($PHPmax_execution_time !== '0') { @@ -571,43 +622,60 @@ if (! isset($config['id_user'])) { $l10n = null; if (file_exists('./include/languages/'.$user_language.'.mo')) { - $l10n = new gettext_reader(new CachedFileReader('./include/languages/'.$user_language.'.mo')); + $cacheFileReader = new CachedFileReader( + './include/languages/'.$user_language.'.mo' + ); + $l10n = new gettext_reader($cacheFileReader); $l10n->load_tables(); } } else { - // login wrong + // Login wrong. $blocked = false; - if ((!is_user_admin($nick) || $config['enable_pass_policy_admin']) && file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { + if ((!is_user_admin($nick) || $config['enable_pass_policy_admin']) + && file_exists(ENTERPRISE_DIR.'/load_enterprise.php') + ) { $blocked = login_check_blocked($nick); } if (!$blocked) { if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { + // Checks failed attempts. login_check_failed($nick); - // Checks failed attempts } $login_failed = true; include_once 'general/login_page.php'; - db_pandora_audit('Logon Failed', 'Invalid login: '.$nick, $nick); + db_pandora_audit( + 'Logon Failed', + 'Invalid login: '.$nick, + $nick + ); while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); } else { include_once 'general/login_page.php'; - db_pandora_audit('Logon Failed', 'Invalid login: '.$nick, $nick); + db_pandora_audit( + 'Logon Failed', + 'Invalid login: '.$nick, + $nick + ); while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); } } - // Form the url + // Form the url. $query_params_redirect = $_GET; - // Visual console do not want sec2 + // Visual console do not want sec2. if ($home_page == 'Visual console') { unset($query_params_redirect['sec2']); } @@ -621,15 +689,19 @@ if (! isset($config['id_user'])) { $redirect_url .= '&'.safe_url_extraclean($key).'='.safe_url_extraclean($value); } - header('Location: '.$config['homeurl'].'index.php'.$redirect_url); + header('Location: '.ui_get_full_url('index.php'.$redirect_url)); exit; // Always exit after sending location headers. } else if (isset($_GET['loginhash'])) { - // Hash login process + // Hash login process. $loginhash_data = get_parameter('loginhash_data', ''); $loginhash_user = str_rot13(get_parameter('loginhash_user', '')); - if ($config['loginhash_pwd'] != '' && $loginhash_data == md5($loginhash_user.io_output_password($config['loginhash_pwd']))) { + if ($config['loginhash_pwd'] != '' + && $loginhash_data == md5( + $loginhash_user.io_output_password($config['loginhash_pwd']) + ) + ) { db_logon($loginhash_user, $_SERVER['REMOTE_ADDR']); $_SESSION['id_usuario'] = $loginhash_user; $config['id_user'] = $loginhash_user; @@ -637,6 +709,8 @@ if (! isset($config['id_user'])) { include_once 'general/login_page.php'; db_pandora_audit('Logon Failed (loginhash', '', 'system'); while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); @@ -758,7 +832,7 @@ if (! isset($config['id_user'])) { $body .= '

'; $body .= __('Please click the link below to reset your password'); $body .= '

'; - $body .= ''.__('Reset your password').''; + $body .= ''.__('Reset your password').''; $body .= '

'; $body .= get_product_name(); $body .= '

'; @@ -781,6 +855,8 @@ if (! isset($config['id_user'])) { } while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); @@ -790,11 +866,20 @@ if (! isset($config['id_user'])) { $loginhash_data = get_parameter('loginhash_data', ''); $loginhash_user = str_rot13(get_parameter('loginhash_user', '')); $iduser = $_SESSION['id_usuario']; - // logoff_db ($iduser, $_SERVER["REMOTE_ADDR"]); check why is not available + + /* + * Check why is not available. + * logoff_db ($iduser, $_SERVER["REMOTE_ADDR"]); + */ + unset($_SESSION['id_usuario']); unset($iduser); - if ($config['loginhash_pwd'] != '' && $loginhash_data == md5($loginhash_user.io_output_password($config['loginhash_pwd']))) { + if ($config['loginhash_pwd'] != '' + && $loginhash_data == md5( + $loginhash_user.io_output_password($config['loginhash_pwd']) + ) + ) { db_logon($loginhash_user, $_SERVER['REMOTE_ADDR']); $_SESSION['id_usuario'] = $loginhash_user; $config['id_user'] = $loginhash_user; @@ -802,6 +887,8 @@ if (! isset($config['id_user'])) { include_once 'general/login_page.php'; db_pandora_audit('Logon Failed (loginhash', '', 'system'); while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); @@ -814,7 +901,7 @@ if (! isset($config['id_user'])) { '*' ); if ($user_in_db == false) { - // logout + // Logout. $_REQUEST = []; $_GET = []; $_POST = []; @@ -825,6 +912,8 @@ if (! isset($config['id_user'])) { unset($iduser); include_once 'general/login_page.php'; while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); @@ -832,7 +921,7 @@ if (! isset($config['id_user'])) { if (((bool) $user_in_db['is_admin'] === false) && ((bool) $user_in_db['not_login'] === true) ) { - // logout + // Logout. $_REQUEST = []; $_GET = []; $_POST = []; @@ -843,6 +932,8 @@ if (! isset($config['id_user'])) { unset($iduser); include_once 'general/login_page.php'; while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); @@ -850,12 +941,12 @@ if (! isset($config['id_user'])) { } } -// Enterprise support +// Enterprise support. if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { include_once ENTERPRISE_DIR.'/load_enterprise.php'; } -// Log off +// Log off. if (isset($_GET['bye'])) { include 'general/logoff.php'; $iduser = $_SESSION['id_usuario']; @@ -873,6 +964,8 @@ if (isset($_GET['bye'])) { } while (@ob_end_flush()) { + // Dumping... + continue; } exit(''); @@ -880,10 +973,11 @@ if (isset($_GET['bye'])) { clear_pandora_error_for_header(); -// ---------------------------------------------------------------------- -// EXTENSIONS -// ---------------------------------------------------------------------- /* + * ---------------------------------------------------------------------- + * EXTENSIONS + * ---------------------------------------------------------------------- + * * Load the basic configurations of extension and add extensions into menu. * Load here, because if not, some extensions not load well, I don't why. */ @@ -892,7 +986,7 @@ $config['logged'] = false; extensions_load_extensions($process_login); if ($process_login) { - // Call all extensions login function + // Call all extensions login function. extensions_call_login_function(); unset($_SESSION['new_update']); @@ -983,7 +1077,7 @@ if (get_parameter('login', 0) !== 0) { } } -// Header +// Header. if ($config['pure'] == 0) { echo '

'; - // main_pure + // Main pure. } echo '
'; @@ -1202,16 +1299,17 @@ require_once 'include/functions_clippy.php'; clippy_start($sec2); while (@ob_end_flush()) { - // Dump. + // Dumping... + continue; } db_print_database_debug(); echo ''; $run_time = format_numeric((microtime(true) - $config['start_time']), 3); -echo "\n\n"; +echo "\n\n"; -// Values from PHP to be recovered from JAVASCRIPT +// Values from PHP to be recovered from JAVASCRIPT. require 'include/php_to_js_values.php'; @@ -1219,12 +1317,13 @@ require 'include/php_to_js_values.php'; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 679e01e0f4..93bd2dee08 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5323,6 +5323,10 @@ table.info_table.policy_sub_table { margin-bottom: 4px; } +.agent_options input[readonly] { + color: #848484; +} + /* * --------------------------------------------------------------------- * - CLASSES FOR THE NEW TOGGLES - From 31b19ab970f1df69484c4c799c43a639b3d34bd3 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Fri, 5 Jul 2019 09:31:23 +0200 Subject: [PATCH 038/262] Fix pagination blank page - #4306 --- pandora_console/include/functions_ui.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index ef8089ac3a..0bf4b8dd2d 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2049,7 +2049,7 @@ function ui_pagination( $actual_page = floor($offset / $pagination); $ini_page = (floor($actual_page / $block_limit) * $block_limit); $end_page = ($ini_page + $block_limit - 1); - if ($end_page > $number_of_pages) { + if ($end_page >= $number_of_pages) { $end_page = ($number_of_pages - 1); } From 58cb113d400964ead195719e4f0f968b61ec2222 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Mon, 8 Jul 2019 13:23:35 +0200 Subject: [PATCH 039/262] fixed error in pdf --- pandora_console/include/functions_graph.php | 2 +- pandora_console/include/graphs/flot/pandora.flot.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 72bc9b5c91..d04c2049a0 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -2161,7 +2161,7 @@ function graphic_combined_module( $graph_values = $temp; if (!$params['vconsole']) { - $width = 1024; + $width = $width; $height = 500; } diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index f7af997508..f0976cb98f 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -2791,14 +2791,16 @@ function pandoraFlotArea( if (short_data) { formatted = number_format(v, force_integer, "", short_data); } else { - // It is an integer + // It is an integer. if (v - Math.floor(v) == 0) { formatted = number_format(v, force_integer, "", 2); } } - // Get only two decimals - formatted = round_with_decimals(formatted, 100); + // Get only two decimals. + if (typeof formatted != "string") { + formatted = Math.round(formatted * 100) / 100; + } return formatted; } From 6d6c8fe197426acb169b5981ecd5c19ad44bff64 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Mon, 8 Jul 2019 17:57:23 +0200 Subject: [PATCH 040/262] Added filter by agent - #4318 --- .../godmode/massive/massive_delete_modules.php | 8 ++++++++ pandora_console/godmode/massive/massive_edit_modules.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php index c52878c5da..7d8d64141a 100755 --- a/pandora_console/godmode/massive/massive_delete_modules.php +++ b/pandora_console/godmode/massive/massive_delete_modules.php @@ -501,6 +501,11 @@ $table->data['form_agents_4'][1] = html_print_select( true ); +$table->rowstyle['form_agents_filter'] = 'vertical-align: top;'; +$table->rowclass['form_agents_filter'] = 'select_agents_row select_agents_row_2'; +$table->data['form_agents_filter'][0] = __('Filter Agents'); +$table->data['form_agents_filter'][1] = html_print_input_text('filter_agents', '', '', 20, 255, true); + $table->rowstyle['form_agents_3'] = 'vertical-align: top;'; $table->rowclass['form_agents_3'] = 'select_agents_row select_agents_row_2'; $table->data['form_agents_3'][0] = __('Agents'); @@ -763,6 +768,9 @@ $(document).ready (function () { .html (value["alias"]); $("#id_agents").append (option); }); + //Filter agents. Call the function when the select is fully loaded. + var textNoData = ""; + filterByText($('#id_agents'), $("#text-filter_agents"), textNoData); }, "json" ); diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 1a18b410d5..f52707cb2a 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -473,6 +473,11 @@ $table->data['form_agents_4'][1] = html_print_select( true ); +$table->rowstyle['form_agents_filter'] = 'vertical-align: top;'; +$table->rowclass['form_agents_filter'] = 'select_agents_row select_agents_row_2'; +$table->data['form_agents_filter'][0] = __('Filter agents'); +$table->data['form_agents_filter'][1] = html_print_input_text('filter_agents', '', '', 20, 255, true); + $table->rowstyle['form_agents_3'] = 'vertical-align: top;'; $table->rowclass['form_agents_3'] = 'select_agents_row select_agents_row_2'; $table->data['form_agents_3'][0] = __('Agents'); @@ -1638,6 +1643,9 @@ $(document).ready (function () { .html(value["alias"]); $("#id_agents").append (option); }); + //Filter agents. Call the function when the select is fully loaded. + var textNoData = ""; + filterByText($('#id_agents'), $("#text-filter_agents"), textNoData); }, "json" ); From 6382cb2abefc0894443c74512352bc1ad7222335 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 10 Jul 2019 14:18:23 +0200 Subject: [PATCH 041/262] fixed errors with graphs in meta --- pandora_console/include/functions_events.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index f9a1271c18..b13137c06c 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -25,13 +25,17 @@ * GNU General Public License for more details. * ============================================================================ */ +global $config; require_once $config['homedir'].'/include/functions_ui.php'; require_once $config['homedir'].'/include/functions_tags.php'; require_once $config['homedir'].'/include/functions.php'; +require_once $config['homedir'].'/include/functions_reporting.php'; +enterprise_include_once('include/functions_metaconsole.php'); enterprise_include_once('meta/include/functions_events_meta.php'); enterprise_include_once('meta/include/functions_agents_meta.php'); enterprise_include_once('meta/include/functions_modules_meta.php'); +enterprise_include_once('meta/include/functions_events_meta.php'); /** @@ -4848,10 +4852,6 @@ function events_get_count_events_by_agent( $tagente = 'tagente'; $tevento = 'tevento'; - if ($dbmeta) { - $tagente = 'tmetaconsole_agent'; - $tevento = 'tmetaconsole_event'; - } $sql = sprintf( 'SELECT id_agente, @@ -5028,9 +5028,6 @@ function events_get_count_events_validated_by_user( } $tevento = 'tevento'; - if ($dbmeta) { - $tevento = 'tmetaconsole_event'; - } $sql = sprintf( 'SELECT id_usuario, @@ -5206,9 +5203,6 @@ function events_get_count_events_by_criticity( } $tevento = 'tevento'; - if ($dbmeta) { - $tevento = 'tmetaconsole_event'; - } $sql = sprintf( 'SELECT criticity, @@ -5414,9 +5408,6 @@ function events_get_count_events_validated( } $tevento = 'tevento'; - if ($dbmeta) { - $tevento = 'tmetaconsole_event'; - } $sql = sprintf('SELECT estado, COUNT(*) AS count FROM %s WHERE %s %s GROUP BY estado', $tevento, $sql_filter, $sql_where); From 3b23810323b71a77b51d82dd6effa7d16fe6ddeb Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 10 Jul 2019 16:37:24 +0200 Subject: [PATCH 042/262] Added filter by agent in massive copy - #4318 --- .../godmode/massive/massive_copy_modules.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/massive/massive_copy_modules.php b/pandora_console/godmode/massive/massive_copy_modules.php index 5ca25ebc11..36ab0c310c 100755 --- a/pandora_console/godmode/massive/massive_copy_modules.php +++ b/pandora_console/godmode/massive/massive_copy_modules.php @@ -273,6 +273,9 @@ $table->data[1][1] = html_print_select( true ); +$table->data['form_agents_filter'][0] = __('Filter Agents'); +$table->data['form_agents_filter'][1] = html_print_input_text('filter_agents', '', '', 20, 255, true); + $table->data[2][0] = __('Agent'); $table->data[2][0] .= '
'; + echo ''; } } return $output; } - - diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 0050ccdf9d..6a9620f3e8 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3094,38 +3094,7 @@ function ui_print_datatable(array $parameters) $filter .= '
    '; foreach ($parameters['form']['inputs'] as $input) { - $filter .= '
  • '; - $filter .= ''; - if ($input['type'] != 'select') { - $filter .= ''; - } else { - // Select. - $filter .= ''; - } - - $filter .= '
  • '; + $filter .= html_print_input(($input + ['return' => true]), 'li'); } $filter .= '
  • '; diff --git a/pandora_console/include/styles/deployment_list.css b/pandora_console/include/styles/deployment_list.css new file mode 100644 index 0000000000..ca5385f3f5 --- /dev/null +++ b/pandora_console/include/styles/deployment_list.css @@ -0,0 +1,12 @@ +ul.wizard li > label:not(.p-switch) { + width: auto; +} + +ul.wizard { + display: flex; + flex-direction: row; +} + +ul.wizard li { + margin-right: 1em; +} diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 95d6caadfd..ab6cf9a32c 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -810,6 +810,41 @@ CREATE TABLE IF NOT EXISTS `trecon_task` ( KEY `recon_task_daemon` (`id_recon_server`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ---------------------------------------------------------------------- +-- Table `ttask_credentials` +-- ---------------------------------------------------------------------- +CREATE TABLE `ttask_credentials` ( + `id_rt` int(10) unsigned NOT NULL, + `identifier` varchar(100) NOT NULL, + PRIMARY KEY (`id_rt`,`identifier`), + KEY `identifier` (`identifier`), + FOREIGN KEY (`id_rt`) REFERENCES `trecon_task` (`id_rt`) + ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (`identifier`) REFERENCES `tcredential_store` (`identifier`) + ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- ---------------------------------------------------------------------- +-- Table `tdeployment_hosts` +-- ---------------------------------------------------------------------- +CREATE TABLE `tdeployment_hosts` ( + `id` SERIAL, + `id_cs` VARCHAR(100), + `ip` VARCHAR(100) NOT NULL, + `id_os` INT(10) UNSIGNED DEFAULT 0, + `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", + `arch` ENUM('x64', 'x86') DEFAULT 'x64', + `current_agent_version` VARCHAR(100) DEFAULT '', + `desired_agent_version` VARCHAR(100) DEFAULT '', + `deployed` bigint(20) unsigned COMMENT "When it was deployed", + `last_err` text, + PRIMARY KEY (`id`), + FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) + ON UPDATE CASCADE ON DELETE SET NULL, + FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- ---------------------------------------------------------------------- -- Table `tmodule_relationship` -- ---------------------------------------------------------------------- diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 23532d843b..6c3e1b9ed5 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -31,7 +31,9 @@ use constant { DISCOVERY_APP_MYSQL => 4, DISCOVERY_APP_ORACLE => 5, DISCOVERY_CLOUD_AWS_EC2 => 6, - DISCOVERY_CLOUD_AWS_RDS => 7 + DISCOVERY_CLOUD_AWS_RDS => 7, + DISCOVERY_CLOUD_AZURE_COMPUTE => 8, + DISCOVERY_DEPLOY_AGENTS => 9, }; # /dev/null From a8019fd2230b76ce8a1f4a03a0b1cb2baef68d26 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Thu, 11 Jul 2019 10:49:48 +0200 Subject: [PATCH 045/262] Changed images with transparent borders - #4351 --- pandora_console/images/user_email.png | Bin 546 -> 486 bytes .../images/wizard/customnetscan.png | Bin 2477 -> 2929 bytes pandora_console/images/wizard/netscan.png | Bin 9083 -> 9512 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/pandora_console/images/user_email.png b/pandora_console/images/user_email.png index 095b012a5c38adf90de83209e84d39f7b23c0b31..446c90f7604af0f388d5ba700bb9b96b17648a3e 100644 GIT binary patch delta 432 zcmV;h0Z;y-1m**f90dWhvs|r_At--{Nkl)A~G`aKZs^Rl1KyyAO;j= zFeO0nfeA@k03d)EZ~>Uf?~znp0Ad3sELshKSP&q97>EWS=Oh5>`AA}hOi%$qm;ex; zhgo(W>gN3*4hvLJ0oe$E03r#&Jm)}2;qv9n4H~=Hmy#@r-eE@p=0xYKX<5LI?R&ert4-KXVcod#T zPU|2}ASj&C6e=P|6mrHm4|EquLnG9Ug6Lt-f@~c$-+mVpuVAA5=a^I2qkWqkX&>C8Vu`6h&&(xs3XopOAnYi av;zPGvvIx*6!@?J00003#0! zdqgKW$*w5a%H^ADR++!T;_*0bHk;*S@-PcAG*he99&Ov9(P;E*Xe1IL=8%77t?_uN z@)lbxOv>eQ)bIBx8jX^oC`T>Wv|25W_?+hRCxBxBlVQAwXf;ivX0s{0A1cxYW$1J| zv|fvdNtGWMhVcm>4u?V?3WfGUePAyf5le%8P<#s;FZ2so!W)f-_zgo{*Y`qUvny&) zH1LkpAk}Ks2R{S~IZLN665M~;TXfee+wGRZ;V`9ADavNE0)%%G3gC1)4M4is?nB?z zuvjcosZ+j|1%k!7_c>Oz9|@ObQSjRVo$n4l^8duoOOd zc`n1VqNu)U_^EzU;2c57o**07edpy~sotjadOb1d-EMa;R8G)fFc4fe@{stZLf3QR z4|s&<)oOL{$wR$i11JKMvk$P9NN9X{Sk!K}h2~U_TCl0t@3{7_R45eQn7NeKW}a34 ipRVE=Uz^Jh0R{ls$@-GOC!hlW00003p|tSAAdKKA##^XnuR2G!GuhW5l5p?5n^qVo!O;rvANErBXnvwIl1N1O%x|O zB^h%omm;YXXHJo#Q)FFS3OUoM&iVg8|NhVCeSh!sJfH9P`@4SL^c~*YRFw3U002<& z^uYVdz5>}B1zjPtz;r>c%<6I70=Rz6aBeh_O#yIZ=6(vylTJK9@ud*S{DYkoCjgK$ zq521K0|?t4NlZF|xQs#Y=&WTCz-bGQMI_NET-bif0V)FvpSsZmhf&E`_#O-aMPRv7 zBB&lQY>Houw?8R{Msgs-w>ZO`c#bjwI)zJw@#v8Zjw25X|D@|E+b>@u;jm8-E)5I+ zJE#D{4wx&GO@Uz$HdZ7Q8V$3vL!fOjc6Mk>m^BJ*jYP>FJ1exUBgW3rdK2vPg3G+I z$>EN^c=yk~WG5^+CJ zG>7X;`6u50Da`TbvnWVk3Ws@!O_DV(eBH7umZK}1LgX^p{!C`%mn!avU~-w92qp{W z>SqTtClE{14alo80ALptEG2@f0>Sib8g0GwHBTNjp-% z9gD*^^*(dS-;M?MO)gRv405@(|7!J@E7|-kZ@&(%?C^E;DGb@Xvt@(*+im|208kk9 z#N+&VzfXkpW*WL_Ri)D!R(m)>5|e6&n>*XJr-wJ#BsSmn(8`A9?K=Kljggipa^^|1 z;XM!*`l2U!umoq*m#N#?R-2s;k5RKudJy5iIzauX$HkxdMU(y&^_2(e&sW}PT9uJE zS@q)8V2Y$3&BkZA;2>?c?bZK>TCr72=Jdq?ZkJ_#%5FISNT8N=9O!_04;TH^QtdkDO+0T|>A8;;)b_rWH{L_UMcw}GBJ^&{d{hp^GbDnMY!^>W(HG)A zglWbh?!-p6(h!@r0%`yN`Y$8M4pXfbAC<*+cS4dpkRj?1UKoCQVOkx!Bd*y`WBV;u z^AUc;LIxOPEAAJl<#=*?Ip&Ms(8z~%yw zWmeD~Kyabd5GwR5zbex6y{6YEgJiwE=9jxpUqN`UdUO5<|2>C3^o&n06>qE^Zs%Q> zj0g`dRb1RQvlv-2UU_CUH4dx>D>WW;ee#?A0tM~uwRZc#NegAsx(TrJ8g(OWr>t?I zw2+j1URPx4wTn}4RKCqF+ARc4GoGWUi|*4S>Y7yXH&3&`n$KU?1gnjf=ilkBu8C<> z)6O{CuH7KUSTy>O%LKg*3-2sXHE(PI=Q-%6A}2gc7 zA|(b$^ArMJz z)LW)%-;U4D#6T5yzt4XFoo|HS-03{wk$riEy$1XuVl&_M$93D%^{rAIpxSYU=hYz| zO|u0vMgg{p8H#=37^aPiWSqEnRaq2G>#lWqLgl`$Lk-a89G|-a=^wVBdi#0Q*vS~T z=P3^4#}c(m68)_Q=1J53QBPu4q^YqA0mn3Yw&IDm=pvk09encUnCF$G6&)auyW(_k zNCBwrg)?YH?y(V*9`cE?iMOY!Lfpak9TJ!ZUgZY1f~JZz9Y&!i+XuT+E~hpB?i4nz zko4g+bVM>Xnj;OWaSl1YUx9XzqsVJ)nce8#{}e6&f?VzMul%V@(9d1%GjZhs>KC}0 zggRQX8`hFVU5x_WFe{UKGkEOyN^H$75j!Ej!Koc@NqwbzfIfVB zgDCg$%3DnvTg=5KC#xRY$i==Jf*PG2iF}R0@~h8TTcqzb81Rit@@QMk`}xkDJKY8b z2AJtN?2V|!zyNSWYJYLxq(58T_?Z5Sz11p(W7p!NCI((dU)nu?S<6feD);L?_iNG` z!qMR}Zz+F{;69kPrPP%T#9ubi*;5}K^ZF! z4AL?rx}`$V7Ft$gLYgJB>&^G>OI@usaq#Y-ng-+UM3^}B^%2Fav(gl4@d(B~X@hw9 z-6RJ;htrsl1BItd=8v3FmU0^vpu)JRME6{UHE}}c*zMXG4U>GD)Jh9 z_%M+_{o+A%^wgup8|;Nn69nScOKsCeAwKob^g77%^f}t=?&MJ0mi0p~r8bXsA3`qT zdSdR++)qFi)^{INcyJ0RBoC(5Whxu27rNvHF!$^RvwTfW{Si2Wp|+TvAJt#(6qqEf zpRn6esQA>wWRm|dVZdF;FPJI12?0!Jmw(CT7N|9ap!?>bzI3y69Tzz<1b_j+TCpkQ zs-Tno{jWwEH2c@hu~Ug37BZ1>^58Ra-_fczFFaBWeLvl`_6-LP97fK6rMm%NJycIxyCt~3$DnuU~_6uw&BE2 z6{oGBHm4C9cJK6WmdvD&nH$EzWp~g`>0uTTI0RRvH0096H0Dk}h01yBG0f6DaXxJ04 zT)Lc=FGYD2_^Vum{iw^M1#xK6l*jY6hwCf7xcEp&;V;RTS;!)GB9tT%>QP?wNC@FC zL-_`%`2AK5`)(Sg$O^qW*i5f+NIq(&HueMnM0S-6%O?wZ_m;}XyD6yIkvkY6~X<8Mc zwts6DP&BCiP@|O3sRRg~e1bfLZ>I^+#o3!3&Z!rLKA1!Hy#&$PtpRklzoU`LPF&UC z5CWDHKWkdEPDoXIq;*(W_+ zdl(6j1An8#s?cvgyTmd5R)Fxs=Hrv_i}HNB9>oq; zJIy8F^$N$YXhpqO?@$te7j0@nlZGYs7j{Z&7+4WV*kxn4Rv^NWX{a*+S4>26WeZKK z_u*UwYF`>yr2YJP+cCXzbZi%FhxT7MAiE6&Jt?a|W?9`(Z6 z;%ipqy$Z^#B&as9sQ3bb*xTF7a=X)E+I;-@aqR8ex1R66IB{b7!TQ=cjeka@e$_@s zM(T+rfJQjAKHW|w7ZGB?aBk?@Kq>Szn~3QSV;AE1@#7+s$(W|1X`g#if7;p3k_@dx zm;ei)E-jmC1IwBi!7Ggr#^gZ+dLzumF1-TXs~rxPeV9$G2Iw=Y{LtK3W)I)dLOB+u zuC1!-H~K7e(=>HS_J_1jNq=gCCJ5j&LofuU<_$u3PeYq7;g|hl1G~GsVrOSZG+s9% z>-(`|$HYW>!elN4Ypj>DZ+X=}009od2~UU3O{jC5K;btU4e{*hGx1`3yJwvzB1}z9 zi3=Ami1AcPrwuk$68Qdds2mY{ny&}?N26Q?E4hGE$t;wdnTdR`MSpJR8S(dizt>a2 z>+tnAUrQofY?DIc?0zBvG=P5Qk!NSGAiPB=WbdE214QiUdqzH~`rE(VYLlSfAZ-V2$Yf3(xHhTsZa}kwf8;gXF@hihR7K~t_(KD?@SO)76@N(h6wvu}?Z)e_2|(E1 ze$kE*I0!NUs}Qq!gnC9;qhWo&)jl2x2#Syfs6pJ}y=~jEyZc{w0x&3b3iWmaia-Kz zQY9r+&OsX_AF7`cdKMr_Kue_+TmBJ4m^w=MhP*ifxH<3|02p!;0Du6%00a2|eMTyk z5?`G?+i{%Xtbc6djtuHRQNFFMEfBzFjHkvAMEJrY3~4CH(;{z3={6O&Z{3P)vFXA3n)NHtv+fz>0A;C zKt-hR0RRvn3NzptUEcC5>yR2xfdElJw-1jlQPei5eH?)(4-d5{lq!O5{`9leeZK$a z9|s&kXn^kUL^S~^@5T()fR>ciSpW#o9Xvl;b@kh;)^=924BZ3)y7L2?LfLKf%+yr- zuuu3Gb${E&tbzdDV^RI$x_4KOSaF8;4bseFDj+~KTHrvy%4b)OzJvNegw$XraEllq z^lYHL1D8;WW~owm>CT-MTYu6B(iI6jD z@I@$ok$1L`1p)d*0uny$(m_d^z0wFI@TsXYes>9^2ZRp-^o|69+r&m$O5WZnG}zzp z2p{O7PauztJ$tYKsl-Es9EFQx6#OP@B)|e9(C(c7_Ce^hMf?))UK%`&g?M7|5wars wt>nqZ*L7RM1Aq}n@d!Ww00aPr75@t`0M4cm4~`a={r~^~07*qoM6N<$f??%=!vFvP diff --git a/pandora_console/images/wizard/netscan.png b/pandora_console/images/wizard/netscan.png index c90f4ddc5da30015144d716d5611d9bf2be96c69..66894fb4467d56b9784d6019d5ae42eff0a3e05c 100644 GIT binary patch literal 9512 zcmcI~cU+TMvwtWmMFf_nGy#>O(g`JiG(iy(5D<_iNGBvj5_(4vrO56g0wHt+=_*Y+ z5d{%KktQ`Dl2D|E7V3T2eRuEsyZ7$zuY2=JK6#!wGjnF<%z4f^-+7)H!)~!K@iKux zAQt`GH%&kwnx2y%!)buRPFi>a{9VB4T4GGSTrhqP-p(K`C$ERjLiz{?S7#Gv2d98X zoz7|?5Zz^WGfRvm)DYt6g^+SM;gRx3pa5wQNKL~Z<=_Z+#t1!hc6CRpi>x-ZhzPkm zsf$>Ep)ydEj~$eI8Cf}L8Q`lZ zDXRbhD?;Ryg#Psr0ebUxa)FrK)caRoz@55?8wP`dNK5yQj%AOLz6`(>%Uc{HymBVWyirj?lte zDc2-FavG$B-cezaxvn>15)}3$z!Ce~$DPl9$6+^GSp=*DSEta@t2>$K-Ykv^yQVLo z@b!b+?4a;zdJvuw6v+Xi7XvZCKy0{J(BGFJA!Qm(6m9sl8U5dvf3p{gfc}dlz{5rJ zr;>kXFJb`wq2zDLla6#j|K8`H>{n@l?*Cm9u*>v+$HZdajW-&o?;oFy9PL|F*aXm+I$P3ZgjxtKuLSMAEM8o(P-;ihx@k(wHz@=5hKBCceT;3uC6Z1{M*fw zV^}^?4t29LX@?RP(qD9D`svCXp1M4`Lp&z3XS?>`s9g%Qm_@vbzFV{Z`u9SktQ+d- zF+ZehYidG;#c9N^-gJd!j0GJ392E=r^@e)T_RoR5CuFn7=!w2=9q*O?yjx*~=8T$L z!hw663oV(dVMkd!+}zD+X=$Trm(>cnakEh_jkO0GE0b5M4M2-RtbJi8Mr-JWKj+Id zW$byRO)&yI@?V?AchGW#*AHpV+RhUnG#|9&iUv-wsy>>SdfUH1jte{JAQm~(8oSCD z!VYIP=DPeuLylF3rsMk#4k*3H9h8~17S$^tg`DlQ5w+F$am+qMEOCz~S`@^BS>N$n z`FYfKw~g`{e}Pb`%@JN6P5!N5BJR27LWU?vK~AmZV57@GmN$QG+R$`vL7iDMZ@Dp; zny%`%V)NW0G5WM?`~W8wRHfDE9lW_ULS|;}Nk~X|;GTOb8=A`nE_f<=S^0Q#8ecJ_ zNaL0k*YD@Lh`&JTh5h~+)W^xk$HzSDGVu+6A*rSWLEATMMONbDJ1jayUfHk@x|RXb zgu^pTnR_fvO%WX7ig9HwG%+#p()4VrLP$e3SSg|Rg4pUgL~#gpV=hsiPzA!Y z#_>pp`u?1z4=+FO`ujy-4sraMyxHf)mfl?wgW*t$Apa5|*@_;~Y9{?Lwf^7S{zsB= zd{QiEIz}pVLto>#-(cKm198L>hPiY&(Oo;!w7;X2oHL+I3Ey$}};gkb7=72KfUVEmk~;H_;}i|ctBtXD0CP2g$(p0Tg0^=IK5o2v`g zf~daWnuCTs(ZEZreG&4)$~0KE)RA{|(2^_TWzU$5@r=gg)_9k1>0D<>>9h)1l!d~K zV&aUrCLbMIktiaQHFRBJC+?hn@5W){Vmu=(ycnLwo(g5ipU=n06Ui|}ZNEfvWDoY) z+{qb*e=AS)$fES*PScBDQ?Q_1EMd73#jxK|bcqAtdD9xdlg3)P@g$YgT``*cyZkj} z8YV^p1J<*ms1j-(T?j~N4=RlB*%|vY!NQA%6=y?STION`Ok;%cj4}y*@j0TluM-lc z0(gr>lxd#xWAAn~j^^kHHg)KtXbt(X>>?!sYMa!9Zxs!+^kS{~xdo$3^KT!>x0?dZ zCgbsamW%$frS-o6ZI`PFpAL_m*66;o#)c&c}_^klYx#xQ{RH8t;>yPSI%kQ4xQ`Y_E`EPC| zaLm^a(p%~6dKOrb?0GM~41*0qG;TZCRAmmC0xsUZ5NCSJEmUTCC#oo|wsfuWhY33l zG}9KTp`nead)))x|4_-odY%E6O%scZv=OYO>yvGx=;1qZ>daBJwiX|*3O(MGdWWL! z*z|608j+JB2f69b@#!fL|Geu;apcU4>W7 zF@{U95@0~@{5Gpp!t{ov@E(d*p}alKWw+=PsOf$Gw0K(-txO$M7g&SNXITLW zU{4!za)bRihye_=3cJwo56oYWceHAdDk$J4b~niSSMR2tHi59IgnbZ7};=Bw797FB$#l#o=(U1hStYXq{;xr+^_ zX+TG5IJjt0x!7T*=XOKts@ed#+~rgG<}atquj3i3RAqv|W7SlV5Aq>)_X)iZ>OOpV zg=RB0v()py>Gc(UzbWX&^ABk1)Zu=*sq#wb(X0a_n81c6S_xUBXeAlC=h@J&^4C&b z{HJ=_D0{Mr`&Q5Pn~-&Kct(cq;*U2TbR}LAz5PDJ3qBiV!pl)_*8hm;JI4sqv^STG zlxYu`>P|%bdOY!Yd$@n%#+vICVLOoCVyM$yCZWKYUd-6e-u(W+RRfKZRTFzZ+vrFR zH<-PhL5@E7Njs7WP$Jjtd=mYLPXE)SS6n#ElITR(c$l9KTk2~B6RiGxd{dQVe%NHz z^y=|+C*&~RE}^ZPiOo5)4SqjF^%G_^;lR)S^?7dle3XY zqzTI)iR+Gyb`?(=l$pM!ZaJqe6AIpy>l@hDe15ldAN4h!4<0r5iW3WE$KSwiT@h_* zPA8%aBM;js^)Cb?Ny&PbCQvNQFzh48vi(@@*{7`!46FP2Y%j`8KIK1}}NTt|rdH9yJj+=(xV?w!i8U(iBI<_(ADGeCH-4GzKz zVbdN=eW7%{WY1#vkQBiuV{BOVRM~^?8TvYx3D>t^H9P03+&c~;`pjnYLzPCC?yF+o z#rAd8b_86Qbkmk@e>p63X%l(TZ(i3!WmlY~&Vt6w`cB-r*HS9jhq=j!en2B)zm28c8>XWsqh&+A!voxDiv za7~oSYM%|^`VBSc`V__R0^QeBE=9t;;FfCImmP7l{E`7mYfG1u*|E0OobU*4u1ram z?&?w+X6eG6?4{9W;p=C(osK)LKLD$1{MZlUG82@Df`qc#01ITQw%Viqy(m3N*rB-K z=`<&HP(sbRp4(-Xj)UISPn%NEcU@hrHc>9?bt^qye=Fxgg!^9OhApA%sCV|9q??01 zvaq#LQidI;AfYfT>WOpldHDLv8e+BWYn7LU6?bZFWfPa0A$!bp{@t9>u5I&(Y%5j@ zdVLCSWnsXR$ek*roF3BFW0+@grgFiiF{PbOiph`-H&{_~AtS=@o83hURpkOSmsn6O zvwG5iU?7AR$Qui6S#zd}3Z21^V*BF9;(Ih1fVTJ|=xPrepi!c#X0%tKUqnU=C0CQq zGPyc$DfhWn!!?M*q2rjS_HE`eSSJxO^0C*ivT5f@;5j1;TwH3Ez3tubX-_l)Ede)| z9%J}C|C`Erzv`!)`Hwflb}CF{vuHO>3dGhQ(NUgsc4?t}g%w=+Ovd>o2?|3h2BvH6 zzHs7K>o|{GS`KWc^wW0PD8_5$XpK`>?@Ii62N+BqL*R9bgVZE&B+=FZDY-kI6?R8*6cr2T+>_|*G zHd_?(Va8H+-i2huLby{`KYkd~<``5~mE6iNvu3%9b@m#1+i0>($!na*eHmIwmvWoF z;8UI!>YdT#6hcbL;Y~1okYFZzE+PYKY#%xO16)lwUtw7&8`lNJI*4wArQ1rKXC#2| zZE*Vp*49mYbRV_i%sesC(XzNRv{WHLYJf8nnx^?sBktDYX(t4|CvZjU#tZLbkEuMKA{_wI*u1TY!8vCS$kxxPKU|7N0qZ`Un13JXj* zPcMFwPYz>b6633>s(T}`$m&NzA&`Q41$AaaHyLR4*4K(omZq}r-(J4+APQI1mg%v2 z;LM5^chYOegLRBLd>cgfX&7LSB zAqx44s$*3R?4iMT%6dY4LHN$pdNr?N6-S!C4y2e2eKz3e$gvj6_2=nS6D8-po@BK5 zTtE}02u)sXsGrbxuE`_wv*8H7z?SN&>zjp*+%FUXb#nOhkMrF8s(_awa2;Rrw;@F! z=T9X!QR;U)#o}zQ{ftc<-G{Q_4Dot^KMsIDZGZaH{^rA~T{ql5W5G84xljL60x_GocM&d4M3Tl^=4PmG;#O0Eo+KY% z^&(MOf{T_<;hw*>s2uZ(BKuK&<%xlzEPxly#i|LIoZ=Wjwj{3d`yv*@aE#X38Y6HZSu>M+0t}oA8BV|BFj(?1HG%5M@GMm zDrcrPB~?V`mO!i^--*ET%COr5UJihous6!u@nq4MKC;pW>AYoCD;qg~KO<5R1l<7}{pQgi8Q|0i%^Y93+T_wcLQ=ES#U*xq<89J5NI{dDwpt^oE!$F+bV!*!UUf(K5 zSDCf!6THx1QV?pF*Qts{ITkhek2Jru(u4@xS~pc?bWYu9S(gDe_F3s*OF=fgezA|# zkpJ;_Q4V<)UDOo8iyzqC%1ASIn{*d0y99>sU)|b8S{v&jf`n~NDIEu;yX-B@vUJ~0 zj%H>SOO3w`g+*=v8-vjDLbi-A&`V%GJxeJUg5_j>!uNbJ^rhu;&ABAy$L-o~O5y9H5~^1O2ZHSz^lDB|IzxQHWN!%}RUGWim*5+(6g|G3ao; zBwIr1)Q*SwD$J>A^9_6T)|}LqjrnYTw-s5YWc3?t8%y-n5y4)kAg&OnI*$);-48Ku zlrYuUpHT>V6=k^?aCjXK>s{)9?^bPu*Vmc}xCS>$LZqMlS{E>>5+{>@oe%p`>u)hx zJ(c_lJg28w_$Cu!e?gaOvr}RghV@97@Q@)oV?CE1s%9j$2?l=e)qOv8N5`|=>C@Sm z*Od(2MM`r8=QL&O!Ul-Rx9V{EtX8id$$hdSTPk^c3Hmi{v;Csu-gi=}*Inj>^dEs| zy2`SkITA|hQEFXd1NiGt%GE0AannwFGZ&1OuHDJ?zSbcS$*x{Nkra&j9^%&6Cg@vw zHgV!bgV%*RyRI)zHva)mPm|d@nnXtVoM0{Zu<3 z=Z&xny5~Rq!VgDa?Va1iOj+>0;^m|YULAUP#{GMoKWpHXr76pi&@nxZ>%qy(O-3tU zWwIvgA}gCn!Gp?axo#wRR+j+9%HOAC3v(pzR)$C)x4a!fL{Q}7vECO8cu7O0){c%T zn>AcGP86E3joprNRmq`haXlU~jmb?O%n^?anp~KVhja7t;24Z@0vahz%@sO#70Bl@ zGKa0VnoUt6YSEG{F|+soh$<^mbo|LYbsVtK!*Y*hsyg{ z#L0bQMZXU4Uj;W$l2+VdNaG~9!?6=(eV}2DRG&L6 zp)9feMCJ1~grb%7-6w3ckPS@Qp#K= z(?2Xjzq`E0Y3Fy1=-KcrxifY2D}*(j3fjCi~tCnv1gJ4$eZ3daO>hm|k>&1Sj{X z_8^Huv!q?vt+4g)sYG^cjE0ks(_|k3qh1P~@hk4uzs=oY8_9z2+(gEY@1G|432WYp zsGG=tn+C2kAFD^sBX1SC+p-qv7Iv@wY=E2+8=ByZk!0;Vj8MU}Cx(>q+bC5Pu?jEg z#t%sb>~&o$zXNQ=X{#36IBN!E8M?ohr)WJcr1H6(Do3Y%pyd4$8bbn)yfh#SO`Xpk zohsFlHFS{J4_%+u8x+}CzShKI&}6sm_v^ECe;avOo7^6y%@65IvpeF_i45cz02Cnn zQqZoSfQ*HodHJT;vFzcm+maqB7a0j(tR)wxUNo2wU*>U7HR>l;JBbQ|VT;zx0xYIa zAAAjMmdwv`PGp?yZoY`S(br#CGh&F#(+X`WbpjTjvbNnBKCa*gEv>y-&^ZWdh!M6J zq!XWQWi;-_wi{fpg6rJI&KLOPJ^eMl?+9Hl>&f&*&rbR-g&#cky#2}c)o&SF?}&aK zbT>mM+Dg+o?l8doyAmF))r(CXJbA03$;v#i>`B~op?y~^$&d?8|fvW)3#Hn{|D#BfeIprnk z+MYn+g2XAYK8IfBql2#n%?25fu}968UkE?WMRLr)(ZXjDd+C-v^gDjZ8NIfvifnMA z2bhbt%`gMA)wx063WgqhVVDP7Bmfvr{qP0o>%=&w-p#ra=ct0YoiRS#4yTe#gxoOU z`egtCQSbSZ_HgxD%AGhk?gU(qMc6UqrVEvO6J6lyF*RKcmcfa4k6L` z3As&e^WlO z^ttx9UL;Oc*|NaGl?EXr8}?Tnl{>Ty-p&yPj@3TbCeR%pij7X)5j$jxbG83j06=*e zmf!ZQqKU-bMHQ`mmJ~g3<1GE+in$AwyT>%gi(IOu` z)45v!`sh$lWQC&TmsL|zaX}SRrm)r;WcID7t!G7Ai1WqiSE5PxBE0Z0v>J$Wb zQ|v6`#0K^%hHoiH)I^h!X!0kc8+F*_vRM`D*+~JHpjG)HxglkmtE_$2McZ}e1Ge$6 z@KYRE4;;v+Bt(i_-OC4%%^pw23Mt)hn5KX26Mk;z)O<2$wzJ~QbM9F?j#L1$b*JHN zGdJI0v+WME`%)VkAHIs+iXAEzZ*3El&;PRdOGt&H?ndFtOV^gl`B zdPQBaO(*3Rpx$z{gbzDj9J=O83j+7hNs;hWdEIm2)BFPig+{$sy+H+%Rtn=6a7LMp zEtQq>vz&A?P-|=J;{e_)bioMU@Kt4sSmg2E++;%*Lt{)y)pO5g~WaQadqsOG=6bZ}7`HcKIqNHyp7f`1 z85DAlx=ACbs;q{(9?cxazr$*zK=YxFLT>3XrDna51tE$NdL5tETzR{?xt_JUX;(2i3OP=c@DocU}`VcRQD(V|YHs}S{%l^xJ5p}8^d-P2%9cAJ$ zPF&IxSO22}YVWMT{D7EIs7mnBL3dAAihLwzxOV53$ho|DrKQNWt5)&~Ug4&u9&}@{$n-cAH}&=w z;eApEH8+ob{)nqaEQ7>wZfhDJt)`r;a~O$+DTkVUN}<(EjtIaVKvWV0 zls%R?K#O*5xIh$>F{qv`)s(eoWI3DdR5pvleK%AyqT`eV2+Gv?^>O9m&&JrM{(@?lex zotLt_e5HJ6^-6|VjLM^L(0<*I%6RJL!ayZ3{Zv#>Mu#%&Ec` z1@09jR$j>#nY1v8@%43CVSrk(Wm4OS8sd!fV$pG;WA7Kl8L>z>e2M3g`n3~U;NFi; z>10~TN3wRR;->+E#;a?mtTu&qkJ69QcW?}__U!^by+)!Lq$=T=JR9ykzSU`DtM>(P z?ALBYOz*7oa<`IQt|O1_m4D4+LFp%vF8SC0~5X}{R~;@ z&f`n>u3o>^?$CZeiINVKff2xSH9zdi%_3VCc{|yk!*ab@$75DFesZRmvdXqDM&{-p zh5L*Y>9EotuOC0?CLrc=s1@uu#}V;~oe9cw4jia;2Xl`0zrLIB-(Ph2AKra9A%!y@ dgwdP^W#!i#{t{ul1iZQg($|IEEZ4S={119U)2sjh literal 9083 zcmch7cTkhh*Ka_Oj_{=;2sV1Jp@Rqrk{}=*DIyX;AP^8j2T@eoS5b)}(tB43JyZda zlF+3$Nk9lKKI{QIN7OzC0AuT@e0_yP@V11TolAK>MzrC>FB8{0b-vjjbF6Zaxf3c?ZVC-Aj`}Y14Y(W09%U~@m zdQ({iXla`q`z=$S1MsspvsQ1)DbGigb}h2}h2n(N)=JxkS|ngJOXT<#?P`{F`{zp} z*K9uS=+L(d;c_Ve3=~>`n=zFQ9;w}^2Rwicy@A}MU9H+(=*P;{y@hGFhLblR?QBd| zFP+J@0uurK8)WBjbH}FVL`|K>Oz+GT38q2Kyx)sb=zj9nJWuCh)gi%5hpUqlSs8UY zWKOqm=LS&cXm6x*Lei!JRd~>#?M;{S`Gw+3JVpTNaePF`Oqi&27JBvDOk9pCODavq zSw{QpcWS5b*)0rM{8i-)>b9l_;~*z;NU7=hIN9J{OZbsR`9IMw4_9+j-a2GPSkKh^ z=hg?V4cpDPWOl+znGOyfrTzs%fAZ7nmRrs*EFfMPv|0JeSj@xqW^L~z(s{k?T_fRa2Hn&M@@#N? zu3oooub^8Y)1c$D=02UF}NC58gkQrg+icaE5 zz*dbtfv$Q~W!bev#2zqp%ii4W?JrNs_l09Xo1U}1dF3H$+#QbH^5AdrM9+3Oxh69a ziI2N`IlB8T_ZS0Tu*Wkf{vq+pfu+2s2B2o_B2j3%LA|&e?&U**!sR5t0C2nZ1m0G! zinE2gJ}_cU=4)kTs;q&W_rUCi1LyXm#jh6);mMpCy*9y{D36!E0E8IQj_}UP+`Ktx zecaRe_^@U{)5X^O!pN zCWpw89XAR9WsT(kJl%E$Y4;dT9SE=j2HC0)%NPc8Y4zy_=>Q^XK;WwEu_B~|7SPTB zpvcmQ0_ed2HWVOwf#(0+#l5L-0ND19I^6Ax3|(6x275a2k;iK}r?bJiDe#PFvZ}R>$=GSnT5ok}35f^jwI*ujxD28D>H9@! zECMY;5!xiuj4K0W3QtJI3T{JrBR9n>Q!+Vcfu=}8scyK>`bF^dj&rNcA8`vbV$yQU za6Boe@w$k+{orB){s+Yei#v+31wgMq&r+oq#eq~m*^~!rwRt!*DDSC24}@e)`W^Xd zkGkH2Quk9rR%FcM<(BJ_@v4L#91V+qI;tS_9Fk^)^=C%`6yu-9{jjDBj<`)cDNxj< zC`foAG0B@J5pJ5aqHR*>0s16#GEe6xMLo)x#q>sFhKNHugB-|5(F^&?U7#WTXKo=c zjcD5~GFN-6l;o9m2B@`q9#FV7O%KO5k# zEwY%8jU}&-DF^a;i>!}1sR>#8g;8fcz%?Y9U$l+EidKJg%C`_8fFkqcWeRq0-9xw8 zE?WfTR?^}9OOW{g=n?=e%8{N_{rJvCjkzWZrvmCo#3s3QaU0tdXUKI z^@Sd+n^etd#$98k!CFcQ`Tft!sytjSO@A8@$0SAUb~XK_cq=Hi(m+Q?-;<44j_66E zICVQi+uo=;ttdcoRg%)c-6|;1hf)(QcA0^FYh<#0y)(tm&Y!Hc2DHBjtmTx6JI~%n zUF3{c)|{p-&>$*x!jD$0xs(S>(!EDc%B`!MAO8LuFk!iquAyODtDw0zyS+s) zp+ygzH9zBv<$!p)w16&VB)D}76z-6$>=r*qZCRUdn#j5?^#6m>ZMsx#lbcd&VHkp+ zx3MCTm^^IJfvnU&8T;r{RzabyMZqb<<{=eP7kg`S0tZc*P8l{2MwsQv<+R^uMRBoh ziLCO$l8haZm#PLwW;niRaB*A-L9^*uO(6z&vIJ6JZ{|3JHE;*akXig@2f~4nZ%EgilLly+MQA*1l_GB*U0`{0zq<8j}Ms1g7gC6w# zTCE9ARDG3933ubigRMxOOEoWhf@(gDH!VS0evN&))<_T1H=_}iDWe|s*Q&F0VBJ+b zjF)D5kSz`@UV9mI+ZlQ+IK6Kk-A$TKs@?xiG;vA(4OXlhiS*+ht9WVm$;dNP#W9;k zbic7mhQQR1N#-$_k!vXUJ=PDwpvu;8=YDDpb1f*4W-F`HXTuM3f!WqLqng!aCrdFOL?ht}EW~ z9nW8Wu&LH4B8Rm)N%Y8^Hi)ne<>T(=Vgh?zMf$({W$_Q;pG8ir)&vhc#(QnpDW486 zPQ~wvz6RQ1YNmRVUe!Zw3ALEV%}8ltQSrRB!==X!g>6#Gx~ec~rJpLul|F$BHDuZ1 zS6X_?>ah-#cPw?1DDzc5lox*FV$GjpPMVf+g*X4g4!sY)6r~-@kv(bU{goSHw>UZ6 zHY3AdwH*-2+Gr_owIkrM-oZSGeq{EPAKja6pTBSyVi6F6XA0Ex^BxQI2hsN{c02^J zw~H$kTZYsIO80luiO>&j#^Lp|?cgDsnI78aF$}S(UGYz83f4#^!LlFEbP5FRaUE?l z*q9?*mm5G&3rM%YFW^Aen{0_rV{GScjbE?>HzFk=mrK)>J$@n2JbO|y**eDMYeu1) z|JjrB()`B?c%O$yy3DhGrzlDJg97yx@AwK%Q#)+fXCi(tq=Z~wLycDsg5upbc98_gz zYN&r=9zIA}g520R+`^;^f&&!yieRATNJjxJ)lpbT%aZN)JX(#n)HELH-s#>3)uBU% zx`rwJ?KPzazl8;VUud?NbeXW?G+t(W=V9rm6OpBBpL~gP^u6Z;t5F(pBuEXkU!Bf% zyYE+C@`jP(QX;Gpf8Bf%a3t_!U0hc+pkan9>#t#=-s!>Kr|fkjwdVVPqtnRr;_z!L zQ-{cE1DDu^yg~FpCvrYVc2G?>_cA}$(kv_>RZZ=?TZuvdn0l*MoJ(!5)4# zlp`*u@YnR_13SOqQ`<|imQW`gIISSC@1${L$c=@5aQrYNX6r2H#mZSu?qB)xudCPp zc~t$M!ByGS2y!D(^Trm*sV7-k82I@`OavVpD(Tz8BE!Whbm$^Cw?}}|uKSU&TGhFt zy|F4!M3N#FSGTTqsPr^vp1%1vK4RvwzALz3?P7VN+@NrM<@^vOG1(Y3hdV{M|P1pS119 z7;jXrJpsc#p|UkrR;vc?htz!359~uV3Iq9;PYTU$0(rE$w<52mGm*5F%MAsU2hlZ{ zpP+_xWPl!Y*Fi(M-qsIYYR|0QR zZFnxG`4UfS;F7G)iBVADr16;6DjxFiG!0=K_n{h~2KOYQbwJufg2(7oQ19#M)1&$FEV>J`zwa9~)R?)?Xvd zzKO<;&|32$&X$Un@6Uf$ATRTS=7!>~-kKIi{8=HI$ipL-U8m+&CNTU` zS6(mNnoytcIz3vt!J)`v0M$0;Nv4#xh+vwhx2<;%G^s8H6vJpQ|s9l_rR(&f4hp;pJ|=vWI>)JOf~W}pfJ}Q zTnE*|EAL!qQi}&YA>*SgE@7_4ukE1VsC4B+-bjOsJDbgk}wgnyu~| z@|29Z@l@W3Up*I}FV#1xP8?@RDwr{s?93{NfmdEu&5U39=-_^h9)}+;tyNoWcqA2> zy$*NMJr-5To^(V%QdQDv4Nvv{9OT)sx&nyseixt&{#ob5yWs3`a>UEBo76@yAZPR) z1l*ey3gVUI#(hYC5ms6hEc(r=)u>xal7&> z4_&0zhFH&{=RST^UNO`qR5|&&@EIIEJGLy*0ig#tl@WC>MW!2nVS9d;rDq(r&`%h_ zUk}XYpcdJJxMS4F1v4{LVj^U}9RQ~{YwtyMDk9HnKYs6cmJ(J0A6!;5oqoFcAh0^OM}-<% z(p5)N2=H+VvkDpi;DH*rg53`fp0nZq$p7I;Kw{!C9egPvgf+BobK zLp0bEfn9WL?=pvJd!hQxl}MlIs@1~`46q0i?o-jEli3BI!z?$jvZF|x46ksVlWbI0 zc@FY(Xg6lynOG|FGz+ojK&tY{+iC@iP5lsjd!s&BAbGIfFWbNU%{C{JM`KQ-N1f9E zwuxKx#7JW`Xhl0LAx@_Vqxc-727Pm-6AYdn@;zp%|kkKc$@j2-R!9A~PC-p(Kv8lT}GNeV4y?LAB!VrD2nRvd?!plXE@KLj|SYy0*NT%D_qNR8Gu1X+-+nE0wBr>R-`V zgxvsshDk4nX57*^|J8I{_C&{7SV&DWazuToD@cDi{1-y`bwJAc;b$W4DJa5eb=yh} z3v7yrNlaKCOFm!h(st%TddxowdNPZ{glj*;F8Y=HG`?qD_$Zd8z4ufm@ucVSK=5^4 zqnL)dysw{?)oi93eOFzLis4_bG#C{A+}_Zj1TCRKjMd>TBmiN3{lDh^611 z=RbK%9d`E8g1>x>O+BW8jKqs?5F*$RD_>+^Ts9-AN|`tk6yga)#`9O!N)y)i3Bui% zA^uA1511`&CC@P-(3@WDo?+Q_uK9$%9aaT@_7s@NtNWuzu}-0|h*QD*-Ph1aC%y6! zDOWGl=xR=V#AAk1^>K;IN7V+z-CCSuNU6bWdO%$%^7oA^B=Hl>c>k@uZsQ2=>|9sI z9iu6;>7-NpeFP4(H2-3RPW^cF0QJUA=^mlaaA)glb`Y=5sSDNCgzOGkmJlEaT&L8` z7-7Q)#NR$j^x?Oi1u8g=K!K#j2Y2roLN0DP^B&N+-^8XB!IO~zMsE6HOou=XE1j+6 ztFLS3J9E-GOz6P~sH*_#c~80wZ_lN@GPzmVWRRbTu)}nKd}!pgMLsNcLgJKOmb+%% zjB(@lY(&y;5EwV;Zl}QfiRj}6UYPn^%UHz#bmR2 z#CbIG^P~|4C$Vrsg|Q!-I76vFRTB4Asg;85(j8{x!*h2((vt|mfD^CHz=6`&N)9kaHrbsKs5uTcFz7+?3%dMqE zqu^@=J!^WID(4GIL<+|F&}9`V4&nd))EjW1V1^IZH@u*CIfyq4DYz~of1D5Wu}-6Y zz4MMGnu7g#glq;$-DUOTE{nbaq>}k3W7;5iJZnZy|6hu*QAkCwu;v5_L>clz_lS?tFgb_>srL=2^9|_tO zi!Yd~W^vI1XZb9`f6W|GD&1y^_sb2A%PAUC$r&Cc?j`=zQkuF#D^rB$Af3ljEYBZ7 zC|#rF2MrlsnO6dcu=2}7lCd*Sh!kvjoJw7jJ1ZC#Z9N&MVV@Z0;6gE>fEL2+FnRBK zBhqOruiW|Z>uv>zEVC?S3;WOyeGzzOz&I4iio5FR(4hM->)Tw{+f7I0n?NdizML0J zzt}!;=3(}R(-rP66AoBzQ`x*jB( zq;Z}6rDsyKk5^SME+|x#Bu3L8h^TJ45k1~;9hg$K!UFIrA1;`p5IB&M)q@Mwu2~2i8Rm7O!0{%5=6^k^J^#4y$tE7S2sP7XhYy`gEC&j_zGipJ=NF z^(KWW>5u4fD|EXQt&VuGERcNe|E>5rp=PVafBDrgP1cw;a^_f#mj@*aKG`&fNds!E zYATXTePpDizc?+MI=|*8oO|j7tyg0|NC3)}vx9=5r#j$uD~;NQgJD$IFKS)EyQN+f zm7S%sh4Anxvqz1A#fKZ?()mof>!;@lvfUA$I(6O2R|fZ3!bD5+Zw@)G+lc~vN`1hP zf-{ihMm+;t_qcj%Bg{zr5{}>F_tcBxSVf!rWbnz9XlA%VF@YVRWcb_e_f-89erK-6 zV+`2YT`wDcwm*S=*daX#kn7bGM4wFvQyxyPVvcs zCwidT3zb`=73AmVU;Eq{UcPa=GQ&{iajmv>&0CQ5Dc%`iYO@&=m38oc4P9Q-(oX-;J@nZRW2< zs}yc7{e<5WAXgfa#~Y*8b?;x^SUAjrgV^7$c0VMUdXKV!x|$Yo?=EF24BfgK0|)jT zA39a{una#BL*h_sKo1t|_U3F;Cw|(tDim=}R1*V`IMKbf(dyKSB8mwAj2PbM-?aO# zNPQvbl8Z zG7f77*ghaC;2omgPkhcuzd|@OP63V7y}J{5n+{UO#(!}j#TorAR)IP|Rl=Xd+Gp{C zboccpSI_u|O^ieK9|p1PLLHfy8Q-=PS8 zTH#tibUh|GWE;Oo@;#j^Ai=Htg@NMIN+W%x^=>x&HFr@X*pUWIz8K^L1hAt}lE9lvCxsC{ z!NFuXrEE``M=g%wqyg2gkCJYLp*E*SFQ>&94{)lJz-I+G!1*3BU z*-#&XVyFnpv8iB~eeiO}6Fm&KfSn|C$+M zcc2QXe{VuOHYL2CFJuCjDNup92wQREsjk`=i**x*25q+}>E3(I-Fs%D^<=YYiIVZf z#Q1L_Jz9_dlvewmj$1-~C8cRZ2`pIK>+T!6+X&;;sOQ0=14j%@JSn`a-k&ogREps$ z%odQjhmYyOGXJ31kzZv9pGQ&*Ublpi2XAeUc3)tg6XlddrG%cN49eJ1{nDBfZy7+f zIBIsJswLzPC}H7lNG$G&(_V@DaZ_3D;6D>gBmWM`422z(;O;^#tV1?ew!{D38qO|0 z2#_Wn9{?mFa*bVX3^a%ALH35c=Mh$gTO(_`r^y?HHE+28A9 j+^POw_fd)}FJ#*Qy#aZ7?Ra4NUnye)@ZE|#F0ua$3gD^8 From 518443ea4eac508039100452f9b7a937ecc9621f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 11 Jul 2019 12:32:48 +0200 Subject: [PATCH 046/262] Improved menus --- pandora_console/godmode/menu.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 09a2aff770..c9d9902b86 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -24,23 +24,24 @@ $menu_godmode['class'] = 'godmode'; if (check_acl($config['id_user'], 0, 'PM')) { $sub = []; - $sub['godmode/servers/discovery&wiz=main']['text'] = __('Discovery Main'); + $sub['godmode/servers/discovery&wiz=main']['text'] = __('Main'); $sub['godmode/servers/discovery&wiz=main']['id'] = 'Discovery'; $sub['godmode/servers/discovery&wiz=tasklist']['text'] = __('Task list'); $sub['godmode/servers/discovery&wiz=tasklist']['id'] = 'tasklist'; - $sub['godmode/servers/discovery&wiz=app']['text'] = __('Applications'); - $sub['godmode/servers/discovery&wiz=app']['id'] = 'app'; - - $sub['godmode/servers/discovery&wiz=cloud']['text'] = __('Cloud'); - $sub['godmode/servers/discovery&wiz=cloud']['id'] = 'cloud'; - - $sub['godmode/servers/discovery&wiz=ctask']['text'] = __('Console task'); - $sub['godmode/servers/discovery&wiz=ctask']['id'] = 'ctask'; - + $sub2 = []; + $sub2['godmode/servers/discovery&wiz=hd&mode=netscan']['text'] = __('Network scan'); + enterprise_hook('hostdevices_submenu'); + $sub2['godmode/servers/discovery&wiz=hd&mode=customnetscan']['text'] = __('Custom network scan'); + $sub2['godmode/servers/discovery&wiz=hd&mode=managenetscanscripts']['text'] = __('Manage scan scripts'); $sub['godmode/servers/discovery&wiz=hd']['text'] = __('Host & devices'); $sub['godmode/servers/discovery&wiz=hd']['id'] = 'hd'; + $sub['godmode/servers/discovery&wiz=hd']['sub2'] = $sub2; + + enterprise_hook('applications_menu'); + enterprise_hook('cloud_menu'); + enterprise_hook('console_task_menu'); // Add to menu. $menu_godmode['discovery']['text'] = __('Discovery'); From 7c8cb75fafa417bff8a7893e0c095922ee0ed5e8 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 11 Jul 2019 13:25:29 +0200 Subject: [PATCH 047/262] WIP discovery agent deployment --- pandora_console/godmode/servers/discovery.php | 14 +++++++++++++- .../godmode/wizards/HostDevices.class.php | 2 ++ pandora_console/godmode/wizards/Wizard.main.php | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/servers/discovery.php b/pandora_console/godmode/servers/discovery.php index a2c0abd5d6..edf7cc989e 100755 --- a/pandora_console/godmode/servers/discovery.php +++ b/pandora_console/godmode/servers/discovery.php @@ -42,7 +42,19 @@ function get_wiz_class($str) return 'ConsoleTasks'; default: - // Ignore. + // Main, show header. + ui_print_page_header( + __('Discovery'), + '', + false, + '', + true, + '', + false, + '', + GENERIC_SIZE_TEXT, + '' + ); return null; } } diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index 8982d76d4b..210717ff1b 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -800,6 +800,7 @@ class HostDevices extends Wizard }).change();'; $this->printFormAsGrid($form); + $this->printGoBackButton($this->url.'&page='.($this->page - 1)); } } @@ -892,6 +893,7 @@ class HostDevices extends Wizard ]; $this->printFormAsList($form); + $this->printGoBackButton($this->url.'&mode=netscan&task='.$this->task['id_rt'].'&page='.($this->page - 1)); } if ($this->page == 2) { diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index d6bd9eaee3..a8294d3adb 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -335,6 +335,7 @@ class Wizard ], 'inputs' => [ [ + 'class' => 'w100p', 'arguments' => [ 'name' => 'submit', 'label' => __('Go back'), From 1e05f9a3969393a77f6912f139fbd10a170541e1 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 11 Jul 2019 19:25:49 +0200 Subject: [PATCH 048/262] WIP agent deployment --- .../godmode/wizards/Wizard.main.php | 83 ++++++++++++------- 1 file changed, 54 insertions(+), 29 deletions(-) diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index a8294d3adb..8f0bb0bbd8 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -374,13 +374,24 @@ class Wizard if (is_array($input['block_content']) === true) { // Print independent block of inputs. - $output .= '
  • '; + if ($input['wrapper']) { + $output .= '
  • '; + $output .= '<'.$input['wrapper'].' id="'.$input['block_id'].'" class="'.$class.'">'; + } else { + $output .= '
  • '; + } + $output .= '
      '; foreach ($input['block_content'] as $input) { $output .= $this->printBlock($input, $return); } - $output .= '
  • '; + // Close block. + if ($input['wrapper']) { + $output .= '
'; + } else { + $output .= ''; + } } else { if ($input['arguments']['type'] != 'hidden') { $output .= '
  • '; @@ -577,6 +588,7 @@ class Wizard $form = $data['form']; $inputs = $data['inputs']; $js = $data['js']; + $rawjs = $data['js_block']; $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; @@ -624,6 +636,9 @@ class Wizard $output .= '
      '.$output_submit.'
    '; $output .= ''; $output .= ''; + if ($rawjs) { + $output .= $rawjs; + } if ($return === false) { echo $output; @@ -649,6 +664,7 @@ class Wizard $rows = $data['rows']; $js = $data['js']; + $rawjs = $data['js_block']; $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; @@ -675,45 +691,47 @@ class Wizard $first_block_printed = false; - foreach ($rows as $row) { - if ($row['new_form_block'] == true) { - if ($first_block_printed === true) { - // If first form block has been placed, then close it before starting a new one. - $output .= '
  • '; - $output .= '
    '; - } else { - $output .= '
    '; + if (is_array($rows)) { + foreach ($rows as $row) { + if ($row['new_form_block'] == true) { + if ($first_block_printed === true) { + // If first form block has been placed, then close it before starting a new one. + $output .= '
    '; + $output .= '
    '; + } else { + $output .= '
    '; + } + + $first_block_printed = true; } - $first_block_printed = true; - } + $output .= '
    '; - $output .= '
    '; + foreach ($row['columns'] as $column) { + $width = isset($column['width']) ? 'width: '.$column['width'].';' : 'width: 100%;'; + $padding_left = isset($column['padding-left']) ? 'padding-left: '.$column['padding-left'].';' : 'padding-left: 0;'; + $padding_right = isset($column['padding-right']) ? 'padding-right: '.$column['padding-right'].';' : 'padding-right: 0;'; + $extra_styles = isset($column['style']) ? $column['style'] : ''; - foreach ($row['columns'] as $column) { - $width = isset($column['width']) ? 'width: '.$column['width'].';' : 'width: 100%;'; - $padding_left = isset($column['padding-left']) ? 'padding-left: '.$column['padding-left'].';' : 'padding-left: 0;'; - $padding_right = isset($column['padding-right']) ? 'padding-right: '.$column['padding-right'].';' : 'padding-right: 0;'; - $extra_styles = isset($column['style']) ? $column['style'] : ''; + $output .= '
    '; - $output .= '
    '; - - foreach ($column['inputs'] as $input) { - if (is_array($input)) { - if ($input['arguments']['type'] != 'submit') { - $output .= $this->printBlockAsGrid($input, true); + foreach ($column['inputs'] as $input) { + if (is_array($input)) { + if ($input['arguments']['type'] != 'submit') { + $output .= $this->printBlockAsGrid($input, true); + } else { + $output_submit .= $this->printBlockAsGrid($input, true); + } } else { - $output_submit .= $this->printBlockAsGrid($input, true); + $output .= $input; } - } else { - $output .= $input; } + + $output .= '
    '; } $output .= '
    '; } - - $output .= '
    '; } $output .= '
    '; @@ -721,6 +739,9 @@ class Wizard $output .= '
      '.$output_submit.'
    '; $output .= ''; $output .= ''; + if ($rawjs) { + $output .= $rawjs; + } if ($return === false) { echo $output; @@ -744,6 +765,7 @@ class Wizard $form = $data['form']; $inputs = $data['inputs']; $js = $data['js']; + $rawjs = $data['js_block']; $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; @@ -781,6 +803,9 @@ class Wizard $output .= '
      '.$output_submit.'
    '; $output .= ''; $output .= ''; + if ($rawjs) { + $output .= $rawjs; + } if ($return === false) { echo $output; From cac34e33115aa3920441ec67513d96d7d23f8691 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Fri, 12 Jul 2019 10:21:54 +0200 Subject: [PATCH 049/262] Changed gray image in discovery - #4351 --- pandora_console/images/wizard/tasklist.png | Bin 855 -> 926 bytes .../include/styles/pandora_black.css | 5 +++++ 2 files changed, 5 insertions(+) diff --git a/pandora_console/images/wizard/tasklist.png b/pandora_console/images/wizard/tasklist.png index 3250311b69cd02e87ea89b967c4579c3635a3c77..0875145b8ab70ae0188912d1c83087e6680aecfa 100644 GIT binary patch delta 867 zcmV-p1DyQV2A&6yNPh!BNkl=~K6owavA|*#4T?z`gfjEKV%ISh`AWmTC z1hG#5Wn7sX*kwAai0g0!j*wmFF(V7@t^^Mz65ltoBO^dazn-4ndVj4k00000r=X{~ zv9H(H1G{*%EwOE5+x+Ll!xEVlg%**YY#W!}`eemkpS#c(M}HRCF(jUi=__sLheu>b z-teR)E!Q-+SMWwXby#5*b}{q3oi@qQc3Urj6V@7`ZJUdE5b!jU0n(&(Rz$0%nC(nM7{!Gc!pURV=GcOoYuj-V6s7>tmGBj#=*zL-bf_phwiogtv@a6;B2Jl8@-C7Jwv&%g~~K7 zk&_noA_sL#(pp{cfY_;q$b}r=#{906Ix4D>OL=*3MSost?y*GmO^ZZU*8l(j00000 z00000;J?GUj%1(}1Z{t`8$WaY=%K7i@kc8QEfMTSvCEN+KicT~qpQ-zka$+`M@LNP zZd4n8bWCV_&~MQgx%5LO^m!ADSXcbf_BeK|alJs4ZXfz_EUQFQHlaI#UpkU0re#N| zFGtS`B7bjRKNU+h`}b`?L^8>d+hC7p;pc{_ZWXP00000000000Dk}gw1Q*KAH6pJY-Ef;nB&hMU3-+c z>s%;q>(T6v2-hAZ?mB&?XkM82rpO}ehTBS7t|{|JpGs)6=ls#`3-?tHQ87dML|!s~ zbRCaX{pp`J;FJ(fx+eHIp(f3FW7K_b_4? z?p$Uay~mBoMdXBk6o;pO4&d%8R^$dmV$o%|L2?5)LCOgt zPEdM+_y)-h!T~Hncin{*+xiCWyfPLRvds*hu^9Y)l7)m6%zO;bZ{!~nr2qf`z(3>h zcq9iV4t($|IMEMp`Y0r)S(eSvtkkD~l7-P=F!;6G?SA)N^nb^Ik_(2+XQe&|mYnP3 z)up!UhaVC9l<_Wfx!hQb)`OOrI4#xM?HQ6MRe#rjyjBwVJj+*?}Yrt1A$_v~KUT$nQ0^Qp&(YA1?tU7w5i<*|Hw{ z%0+b3jBUCQw11M^%LR*(y|!%6klbcvXlnAy3EAEx>+{{~hsTKg{nX=rZ7n+Rg|F&d ze<6cDw{DW6pLA%|uD9O2<(?S_c2_n2#1_RiEq$$VaPvJ~{~~Sy*0y zXfOF_NhUq0`h0X7$;G)x5zp*xU8!u!N57vj;8v1**WQ(~b~%zeSQ(nHvCS`~yht`b zt9XjYpMTeU^eNfiW^$zY=r2{Ruk*^#M04xPi0^U{<3-SFab=s27TLGz5Js0P>m)!; zjx8UZ^1B@X0000000000008iV++>Y?|2p4<-amSiW!Wv7!|xycm3;J`F7nX{^Z7FK z(a#b4l=048^U-oKdsK(br?+QFp4fy-N<2qCaeu{!ghNxS(osq$$rhF}%evY>x_34D zzT%VWV*lvH6*!$+w|5P-QY1c@uLm>PM<1nA3Zgl zP7MG4NxCq}M=x88?z+3s=lUDrWQ}tF=zcH3OR|ebd=*IY%zPzdSp~9xGynhqTp0fZ a7!?35(r%#v1DIq00000 Date: Fri, 12 Jul 2019 10:23:20 +0200 Subject: [PATCH 050/262] Changed gray image in discovery - #4351 --- pandora_console/include/styles/pandora_black.css | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index 92912e3c4c..a52c994ed2 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -237,19 +237,12 @@ table.table_modal_alternate tr:nth-child(even) td { background-color: #555 !important; } -.info_table .datos3, -.datos3, -.info_table .datos4, -.datos4 { - background-color: #666; - color: #fff; -} - .info_table .datos3, .datos3, .info_table .datos4, .datos4 { background-color: #444; + color: #fff; } .action_buttons a[href] img, From ecaba5ebd3f31e03ffced9c61a1d8d4d85a07195 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Fri, 12 Jul 2019 10:24:46 +0200 Subject: [PATCH 051/262] fixed errorsr macros reports --- pandora_console/extras/mr/30.sql | 2 ++ .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 3 ++- .../reporting_builder.item_editor.php | 26 +++++++++++++++++-- pandora_console/include/styles/pandora.css | 6 +++-- pandora_console/pandoradb.sql | 4 +-- 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/pandora_console/extras/mr/30.sql b/pandora_console/extras/mr/30.sql index eeb3b8d797..58abf6c562 100644 --- a/pandora_console/extras/mr/30.sql +++ b/pandora_console/extras/mr/30.sql @@ -10,4 +10,6 @@ ALTER TABLE `treport_content_template` ADD COLUMN `failover_type` tinyint(1) DEF ALTER TABLE `tmodule_relationship` ADD COLUMN `type` ENUM('direct', 'failover') DEFAULT 'direct'; +ALTER TABLE `treport_content` MODIFY COLUMN `name` varchar(300) NULL; + COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 60e19998e8..b59a76dfd2 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -724,7 +724,7 @@ CREATE TABLE IF NOT EXISTS `treport_content_template` ( `type` varchar(30) default 'simple_graph', `period` int(11) NOT NULL default 0, `order` int (11) NOT NULL default 0, - `description` mediumtext, + `description` mediumtext, `text_agent` text, `text` TEXT, `external_source` Text, @@ -1446,6 +1446,7 @@ ALTER TABLE `treport_content` ADD COLUMN `agent_min_value` TINYINT(1) DEFAULT '1 ALTER TABLE `treport_content` ADD COLUMN `current_month` TINYINT(1) DEFAULT '1'; ALTER TABLE `treport_content` ADD COLUMN `failover_mode` tinyint(1) DEFAULT '0'; ALTER TABLE `treport_content` ADD COLUMN `failover_type` tinyint(1) DEFAULT '0'; +ALTER table `treport_content` MODIFY COLUMN `name` varchar(300) NULL; -- --------------------------------------------------------------------- -- Table `tmodule_relationship` diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index ff8ca88e40..d358258e4a 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -865,7 +865,18 @@ $class = 'databox filters'; @@ -923,7 +934,18 @@ $class = 'databox filters'; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index de13b884ff..a5b96554b6 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5791,7 +5791,6 @@ div#status_pie { grid-template-columns: 50px auto; } - /* * --------------------------------------------------------------------- * - IMAGES FOR STATUS. This replaces the images of /images/status_sets/default/ @@ -5834,7 +5833,6 @@ div#status_pie { * --------------------------------------------------------------------- */ - /* Table for show more info in events and config menu in modules graphs. (This class exists in events.css too) */ .table_modal_alternate { border-spacing: 0; @@ -5863,3 +5861,7 @@ table.table_modal_alternate tr td:first-child { padding-left: 20px; } /* END - Table for show more info in events and config menu in modules graphs */ + +.fullwidth { + width: 100%; +} diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 95d6caadfd..656a83a3e2 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1402,8 +1402,8 @@ CREATE TABLE IF NOT EXISTS `treport_content` ( `type` varchar(30) default 'simple_graph', `period` int(11) NOT NULL default 0, `order` int (11) NOT NULL default 0, - `name` varchar(150) NULL, - `description` mediumtext, + `name` varchar(300) NULL, + `description` mediumtext, `id_agent` int(10) unsigned NOT NULL default 0, `text` TEXT, `external_source` Text, From 56ef03c27d8def88eb46002727cb68141a274fc6 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 12 Jul 2019 11:36:37 +0200 Subject: [PATCH 052/262] Update index.php metaconsole redirection --- pandora_console/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 21b5e35eb1..83d017bdab 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -149,7 +149,7 @@ if (isset($config['error'])) { // If metaconsole activated, redirect to it. if (is_metaconsole()) { - header('Location: '.ui_get_full_url('index.php')); + header('Location: '.ui_get_full_url(ENTERPRISE_DIR.'/meta/index.php')); // Always exit after sending location headers. exit; } From 5cfad4587df361fcce6933ffc492155106085c3c Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 12 Jul 2019 12:17:26 +0200 Subject: [PATCH 053/262] Revert "Update index.php metaconsole redirection" This reverts commit 56ef03c27d8def88eb46002727cb68141a274fc6 --- pandora_console/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 83d017bdab..21b5e35eb1 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -149,7 +149,7 @@ if (isset($config['error'])) { // If metaconsole activated, redirect to it. if (is_metaconsole()) { - header('Location: '.ui_get_full_url(ENTERPRISE_DIR.'/meta/index.php')); + header('Location: '.ui_get_full_url('index.php')); // Always exit after sending location headers. exit; } From cca5c7fcf3758f5ef8b42cfff02817abd43d7ba3 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 12 Jul 2019 12:27:58 +0200 Subject: [PATCH 054/262] Update ui_get_full_url meta with def. target/pandora_console as public_url --- pandora_console/include/functions_ui.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 97c8456c48..0440a234ef 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3799,6 +3799,9 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me if (ui_forced_public_url()) { $proxy = true; $fullurl = $config['public_url']; + if ($url == 'index.php' && is_metaconsole()) { + $fullurl .= ENTERPRISE_DIR.'/meta/index.php'; + } } else if (!empty($config['public_url']) && (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) ) { From e2f3a3fd0c90c509d3435490b8608f47b7c7350d Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 12 Jul 2019 12:35:39 +0200 Subject: [PATCH 055/262] Update functions_ui.php minor adjustment --- pandora_console/include/functions_ui.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 0440a234ef..718fba266a 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3800,7 +3800,7 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me $proxy = true; $fullurl = $config['public_url']; if ($url == 'index.php' && is_metaconsole()) { - $fullurl .= ENTERPRISE_DIR.'/meta/index.php'; + $fullurl .= '/'.ENTERPRISE_DIR.'/meta'; } } else if (!empty($config['public_url']) && (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) From 7288a6e262a1ed170ff20fbe1bbd8989276d489f Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Fri, 12 Jul 2019 13:36:29 +0200 Subject: [PATCH 056/262] fixed errors modules/sec in tactical view --- pandora_console/include/functions_servers.php | 694 +++++++++++------- 1 file changed, 420 insertions(+), 274 deletions(-) diff --git a/pandora_console/include/functions_servers.php b/pandora_console/include/functions_servers.php index 0850dcbfac..c8738b1bdc 100644 --- a/pandora_console/include/functions_servers.php +++ b/pandora_console/include/functions_servers.php @@ -32,9 +32,9 @@ require_once __DIR__.'/constants.php'; /** * Get a server. * - * @param int Server id to get. - * @param array Extra filter. - * @param array Fields to get. + * @param integer $id_server Server id to get. + * @param array $filter Extra filter. + * @param array $fields Fields to get. * * @return Server with the given id. False if not available. */ @@ -61,7 +61,11 @@ function servers_get_server($id_server, $filter=false, $fields=false) */ function servers_get_names() { - $all_servers = @db_get_all_rows_filter('tserver', false, ['DISTINCT(name) as name']); + $all_servers = @db_get_all_rows_filter( + 'tserver', + false, + ['DISTINCT(name) as name'] + ); if ($all_servers === false) { return []; } @@ -76,7 +80,11 @@ function servers_get_names() /** - * This function forces a recon task to be queued by the server asap + * This function forces a recon task to be queued by the server asap. + * + * @param integer $id_recon_task Id. + * + * @return void */ function servers_force_recon_task($id_recon_task) { @@ -141,9 +149,10 @@ function servers_get_total_modules() /** - * This function will get several metrics from the database to get info about server performance + * This function will get several metrics from the database + * to get info about server performance. * - * @return array with several data + * @return array with several data. */ function servers_get_performance() { @@ -161,18 +170,20 @@ function servers_get_performance() if ($config['realtimestats'] == 1) { $counts = db_get_all_rows_sql( - ' - SELECT tagente_modulo.id_modulo, + 'SELECT tagente_modulo.id_modulo, COUNT(tagente_modulo.id_agente_modulo) modules FROM tagente_modulo, tagente_estado, tagente WHERE tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo AND tagente.id_agente = tagente_estado.id_agente - AND tagente_modulo.disabled = 0 AND delete_pending = 0 - AND (utimestamp > 0 OR (id_tipo_modulo = 100 OR (id_tipo_modulo > 21 AND id_tipo_modulo < 23))) + AND (utimestamp > 0 + OR (id_tipo_modulo = 100 + OR (id_tipo_modulo > 21 + AND id_tipo_modulo < 23) + ) + ) AND tagente.disabled = 0 - GROUP BY tagente_modulo.id_modulo' ); @@ -205,6 +216,10 @@ function servers_get_performance() case MODULE_WEB: $data['total_web_modules'] = $c['modules']; break; + + default: + // Not possible. + break; } if ($c['id_modulo'] != MODULE_DATA) { @@ -259,6 +274,8 @@ function servers_get_performance() case SERVER_TYPE_EVENT: case SERVER_TYPE_DISCOVERY: case SERVER_TYPE_SYSLOG: + default: + // Nothing. break; } @@ -272,17 +289,22 @@ function servers_get_performance() $interval_avgs = []; - // Avg of modules interval when modules have module_interval > 0 + // Avg of modules interval when modules have module_interval > 0. $interval_avgs_modules = db_get_all_rows_sql( - ' - SELECT count(tagente_modulo.id_modulo) modules , + 'SELECT count(tagente_modulo.id_modulo) modules , tagente_modulo.id_modulo, AVG(tagente_modulo.module_interval) avg_interval FROM tagente_modulo, tagente_estado, tagente WHERE tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo AND tagente_modulo.disabled = 0 AND module_interval > 0 - AND (utimestamp > 0 OR (id_tipo_modulo = 100 OR (id_tipo_modulo > 21 AND id_tipo_modulo < 23))) + AND (utimestamp > 0 OR ( + id_tipo_modulo = 100 + OR (id_tipo_modulo > 21 + AND id_tipo_modulo < 23 + ) + ) + ) AND delete_pending = 0 AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente @@ -293,16 +315,15 @@ function servers_get_performance() $interval_avgs_modules = []; } - // Transform into a easily format + // Transform into a easily format. foreach ($interval_avgs_modules as $iamodules) { $interval_avgs[$iamodules['id_modulo']]['avg_interval'] = $iamodules['avg_interval']; $interval_avgs[$iamodules['id_modulo']]['modules'] = $iamodules['modules']; } - // Avg of agents interval when modules have module_interval == 0 + // Avg of agents interval when modules have module_interval == 0. $interval_avgs_agents = db_get_all_rows_sql( - ' - SELECT count(tagente_modulo.id_modulo) modules , + 'SELECT count(tagente_modulo.id_modulo) modules , tagente_modulo.id_modulo, AVG(tagente.intervalo) avg_interval FROM tagente_modulo, tagente_estado, tagente WHERE tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo @@ -319,50 +340,73 @@ function servers_get_performance() $interval_avgs_agents = []; } - // Merge with the previous calculated array + // Merge with the previous calculated array. foreach ($interval_avgs_agents as $iaagents) { if (!isset($interval_avgs[$iaagents['id_modulo']]['modules'])) { $interval_avgs[$iaagents['id_modulo']]['avg_interval'] = $iaagents['avg_interval']; $interval_avgs[$iaagents['id_modulo']]['modules'] = $iaagents['modules']; } else { - $interval_avgs[$iaagents['id_modulo']]['avg_interval'] = servers_get_avg_interval($interval_avgs[$iaagents['id_modulo']], $iaagents); + $interval_avgs[$iaagents['id_modulo']]['avg_interval'] = servers_get_avg_interval( + $interval_avgs[$iaagents['id_modulo']], + $iaagents + ); $interval_avgs[$iaagents['id_modulo']]['modules'] += $iaagents['modules']; } } + $info_servers = servers_get_info(); foreach ($interval_avgs as $id_modulo => $ia) { switch ($id_modulo) { case MODULE_DATA: $data['avg_interval_local_modules'] = $ia['avg_interval']; - $data['local_modules_rate'] = servers_get_rate($data['avg_interval_local_modules'], $data['total_local_modules']); + $data['local_modules_rate'] = servers_get_rate( + ($data['avg_interval_local_modules'] - $info_servers[$id_modulo]['module_lag']), + $data['total_local_modules'] + ); break; case MODULE_NETWORK: $data['avg_interval_network_modules'] = $ia['avg_interval']; $data['network_modules_rate'] = servers_get_rate( - $data['avg_interval_network_modules'], + ($data['avg_interval_network_modules'] - $info_servers[$id_modulo]['module_lag']), $data['total_network_modules'] ); break; case MODULE_PLUGIN: $data['avg_interval_plugin_modules'] = $ia['avg_interval']; - $data['plugin_modules_rate'] = servers_get_rate($data['avg_interval_plugin_modules'], $data['total_plugin_modules']); + $data['plugin_modules_rate'] = servers_get_rate( + ($data['avg_interval_plugin_modules'] - $info_servers[$id_modulo]['module_lag']), + $data['total_plugin_modules'] + ); break; case MODULE_PREDICTION: $data['avg_interval_prediction_modules'] = $ia['avg_interval']; - $data['prediction_modules_rate'] = servers_get_rate($data['avg_interval_prediction_modules'], $data['total_prediction_modules']); + $data['prediction_modules_rate'] = servers_get_rate( + ($data['avg_interval_prediction_modules'] - $info_servers[$id_modulo]['module_lag']), + $data['total_prediction_modules'] + ); break; case MODULE_WMI: $data['avg_interval_wmi_modules'] = $ia['avg_interval']; - $data['wmi_modules_rate'] = servers_get_rate($data['avg_interval_wmi_modules'], $data['total_wmi_modules']); + $data['wmi_modules_rate'] = servers_get_rate( + ($data['avg_interval_wmi_modules'] - $info_servers[$id_modulo]['module_lag']), + $data['total_wmi_modules'] + ); break; case MODULE_WEB: $data['avg_interval_web_modules'] = $ia['avg_interval']; - $data['web_modules_rate'] = servers_get_rate($data['avg_interval_web_modules'], $data['total_web_modules']); + $data['web_modules_rate'] = servers_get_rate( + ($data['avg_interval_web_modules'] - $info_servers[$id_modulo]['module_lag']), + $data['total_web_modules'] + ); + break; + + default: + // Not possible. break; } @@ -385,25 +429,33 @@ function servers_get_performance() $data['avg_interval_total_modules'] = (array_sum($data['avg_interval_total_modules']) / count($data['avg_interval_total_modules'])); } - $data['remote_modules_rate'] = servers_get_rate($data['avg_interval_remote_modules'], $data['total_remote_modules']); - $data['total_modules_rate'] = servers_get_rate($data['avg_interval_total_modules'], $data['total_modules']); + $data['remote_modules_rate'] = servers_get_rate( + $data['avg_interval_remote_modules'], + $data['total_remote_modules'] + ); + $data['total_modules_rate'] = servers_get_rate( + $data['avg_interval_total_modules'], + $data['total_modules'] + ); return ($data); } /** - * Get avg interval + * Get avg interval. * - * @param mixed Array with avg and count data of first part - * @param mixed Array with avg and count data of second part + * @param array $modules_avg_interval1 Array with avg and count + * data of first part. + * @param array $modules_avg_interval2 Array with avg and count + * data of second part. * - * @return float number of avg modules between two parts + * @return float number of avg modules between two parts. */ - - -function servers_get_avg_interval($modules_avg_interval1, $modules_avg_interval2) -{ +function servers_get_avg_interval( + $modules_avg_interval1, + $modules_avg_interval2 +) { $total_modules = ($modules_avg_interval1['modules'] + $modules_avg_interval2['modules']); $parcial1 = ($modules_avg_interval1['avg_interval'] * $modules_avg_interval1['modules']); @@ -416,21 +468,23 @@ function servers_get_avg_interval($modules_avg_interval1, $modules_avg_interval2 /** * Get server rate * - * @param float avg of interval of these modules - * @param int number of modules + * @param float $avg_interval Avg of interval of these modules. + * @param integer $num_modules Number of modules. * * @return float number of modules processed by second */ function servers_get_rate($avg_interval, $num_modules) { - return $avg_interval > 0 ? ($num_modules / $avg_interval) : 0; + return ($avg_interval > 0) ? ($num_modules / $avg_interval) : 0; } /** - * This function will get all the server information in an array or a specific server + * This function will get all the server information in an array + * or a specific server. * - * @param mixed An optional integer or array of integers to select specific servers + * @param integer $id_server An optional integer or array of integers + * to select specific servers. * * @return mixed False in case the server doesn't exist or an array with info. */ @@ -461,127 +515,211 @@ function servers_get_info($id_server=-1) foreach ($result as $server) { switch ($server['server_type']) { case SERVER_TYPE_DATA: - $server['img'] = html_print_image('images/data.png', true, ['title' => __('Data server')]); + $server['img'] = html_print_image( + 'images/data.png', + true, + ['title' => __('Data server')] + ); $server['type'] = 'data'; $id_modulo = 1; break; case SERVER_TYPE_NETWORK: - $server['img'] = html_print_image('images/network.png', true, ['title' => __('Network server')]); + $server['img'] = html_print_image( + 'images/network.png', + true, + ['title' => __('Network server')] + ); $server['type'] = 'network'; $id_modulo = 2; break; case SERVER_TYPE_SNMP: - $server['img'] = html_print_image('images/snmp.png', true, ['title' => __('SNMP Trap server')]); + $server['img'] = html_print_image( + 'images/snmp.png', + true, + ['title' => __('SNMP Trap server')] + ); $server['type'] = 'snmp'; $id_modulo = 0; break; case SERVER_TYPE_DISCOVERY: - $server['img'] = html_print_image('images/recon.png', true, ['title' => __('Discovery server')]); + $server['img'] = html_print_image( + 'images/recon.png', + true, + ['title' => __('Discovery server')] + ); $server['type'] = 'recon'; $id_modulo = 0; break; case SERVER_TYPE_PLUGIN: - $server['img'] = html_print_image('images/plugin.png', true, ['title' => __('Plugin server')]); + $server['img'] = html_print_image( + 'images/plugin.png', + true, + ['title' => __('Plugin server')] + ); $server['type'] = 'plugin'; $id_modulo = 4; break; case SERVER_TYPE_PREDICTION: - $server['img'] = html_print_image('images/chart_bar.png', true, ['title' => __('Prediction server')]); + $server['img'] = html_print_image( + 'images/chart_bar.png', + true, + ['title' => __('Prediction server')] + ); $server['type'] = 'prediction'; $id_modulo = 5; break; case SERVER_TYPE_WMI: - $server['img'] = html_print_image('images/wmi.png', true, ['title' => __('WMI server')]); + $server['img'] = html_print_image( + 'images/wmi.png', + true, + ['title' => __('WMI server')] + ); $server['type'] = 'wmi'; $id_modulo = 6; break; case SERVER_TYPE_EXPORT: - $server['img'] = html_print_image('images/server_export.png', true, ['title' => __('Export server')]); + $server['img'] = html_print_image( + 'images/server_export.png', + true, + ['title' => __('Export server')] + ); $server['type'] = 'export'; $id_modulo = 0; break; case SERVER_TYPE_INVENTORY: - $server['img'] = html_print_image('images/page_white_text.png', true, ['title' => __('Inventory server')]); + $server['img'] = html_print_image( + 'images/page_white_text.png', + true, + ['title' => __('Inventory server')] + ); $server['type'] = 'inventory'; $id_modulo = 0; break; case SERVER_TYPE_WEB: - $server['img'] = html_print_image('images/world.png', true, ['title' => __('Web server')]); + $server['img'] = html_print_image( + 'images/world.png', + true, + ['title' => __('Web server')] + ); $server['type'] = 'web'; $id_modulo = 0; break; case SERVER_TYPE_EVENT: - $server['img'] = html_print_image('images/lightning_go.png', true, ['title' => __('Event server')]); + $server['img'] = html_print_image( + 'images/lightning_go.png', + true, + ['title' => __('Event server')] + ); $server['type'] = 'event'; $id_modulo = 2; break; case SERVER_TYPE_ENTERPRISE_ICMP: - $server['img'] = html_print_image('images/network.png', true, ['title' => __('Enterprise ICMP server')]); + $server['img'] = html_print_image( + 'images/network.png', + true, + ['title' => __('Enterprise ICMP server')] + ); $server['type'] = 'enterprise icmp'; $id_modulo = 2; break; case SERVER_TYPE_ENTERPRISE_SNMP: - $server['img'] = html_print_image('images/network.png', true, ['title' => __('Enterprise SNMP server')]); + $server['img'] = html_print_image( + 'images/network.png', + true, + ['title' => __('Enterprise SNMP server')] + ); $server['type'] = 'enterprise snmp'; $id_modulo = 2; break; case SERVER_TYPE_ENTERPRISE_SATELLITE: - $server['img'] = html_print_image('images/satellite.png', true, ['title' => __('Enterprise Satellite server')]); + $server['img'] = html_print_image( + 'images/satellite.png', + true, + ['title' => __('Enterprise Satellite server')] + ); $server['type'] = 'enterprise satellite'; $id_modulo = 0; break; case SERVER_TYPE_ENTERPRISE_TRANSACTIONAL: - $server['img'] = html_print_image('images/transactional_map.png', true, ['title' => __('Enterprise Transactional server')]); + $server['img'] = html_print_image( + 'images/transactional_map.png', + true, + ['title' => __('Enterprise Transactional server')] + ); $server['type'] = 'enterprise transactional'; $id_modulo = 0; break; case SERVER_TYPE_MAINFRAME: - $server['img'] = html_print_image('images/mainframe.png', true, ['title' => __('Mainframe server')]); + $server['img'] = html_print_image( + 'images/mainframe.png', + true, + ['title' => __('Mainframe server')] + ); $server['type'] = 'mainframe'; $id_modulo = 0; break; case SERVER_TYPE_SYNC: - $server['img'] = html_print_image('images/sync.png', true, ['title' => __('Sync server')]); + $server['img'] = html_print_image( + 'images/sync.png', + true, + ['title' => __('Sync server')] + ); $server['type'] = 'sync'; $id_modulo = 0; break; case SERVER_TYPE_WUX: - $server['img'] = html_print_image('images/icono-wux.png', true, ['title' => __('Wux server')]); + $server['img'] = html_print_image( + 'images/icono-wux.png', + true, + ['title' => __('Wux server')] + ); $server['type'] = 'wux'; $id_modulo = 0; break; case SERVER_TYPE_SYSLOG: - $server['img'] = html_print_image('images/syslog.png', true, ['title' => __('Syslog server')]); + $server['img'] = html_print_image( + 'images/syslog.png', + true, + ['title' => __('Syslog server')] + ); $server['type'] = 'syslog'; $id_modulo = 0; break; case SERVER_TYPE_AUTOPROVISION: - $server['img'] = html_print_image('images/autoprovision.png', true, ['title' => __('Autoprovision server')]); + $server['img'] = html_print_image( + 'images/autoprovision.png', + true, + ['title' => __('Autoprovision server')] + ); $server['type'] = 'autoprovision'; $id_modulo = 0; break; case SERVER_TYPE_MIGRATION: - $server['img'] = html_print_image('images/migration.png', true, ['title' => __('Migration server')]); + $server['img'] = html_print_image( + 'images/migration.png', + true, + ['title' => __('Migration server')] + ); $server['type'] = 'migration'; $id_modulo = 0; break; @@ -594,31 +732,54 @@ function servers_get_info($id_server=-1) } if ($config['realtimestats'] == 0) { - // --------------------------------------------------------------- - // Take data from database if not realtime stats - // --------------------------------------------------------------- - $server['lag'] = db_get_sql('SELECT lag_time FROM tserver WHERE id_server = '.$server['id_server']); - $server['module_lag'] = db_get_sql('SELECT lag_modules FROM tserver WHERE id_server = '.$server['id_server']); - $server['modules'] = db_get_sql('SELECT my_modules FROM tserver WHERE id_server = '.$server['id_server']); - $server['modules_total'] = db_get_sql('SELECT total_modules_running FROM tserver WHERE id_server = '.$server['id_server']); + // Take data from database if not realtime stats. + $server['lag'] = db_get_sql( + 'SELECT lag_time + FROM tserver + WHERE id_server = '.$server['id_server'] + ); + $server['module_lag'] = db_get_sql( + 'SELECT lag_modules + FROM tserver + WHERE id_server = '.$server['id_server'] + ); + $server['modules'] = db_get_sql( + 'SELECT my_modules + FROM tserver + WHERE id_server = '.$server['id_server'] + ); + $server['modules_total'] = db_get_sql( + 'SELECT total_modules_running + FROM tserver + WHERE id_server = '.$server['id_server'] + ); } else { - // --------------------------------------------------------------- - // Take data in realtime - // --------------------------------------------------------------- + // Take data in realtime. $server['module_lag'] = 0; $server['lag'] = 0; - // Inventory server + // Inventory server. if ($server['server_type'] == SERVER_TYPE_INVENTORY) { - // Get modules exported by this server - $server['modules'] = db_get_sql("SELECT COUNT(tagent_module_inventory.id_agent_module_inventory) FROM tagente, tagent_module_inventory WHERE tagente.disabled=0 AND tagent_module_inventory.id_agente = tagente.id_agente AND tagente.server_name = '".$server['name']."'"); + // Get modules exported by this server. + $server['modules'] = db_get_sql( + "SELECT COUNT(tagent_module_inventory.id_agent_module_inventory) + FROM tagente, tagent_module_inventory + WHERE tagente.disabled=0 + AND tagent_module_inventory.id_agente = tagente.id_agente + AND tagente.server_name = '".$server['name']."'" + ); - // Get total exported modules - $server['modules_total'] = db_get_sql('SELECT COUNT(tagent_module_inventory.id_agent_module_inventory) FROM tagente, tagent_module_inventory WHERE tagente.disabled=0 AND tagent_module_inventory.id_agente = tagente.id_agente'); + // Get total exported modules. + $server['modules_total'] = db_get_sql( + 'SELECT COUNT(tagent_module_inventory.id_agent_module_inventory) + FROM tagente, tagent_module_inventory + WHERE tagente.disabled=0 + AND tagent_module_inventory.id_agente = tagente.id_agente' + ); $interval_esc = db_escape_key_identifier('interval'); - // Get the module lag + // Get the module lag. $server['module_lag'] = db_get_sql( 'SELECT COUNT(tagent_module_inventory.id_agent_module_inventory) AS module_lag FROM tagente, tagent_module_inventory @@ -630,7 +791,7 @@ function servers_get_info($id_server=-1) AND (UNIX_TIMESTAMP() - utimestamp) > tagent_module_inventory.'.$interval_esc ); - // Get the lag + // Get the lag. $server['lag'] = db_get_sql( 'SELECT AVG(UNIX_TIMESTAMP() - utimestamp - tagent_module_inventory.'.$interval_esc.') FROM tagente, tagent_module_inventory @@ -641,162 +802,119 @@ function servers_get_info($id_server=-1) AND (UNIX_TIMESTAMP() - utimestamp) < (tagent_module_inventory.".$interval_esc.' * 10) AND (UNIX_TIMESTAMP() - utimestamp) > tagent_module_inventory.'.$interval_esc ); - // Export server + // Export server. } else if ($server['server_type'] == SERVER_TYPE_EXPORT) { - // Get modules exported by this server - $server['modules'] = db_get_sql('SELECT COUNT(tagente_modulo.id_agente_modulo) FROM tagente, tagente_modulo, tserver_export WHERE tagente.disabled=0 AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.id_export = tserver_export.id AND tserver_export.id_export_server = '.$server['id_server']); + // Get modules exported by this server. + $server['modules'] = db_get_sql( + 'SELECT COUNT(tagente_modulo.id_agente_modulo) + FROM tagente, tagente_modulo, tserver_export + WHERE tagente.disabled=0 + AND tagente_modulo.id_agente = tagente.id_agente + AND tagente_modulo.id_export = tserver_export.id + AND tserver_export.id_export_server = '.$server['id_server'] + ); - // Get total exported modules - $server['modules_total'] = db_get_sql('SELECT COUNT(tagente_modulo.id_agente_modulo) FROM tagente, tagente_modulo WHERE tagente.disabled=0 AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.id_export != 0'); + // Get total exported modules. + $server['modules_total'] = db_get_sql( + 'SELECT COUNT(tagente_modulo.id_agente_modulo) + FROM tagente, tagente_modulo + WHERE tagente.disabled=0 + AND tagente_modulo.id_agente = tagente.id_agente + AND tagente_modulo.id_export != 0' + ); $server['lag'] = 0; $server['module_lag'] = 0; - } - // Discovery server - else if ($server['server_type'] == SERVER_TYPE_DISCOVERY) { + } else if ($server['server_type'] == SERVER_TYPE_DISCOVERY) { + // Discovery server. $server['name'] = ''.$server['name'].''; - // Total jobs running on this Discovery server + // Total jobs running on this Discovery server. $server['modules'] = db_get_sql( 'SELECT COUNT(id_rt) FROM trecon_task WHERE id_recon_server = '.$server['id_server'] ); - // Total recon jobs (all servers) - $server['modules_total'] = db_get_sql('SELECT COUNT(status) FROM trecon_task'); + // Total recon jobs (all servers). + $server['modules_total'] = db_get_sql( + 'SELECT COUNT(status) FROM trecon_task' + ); - // Lag (take average active time of all active tasks) + // Lag (take average active time of all active tasks). $server['module_lag'] = 0; - - switch ($config['dbtype']) { - case 'mysql': - $server['lag'] = db_get_sql('SELECT UNIX_TIMESTAMP() - utimestamp from trecon_task WHERE UNIX_TIMESTAMP() > (utimestamp + interval_sweep) AND id_recon_server = '.$server['id_server']); - - $server['module_lag'] = db_get_sql('SELECT COUNT(id_rt) FROM trecon_task WHERE UNIX_TIMESTAMP() > (utimestamp + interval_sweep) AND id_recon_server = '.$server['id_server']); - break; - - case 'postgresql': - $server['lag'] = db_get_sql("SELECT ceil(date_part('epoch', CURRENT_TIMESTAMP)) - utimestamp from trecon_task WHERE ceil(date_part('epoch', CURRENT_TIMESTAMP)) > (utimestamp + interval_sweep) AND id_recon_server = ".$server['id_server']); - - $server['module_lag'] = db_get_sql("SELECT COUNT(id_rt) FROM trecon_task WHERE ceil(date_part('epoch', CURRENT_TIMESTAMP)) > (utimestamp + interval_sweep) AND id_recon_server = ".$server['id_server']); - break; - - case 'oracle': - $server['lag'] = db_get_sql("SELECT ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (".SECONDS_1DAY.")) - utimestamp from trecon_task WHERE ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (".SECONDS_1DAY.')) > (utimestamp + interval_sweep) AND id_recon_server = '.$server['id_server']); - - $server['module_lag'] = db_get_sql("SELECT COUNT(id_rt) FROM trecon_task WHERE ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (".SECONDS_1DAY.')) > (utimestamp + interval_sweep) AND id_recon_server = '.$server['id_server']); - break; - } + $server['lag'] = db_get_sql( + 'SELECT UNIX_TIMESTAMP() - utimestamp + FROM trecon_task + WHERE UNIX_TIMESTAMP() > (utimestamp + interval_sweep) + AND id_recon_server = '.$server['id_server'] + ); + $server['module_lag'] = db_get_sql( + 'SELECT COUNT(id_rt) + FROM trecon_task + WHERE UNIX_TIMESTAMP() > (utimestamp + interval_sweep) + AND id_recon_server = '.$server['id_server'] + ); } else { - // --------------------------------------------------------------- - // Data, Plugin, WMI, Network and Others - $server['modules'] = db_get_sql('SELECT count(tagente_estado.id_agente_modulo) FROM tagente_estado, tagente_modulo, tagente WHERE tagente.disabled=0 AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.disabled = 0 AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo AND tagente_estado.running_by = '.$server['id_server']); + // Data, Plugin, WMI, Network and Others. + $server['modules'] = db_get_sql( + 'SELECT count(tagente_estado.id_agente_modulo) + FROM tagente_estado, tagente_modulo, tagente + WHERE tagente.disabled=0 + AND tagente_modulo.id_agente = tagente.id_agente + AND tagente_modulo.disabled = 0 + AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo + AND tagente_estado.running_by = '.$server['id_server'] + ); - $server['modules_total'] = db_get_sql('SELECT count(tagente_estado.id_agente_modulo) FROM tserver, tagente_estado, tagente_modulo, tagente WHERE tagente.disabled=0 AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.disabled = 0 AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo AND tagente_estado.running_by = tserver.id_server AND tserver.server_type = '.$server['server_type']); + $server['modules_total'] = db_get_sql( + 'SELECT count(tagente_estado.id_agente_modulo) + FROM tserver, tagente_estado, tagente_modulo, tagente + WHERE tagente.disabled=0 + AND tagente_modulo.id_agente = tagente.id_agente + AND tagente_modulo.disabled = 0 + AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo + AND tagente_estado.running_by = tserver.id_server + AND tserver.server_type = '.$server['server_type'] + ); - // Remote servers LAG Calculation (server_type != 0) + // Remote servers LAG Calculation (server_type != 0). if ($server['server_type'] != 0) { - switch ($config['dbtype']) { - case 'mysql': - $result = db_get_row_sql( - 'SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo, tagente - WHERE utimestamp > 0 - AND tagente.disabled = 0 - AND tagente.id_agente = tagente_estado.id_agente - AND tagente_modulo.disabled = 0 - AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo - AND current_interval > 0 - AND running_by = '.$server['id_server'].' - AND (UNIX_TIMESTAMP() - utimestamp) < ( current_interval * 10) - AND (UNIX_TIMESTAMP() - utimestamp) > current_interval' - ); - break; - - case 'postgresql': - $result = db_get_row_sql( - "SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(ceil(date_part('epoch', CURRENT_TIMESTAMP)) - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo, tagente - WHERE utimestamp > 0 - AND tagente.disabled = 0 - AND tagente.id_agente = tagente_estado.id_agente - AND tagente_modulo.disabled = 0 - AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo - AND current_interval > 0 - AND running_by = ".$server['id_server']." - AND (ceil(date_part('epoch', CURRENT_TIMESTAMP)) - utimestamp) < ( current_interval * 10) - AND (ceil(date_part('epoch', CURRENT_TIMESTAMP)) - utimestamp) > current_interval" - ); - break; - - case 'oracle': - $result = db_get_row_sql( - "SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (".SECONDS_1DAY.')) - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo, tagente - WHERE utimestamp > 0 - AND tagente.disabled = 0 - AND tagente.id_agente = tagente_estado.id_agente - AND tagente_modulo.disabled = 0 - AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo - AND current_interval > 0 - AND running_by = '.$server['id_server']." - AND (ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (".SECONDS_1DAY.")) - utimestamp) < ( current_interval * 10) - AND (ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) - utimestamp) * (".SECONDS_1DAY.')) > current_interval' - ); - break; - } + $result = db_get_row_sql( + 'SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, + AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag + FROM tagente_estado, tagente_modulo, tagente + WHERE utimestamp > 0 + AND tagente.disabled = 0 + AND tagente.id_agente = tagente_estado.id_agente + AND tagente_modulo.disabled = 0 + AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo + AND current_interval > 0 + AND running_by = '.$server['id_server'].' + AND (UNIX_TIMESTAMP() - utimestamp) < ( current_interval * 10) + AND (UNIX_TIMESTAMP() - utimestamp) > current_interval' + ); } else { - // Local/Dataserver server LAG calculation: - switch ($config['dbtype']) { - case 'mysql': - $result = db_get_row_sql( - 'SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo, tagente - WHERE utimestamp > 0 - AND tagente.disabled = 0 - AND tagente.id_agente = tagente_estado.id_agente - AND tagente_modulo.disabled = 0 - AND tagente_modulo.id_tipo_modulo < 5 - AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo - AND current_interval > 0 - AND (UNIX_TIMESTAMP() - utimestamp) < ( current_interval * 10) - AND running_by = '.$server['id_server'].' - AND (UNIX_TIMESTAMP() - utimestamp) > (current_interval * 1.1)' - ); - break; - - case 'postgresql': - $result = db_get_row_sql( - "SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(ceil(date_part('epoch', CURRENT_TIMESTAMP)) - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo, tagente - WHERE utimestamp > 0 - AND tagente.disabled = 0 - AND tagente.id_agente = tagente_estado.id_agente - AND tagente_modulo.disabled = 0 - AND tagente_modulo.id_tipo_modulo < 5 - AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo - AND current_interval > 0 - AND (ceil(date_part('epoch', CURRENT_TIMESTAMP)) - utimestamp) < ( current_interval * 10) - AND running_by = ".$server['id_server']." - AND (ceil(date_part('epoch', CURRENT_TIMESTAMP)) - utimestamp) > (current_interval * 1.1)" - ); - break; - - case 'oracle': - $result = db_get_row_sql( - "SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (".SECONDS_1DAY.")) - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo, tagente - WHERE utimestamp > 0 - AND tagente.disabled = 0 - AND tagente.id_agente = tagente_estado.id_agente - AND tagente_modulo.disabled = 0 - AND tagente_modulo.id_tipo_modulo < 5 - AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo - AND current_interval > 0 - AND (ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (".SECONDS_1DAY.')) - utimestamp) < ( current_interval * 10) - AND running_by = '.$server['id_server']." - AND (ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (".SECONDS_1DAY.')) - utimestamp) > (current_interval * 1.1)' - ); - break; - } + // Local/Dataserver server LAG calculation. + $result = db_get_row_sql( + 'SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, + AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag + FROM tagente_estado, tagente_modulo, tagente + WHERE utimestamp > 0 + AND tagente.disabled = 0 + AND tagente.id_agente = tagente_estado.id_agente + AND tagente_modulo.disabled = 0 + AND tagente_modulo.id_tipo_modulo < 5 + AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo + AND current_interval > 0 + AND (UNIX_TIMESTAMP() - utimestamp) < ( current_interval * 10) + AND running_by = '.$server['id_server'].' + AND (UNIX_TIMESTAMP() - utimestamp) > (current_interval * 1.1)' + ); } - // Lag over current_interval * 2 is not lag, it's a timed out module + // Lag over current_interval * 2 is not lag, + // it's a timed out module. if (!empty($result['lag'])) { $server['lag'] = $result['lag']; } @@ -805,28 +923,37 @@ function servers_get_info($id_server=-1) $server['module_lag'] = $result['module_lag']; } } - } //end if + } if (isset($server['module_lag'])) { - $server['lag_txt'] = ($server['lag'] == 0 ? '-' : human_time_description_raw($server['lag'])).' / '.$server['module_lag']; + $server['lag_txt'] = (($server['lag'] == 0) ? '-' : human_time_description_raw($server['lag'])).' / '.$server['module_lag']; } else { $server['lag_txt'] = ''; } if ($server['modules_total'] > 0) { - $server['load'] = round(($server['modules'] / $server['modules_total'] * 100)); + $server['load'] = round( + ($server['modules'] / $server['modules_total'] * 100) + ); } else { $server['load'] = 0; } - // Push the raw data on the return stack + // Push the raw data on the return stack. $return[$server['id_server']] = $server; - } //end foreach + } return $return; } +/** + * Get server type + * + * @param integer $type Type. + * + * @return array Result. + */ function servers_get_servers_type($type) { return db_get_all_rows_filter('tserver', ['server_type' => $type]); @@ -836,25 +963,28 @@ function servers_get_servers_type($type) /** * Get the server name. * - * @param int Server id. + * @param integer $id_server Server id. * * @return string Name of the given server */ function servers_get_name($id_server) { - return (string) db_get_value('name', 'tserver', 'id_server', (int) $id_server); + return (string) db_get_value( + 'name', + 'tserver', + 'id_server', + (int) $id_server + ); } /** - * Get the presence of .conf and .md5 into remote_config dir + * Get the presence of .conf and .md5 into remote_config dir. * - * @param string Agent name + * @param string $server_name Agent name. * - * @return true if files exist and are writable + * @return true If files exist and are writable. */ - - function servers_check_remote_config($server_name) { global $config; @@ -862,8 +992,12 @@ function servers_check_remote_config($server_name) $server_md5 = md5($server_name, false); $filenames = []; - $filenames['md5'] = io_safe_output($config['remote_config']).'/md5/'.$server_md5.'.srv.md5'; - $filenames['conf'] = io_safe_output($config['remote_config']).'/conf/'.$server_md5.'.srv.conf'; + $filenames['md5'] = io_safe_output( + $config['remote_config'] + ).'/md5/'.$server_md5.'.srv.md5'; + $filenames['conf'] = io_safe_output( + $config['remote_config'] + ).'/conf/'.$server_md5.'.srv.conf'; if (! isset($filenames['conf'])) { return false; @@ -881,14 +1015,15 @@ function servers_check_remote_config($server_name) /** - * Return a string containing image tag for a given target id (server) - * TODO: Make this print_servertype_icon and move to functions_ui.php. Make XHTML compatible. Make string translatable + * Return a string containing image tag for a given target id (server). + * TODO: Make this print_servertype_icon and move to functions_ui.php. + * Make XHTML compatible. Make string translatable. * - * @deprecated Use print_servertype_icon instead + * @param integer $id Server type id. * - * @param int Server type id + * @deprecated Use print_servertype_icon instead. * - * @return string Fully formatted IMG HTML tag with icon + * @return string Fully formatted IMG HTML tag with icon. */ function servers_show_type($id) { @@ -896,37 +1031,67 @@ function servers_show_type($id) switch ($id) { case 1: - return html_print_image('images/database.png', true, ['title' => get_product_name().' Data server']); + $return = html_print_image( + 'images/database.png', + true, + ['title' => get_product_name().' Data server'] + ); + break; - break; case 2: - return html_print_image('images/network.png', true, ['title' => get_product_name().' Network server']); + $return = html_print_image( + 'images/network.png', + true, + ['title' => get_product_name().' Network server'] + ); + break; - break; case 4: - return html_print_image('images/plugin.png', true, ['title' => get_product_name().' Plugin server']); + $return = html_print_image( + 'images/plugin.png', + true, + ['title' => get_product_name().' Plugin server'] + ); + break; - break; case 5: - return html_print_image('images/chart_bar.png', true, ['title' => get_product_name().' Prediction server']); + $return = html_print_image( + 'images/chart_bar.png', + true, + ['title' => get_product_name().' Prediction server'] + ); + break; - break; case 6: - return html_print_image('images/wmi.png', true, ['title' => get_product_name().' WMI server']); + $return = html_print_image( + 'images/wmi.png', + true, + ['title' => get_product_name().' WMI server'] + ); + break; - break; case 7: - return html_print_image('images/server_web.png', true, ['title' => get_product_name().' WEB server']); + $return = html_print_image( + 'images/server_web.png', + true, + ['title' => get_product_name().' WEB server'] + ); + break; - break; case 8: - return html_print_image('images/module-wux.png', true, ['title' => get_product_name().' WUX server']); + $return = html_print_image( + 'images/module-wux.png', + true, + ['title' => get_product_name().' WUX server'] + ); + break; - break; default: - return '--'; - break; + $return = '--'; + break; } + + return $return; } @@ -941,28 +1106,10 @@ function servers_check_status() { global $config; - switch ($config['dbtype']) { - case 'mysql': - $sql = 'SELECT COUNT(id_server) - FROM tserver - WHERE status = 1 - AND keepalive > NOW() - INTERVAL server_keepalive*2 SECOND'; - break; - - case 'postgresql': - $sql = "SELECT COUNT(id_server) - FROM tserver - WHERE status = 1 - AND keepalive > NOW() - INTERVAL 'server_keepalive*2 SECOND'"; - break; - - case 'oracle': - $sql = "SELECT COUNT(id_server) - FROM tserver - WHERE status = 1 - AND keepalive > systimestamp - INTERVAL 'server_keepalive*2' SECOND"; - break; - } + $sql = 'SELECT COUNT(id_server) + FROM tserver + WHERE status = 1 + AND keepalive > NOW() - INTERVAL server_keepalive*2 SECOND'; $status = (int) db_get_sql($sql); // Cast as int will assure a number value @@ -972,10 +1119,9 @@ function servers_check_status() /** - * @deprecated use servers_get_info instead * Get statistical information for a given server * - * @param int Server id to get status. + * @param integer $id_server Server id to get status. * * @return array Server info array */ From 683059af43a41256bbb6117a849821c70b293026 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Fri, 12 Jul 2019 14:53:44 +0200 Subject: [PATCH 057/262] fixed errors mod/sec tactical view --- pandora_console/include/functions_servers.php | 66 +++++++++++++++---- 1 file changed, 52 insertions(+), 14 deletions(-) diff --git a/pandora_console/include/functions_servers.php b/pandora_console/include/functions_servers.php index c8738b1bdc..1151db3469 100644 --- a/pandora_console/include/functions_servers.php +++ b/pandora_console/include/functions_servers.php @@ -354,54 +354,70 @@ function servers_get_performance() } } - $info_servers = servers_get_info(); + $info_servers = array_reduce( + servers_get_info(), + function ($carry, $item) { + $carry[$item['server_type']] = $item; + return $carry; + } + ); foreach ($interval_avgs as $id_modulo => $ia) { + $module_lag = 0; switch ($id_modulo) { case MODULE_DATA: + $module_lag = $info_servers[SERVER_TYPE_DATA]['module_lag']; $data['avg_interval_local_modules'] = $ia['avg_interval']; $data['local_modules_rate'] = servers_get_rate( - ($data['avg_interval_local_modules'] - $info_servers[$id_modulo]['module_lag']), - $data['total_local_modules'] + $data['avg_interval_local_modules'], + ($data['total_local_modules'] - $module_lag) ); break; case MODULE_NETWORK: + $module_lag = $info_servers[SERVER_TYPE_NETWORK]['module_lag']; + $module_lag += $info_servers[SERVER_TYPE_SNMP]['module_lag']; + $module_lag += $info_servers[SERVER_TYPE_ENTERPRISE_ICMP]['module_lag']; + $module_lag += $info_servers[SERVER_TYPE_ENTERPRISE_SNMP]['module_lag']; $data['avg_interval_network_modules'] = $ia['avg_interval']; $data['network_modules_rate'] = servers_get_rate( - ($data['avg_interval_network_modules'] - $info_servers[$id_modulo]['module_lag']), - $data['total_network_modules'] + $data['avg_interval_network_modules'], + ($data['total_network_modules'] - $module_lag) ); break; case MODULE_PLUGIN: + $module_lag = $info_servers[SERVER_TYPE_PLUGIN]['module_lag']; $data['avg_interval_plugin_modules'] = $ia['avg_interval']; $data['plugin_modules_rate'] = servers_get_rate( - ($data['avg_interval_plugin_modules'] - $info_servers[$id_modulo]['module_lag']), - $data['total_plugin_modules'] + $data['avg_interval_plugin_modules'], + ($data['total_plugin_modules'] - $module_lag) ); break; case MODULE_PREDICTION: + $module_lag = $info_servers[SERVER_TYPE_PREDICTION]['module_lag']; $data['avg_interval_prediction_modules'] = $ia['avg_interval']; $data['prediction_modules_rate'] = servers_get_rate( - ($data['avg_interval_prediction_modules'] - $info_servers[$id_modulo]['module_lag']), - $data['total_prediction_modules'] + $data['avg_interval_prediction_modules'], + ($data['total_prediction_modules'] - $module_lag) ); break; case MODULE_WMI: + $module_lag = $info_servers[SERVER_TYPE_WMI]['module_lag']; $data['avg_interval_wmi_modules'] = $ia['avg_interval']; $data['wmi_modules_rate'] = servers_get_rate( - ($data['avg_interval_wmi_modules'] - $info_servers[$id_modulo]['module_lag']), - $data['total_wmi_modules'] + $data['avg_interval_wmi_modules'], + ($data['total_wmi_modules'] - $module_lag) ); break; case MODULE_WEB: + $module_lag = $info_servers[SERVER_TYPE_WEB]['module_lag']; $data['avg_interval_web_modules'] = $ia['avg_interval']; $data['web_modules_rate'] = servers_get_rate( - ($data['avg_interval_web_modules'] - $info_servers[$id_modulo]['module_lag']), - $data['total_web_modules'] + $data['avg_interval_web_modules'], + ($data['total_web_modules'] - $module_lag) ); break; @@ -429,13 +445,35 @@ function servers_get_performance() $data['avg_interval_total_modules'] = (array_sum($data['avg_interval_total_modules']) / count($data['avg_interval_total_modules'])); } + $total_modules_lag = 0; + foreach ($info_servers as $key => $value) { + switch ($key) { + case SERVER_TYPE_DATA: + case SERVER_TYPE_NETWORK: + case SERVER_TYPE_SNMP: + case SERVER_TYPE_ENTERPRISE_ICMP: + case SERVER_TYPE_ENTERPRISE_SNMP: + case SERVER_TYPE_PLUGIN: + case SERVER_TYPE_PREDICTION: + case SERVER_TYPE_WMI: + case SERVER_TYPE_WEB: + $total_modules_lag += $value['module_lag']; + break; + + default: + // Not possible. + break; + } + } + $data['remote_modules_rate'] = servers_get_rate( $data['avg_interval_remote_modules'], $data['total_remote_modules'] ); + $data['total_modules_rate'] = servers_get_rate( $data['avg_interval_total_modules'], - $data['total_modules'] + ($data['total_modules'] - $total_modules_lag) ); return ($data); From 9fb32c46991d1f132b72fa50ffbe16efcf390a84 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 12 Jul 2019 18:29:58 +0200 Subject: [PATCH 058/262] Deployment area single targets --- .../godmode/groups/credential_store.php | 2 +- pandora_console/godmode/wizards/Wizard.main.php | 2 +- .../include/functions_credential_store.php | 2 -- pandora_console/include/styles/deployment_list.css | 14 +++++++++++++- pandora_console/include/styles/tables.css | 6 ++++++ 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/groups/credential_store.php b/pandora_console/godmode/groups/credential_store.php index 9334cd6065..dd7cc5affb 100644 --- a/pandora_console/godmode/groups/credential_store.php +++ b/pandora_console/godmode/groups/credential_store.php @@ -369,7 +369,7 @@ echo '
    '; text = err.message; failed = 1; } - if (!failed && data['error']) { + if (!failed && data['error'] != undefined) { title = ""; text = data['error']; failed = 1; diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 8f0bb0bbd8..3292a88ef6 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -592,7 +592,7 @@ class Wizard $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; - $output_head = '
    '; if ($return === false) { diff --git a/pandora_console/include/functions_credential_store.php b/pandora_console/include/functions_credential_store.php index ea7b3d5c72..048c2bba00 100644 --- a/pandora_console/include/functions_credential_store.php +++ b/pandora_console/include/functions_credential_store.php @@ -56,8 +56,6 @@ function credentials_get_all( global $config; - $user_is_admin = users_is_admin(); - if (!is_array($filter)) { error_log('[credential_get_all] Filter must be an array.'); throw new Exception('[credential_get_all] Filter must be an array.'); diff --git a/pandora_console/include/styles/deployment_list.css b/pandora_console/include/styles/deployment_list.css index ca5385f3f5..c107342246 100644 --- a/pandora_console/include/styles/deployment_list.css +++ b/pandora_console/include/styles/deployment_list.css @@ -2,7 +2,7 @@ ul.wizard li > label:not(.p-switch) { width: auto; } -ul.wizard { +form.top-action-buttons ul.wizard { display: flex; flex-direction: row; } @@ -10,3 +10,15 @@ ul.wizard { ul.wizard li { margin-right: 1em; } + +form.modal ul.wizard li { + display: flex; + flex-direction: row; + width: 90%; + margin: 0.5em auto; + justify-items: center; +} + +form.modal ul.wizard li * { + flex: 1; +} diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index c3e1deb94c..7e49d32c83 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -122,6 +122,7 @@ letter-spacing: 0.3pt; color: #000; background-color: #fff; + cursor: pointer; } .info_table tr th { @@ -341,3 +342,8 @@ a.pandora_pagination.current:hover { background-position-y: center; cursor: pointer; } + +.info_table tr th.sorting_asc, +.info_table tr th.sorting_desc { + padding-left: 15px; +} From 17dcb2feb3d37da5d54a06f510640978671c1a9b Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 13 Jul 2019 00:01:10 +0200 Subject: [PATCH 059/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b6ecacb2b4..111e21c681 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.736-190712 +Version: 7.0NG.736-190713 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index c7f4f3334e..346b6d7c77 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.736-190712" +pandora_version="7.0NG.736-190713" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 1298d9c2f9..aeb88c14e8 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.736'; -use constant AGENT_BUILD => '190712'; +use constant AGENT_BUILD => '190713'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 5fdc516b68..9205df2578 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.736 -%define release 190712 +%define release 190713 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 891b2769f1..efa996d5f9 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.736 -%define release 190712 +%define release 190713 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 01d573fb70..20015812b2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190712" +PI_BUILD="190713" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index d20217c6a0..5e1ad2914a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190712} +{190713} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 51c386db55..73d5682681 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.736(Build 190712)") +#define PANDORA_VERSION ("7.0NG.736(Build 190713)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index feb8e814e1..09ed42ec64 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.736(Build 190712))" + VALUE "ProductVersion", "(7.0NG.736(Build 190713))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 901b426196..e3e5dcd8eb 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.736-190712 +Version: 7.0NG.736-190713 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 98935e7bf9..1121ae0f22 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.736-190712" +pandora_version="7.0NG.736-190713" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index ab7acc743d..d70b5ed05d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190712'; +$build_version = 'PC190713'; $pandora_version = 'v7.0NG.736'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 7b1d4833a6..e34ce9a6a9 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 388fabbd14..4dec3b0bf7 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.736 -%define release 190712 +%define release 190713 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 20093a9ea4..238cf017b3 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.736 -%define release 190712 +%define release 190713 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 48dd2eaa41..ee4a7d4d70 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190712" +PI_BUILD="190713" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index e040b6ea7e..767e5339a7 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.736 PS190712"; +my $version = "7.0NG.736 PS190713"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 172c7ee278..5a3394609a 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.736 PS190712"; +my $version = "7.0NG.736 PS190713"; # save program name for logging my $progname = basename($0); From 7a8413154fe2eb781d55e37f46d07cf3c8b5bc88 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 15 Jul 2019 10:21:25 +0200 Subject: [PATCH 060/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 111e21c681..44d808fbaf 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.736-190713 +Version: 7.0NG.736-190715 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 346b6d7c77..b1476c1cce 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.736-190713" +pandora_version="7.0NG.736-190715" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index aeb88c14e8..632a8139ab 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.736'; -use constant AGENT_BUILD => '190713'; +use constant AGENT_BUILD => '190715'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 9205df2578..396bbf494a 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.736 -%define release 190713 +%define release 190715 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index efa996d5f9..9c59b4c335 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.736 -%define release 190713 +%define release 190715 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 20015812b2..00d2b0fc86 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190713" +PI_BUILD="190715" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5e1ad2914a..d07ac42628 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190713} +{190715} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 73d5682681..37df7290d9 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.736(Build 190713)") +#define PANDORA_VERSION ("7.0NG.736(Build 190715)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 09ed42ec64..258a0c6348 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.736(Build 190713))" + VALUE "ProductVersion", "(7.0NG.736(Build 190715))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e3e5dcd8eb..a042da3590 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.736-190713 +Version: 7.0NG.736-190715 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 1121ae0f22..ff4b1314f2 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.736-190713" +pandora_version="7.0NG.736-190715" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index d70b5ed05d..622b3c5be3 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190713'; +$build_version = 'PC190715'; $pandora_version = 'v7.0NG.736'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e34ce9a6a9..2553658b2a 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 4dec3b0bf7..67acdab8dd 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.736 -%define release 190713 +%define release 190715 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 238cf017b3..a90980ca8f 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.736 -%define release 190713 +%define release 190715 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index ee4a7d4d70..f235985de8 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190713" +PI_BUILD="190715" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 767e5339a7..1f34279a01 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.736 PS190713"; +my $version = "7.0NG.736 PS190715"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 5a3394609a..f5a4264243 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.736 PS190713"; +my $version = "7.0NG.736 PS190715"; # save program name for logging my $progname = basename($0); From eb831dbbcd57de965bee3c4e39a498ca2c91cecb Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 15 Jul 2019 11:46:35 +0200 Subject: [PATCH 061/262] fixed bug: agent interval not being changed in agent config when changing its value through massive operations --- .../godmode/massive/massive_edit_agents.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index da1a0887b5..668eca53de 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -170,6 +170,8 @@ if ($update_agents) { $n_edited = 0; $result = false; foreach ($id_agents as $id_agent) { + $old_interval_value = db_get_value_filter('intervalo', 'tagente', ['id_agente' => $id_agent]); + if (!empty($values)) { $group_old = false; $disabled_old = false; @@ -196,6 +198,18 @@ if ($update_agents) { $result_metaconsole = agent_update_from_cache($id_agent, $values, $server_name); } + // Update the configuration files. + if ($old_interval_value != $values['intervalo']) { + enterprise_hook( + 'config_agents_update_config_token', + [ + $id_agent, + 'interval', + $values['intervalo'], + ] + ); + } + if ($disabled_old !== false && $disabled_old != $values['disabled']) { enterprise_hook( 'config_agents_update_config_token', From 95254341ce0c3a0c1d732df90dc15df8ee7c81fe Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 15 Jul 2019 11:53:25 +0200 Subject: [PATCH 062/262] add condition to check if agent interval token should be updated in massive operations based on previous result --- pandora_console/godmode/massive/massive_edit_agents.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 668eca53de..ec6c49d8a8 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -199,7 +199,7 @@ if ($update_agents) { } // Update the configuration files. - if ($old_interval_value != $values['intervalo']) { + if ($result && ($old_interval_value != $values['intervalo'])) { enterprise_hook( 'config_agents_update_config_token', [ From 56ddf0700e5eede28e6a15b17a2bb864f40b4a8d Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Mon, 15 Jul 2019 11:58:27 +0200 Subject: [PATCH 063/262] fixed error SQL --- pandora_console/operation/agentes/exportdata.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/exportdata.php b/pandora_console/operation/agentes/exportdata.php index 6fbefa93dd..5743084f6a 100644 --- a/pandora_console/operation/agentes/exportdata.php +++ b/pandora_console/operation/agentes/exportdata.php @@ -243,9 +243,10 @@ if (empty($export_btn) || $show_form) { false ); - // Agent selector + // Agent selector. $table->data[1][0] = ''.__('Source agent').''; + $filter = []; if ($group > 0) { $filter['id_grupo'] = (array) $group; } else { From 45e1c324736094056d723023a10d8fd50f549487 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Mon, 15 Jul 2019 15:31:01 +0200 Subject: [PATCH 064/262] fixed events sound --- pandora_console/include/ajax/events.php | 116 ++++++++++++++++++ .../operation/events/sound_events.php | 4 +- 2 files changed, 118 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 22eb1d7836..c891751974 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -83,6 +83,7 @@ $validate_event = get_parameter('validate_event', 0); $delete_event = get_parameter('delete_event', 0); $get_event_filters = get_parameter('get_event_filters', 0); $get_comments = get_parameter('get_comments', 0); +$get_events_fired = (bool) get_parameter('get_events_fired'); if ($get_comments) { $event = get_parameter('event', false); @@ -1695,3 +1696,118 @@ if ($get_table_response_command) { return; } + +if ($get_events_fired) { + $id = get_parameter('id_row'); + $idGroup = get_parameter('id_group'); + $agents = get_parameter('agents', null); + + $query = ' AND id_evento > '.$id; + + $type = []; + $alert = get_parameter('alert_fired'); + if ($alert == 'true') { + $resultAlert = alerts_get_event_status_group( + $idGroup, + [ + 'alert_fired', + 'alert_ceased', + ], + $query, + $agents + ); + } + + $critical = get_parameter('critical'); + if ($critical == 'true') { + $resultCritical = alerts_get_event_status_group( + $idGroup, + 'going_up_critical', + $query, + $agents + ); + } + + $warning = get_parameter('warning'); + if ($warning == 'true') { + $resultWarning = alerts_get_event_status_group( + $idGroup, + 'going_up_warning', + $query, + $agents + ); + } + + $unknown = get_parameter('unknown'); + if ($unknown == 'true') { + $resultUnknown = alerts_get_event_status_group( + $idGroup, + 'going_unknown', + $query, + $agents + ); + } + + if ($resultAlert) { + $return = [ + 'fired' => $resultAlert, + 'sound' => $config['sound_alert'], + ]; + $event = events_get_event($resultAlert); + + $module_name = modules_get_agentmodule_name($event['id_agentmodule']); + $agent_name = agents_get_alias($event['id_agente']); + + $return['message'] = io_safe_output($agent_name).' - '; + $return['message'] .= __('Alert fired in module '); + $return['message'] .= io_safe_output($module_name).' - '; + $return['message'] .= $event['timestamp']; + } else if ($resultCritical) { + $return = [ + 'fired' => $resultCritical, + 'sound' => $config['sound_critical'], + ]; + $event = events_get_event($resultCritical); + + $module_name = modules_get_agentmodule_name($event['id_agentmodule']); + $agent_name = agents_get_alias($event['id_agente']); + + $return['message'] = io_safe_output($agent_name).' - '; + $return['message'] .= __('Module ').io_safe_output($module_name); + $return['message'] .= __(' is going to critical').' - '; + $return['message'] .= $event['timestamp']; + } else if ($resultWarning) { + $return = [ + 'fired' => $resultWarning, + 'sound' => $config['sound_warning'], + ]; + $event = events_get_event($resultWarning); + + $module_name = modules_get_agentmodule_name($event['id_agentmodule']); + $agent_name = agents_get_alias($event['id_agente']); + + $return['message'] = io_safe_output($agent_name).' - '; + $return['message'] .= __('Module ').io_safe_output($module_name); + $return['message'] .= __(' is going to warning').' - '; + $return['message'] .= $event['timestamp']; + } else if ($resultUnknown) { + $return = [ + 'fired' => $resultUnknown, + 'sound' => $config['sound_alert'], + ]; + $event = events_get_event($resultUnknown); + + $module_name = modules_get_agentmodule_name($event['id_agentmodule']); + $agent_name = agents_get_alias($event['id_agente']); + + $return['message'] = io_safe_output($agent_name).' - '; + $return['message'] .= __('Module ').io_safe_output($module_name); + $return['message'] .= __(' is going to unknown').' - '; + $return['message'] .= $event['timestamp']; + } else { + $return = ['fired' => 0]; + } + + echo io_json_mb_encode($return); +} + diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php index 1bd1dcc444..82738f9958 100644 --- a/pandora_console/operation/events/sound_events.php +++ b/pandora_console/operation/events/sound_events.php @@ -196,7 +196,7 @@ function forgetPreviousEvents() { var agents = $("#id_agents").val(); jQuery.post ("../../ajax.php", - {"page" : "operation/events/events", + {"page" : "include/ajax/events", "get_events_fired": 1, "id_group": group, "agents[]" : agents, @@ -222,7 +222,7 @@ function check_event() { if (running) { jQuery.post ("../../ajax.php", - {"page" : "operation/events/events", + {"page" : "include/ajax/events", "get_events_fired": 1, "id_group": group, "agents[]" : agents, From 1323de2097e3e28927b03d4e84452bd90faaeb28 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Mon, 15 Jul 2019 15:43:53 +0200 Subject: [PATCH 065/262] add syncserver conf --- pandora_server/conf/pandora_server.conf.new | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index b81f956577..36540cfad9 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -601,6 +601,9 @@ syslog_threads 2 # Maximum number of lines queued by the Syslog Server's producer on each run (PANDORA FMS ENTERPRISE ONLY). syslog_max 65535 +# Sync Server +#syncserver + # Port tentacle server #sync_port 41121 @@ -619,7 +622,7 @@ syslog_max 65535 # Sync timeout #sync_timeout 10 -# Address +# Address # sync_address # Target LogStash server, to allow Dataserver and SyslogServer store log information in ElasticSearch From 7d119bfe5a7d6fa88f78fd25cc8ff73247aec08c Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Mon, 15 Jul 2019 17:41:20 +0200 Subject: [PATCH 066/262] Added feature to autorefresh in events view with datatables - #4330 --- pandora_console/general/header.php | 63 +++++++++++++++++---- pandora_console/operation/events/events.php | 20 +++++++ 2 files changed, 73 insertions(+), 10 deletions(-) diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index a093596b2b..cb39abc999 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -670,21 +670,49 @@ if ($config['menu_type'] == 'classic') { + + var autorefresh_draw = ''; $("#header_autorefresh").css('padding-right', '5px'); - var refr_time = ; - var t = new Date(); - t.setTime (t.getTime () + parseInt()); - $("#refrcounter").countdown ({ - until: t, - layout: '%M%nn%M:%S%nn%S', - labels: ['', '', '', '', '', '', ''], - onExpiry: function () { + if(autorefresh_draw == true) { + var refresh_interval = parseInt(''); + var until_time=''; + + function events_refresh() { + until_time = new Date(); + until_time.setTime (until_time.getTime () + parseInt()); + + $("#refrcounter").countdown ({ + until: until_time, + layout: '%M%nn%M:%S%nn%S', + labels: ['', '', '', '', '', '', ''], + onExpiry: function () { + dt_events.draw(true); + } + }); + } + // Start the countdown when page is loaded (first time). + events_refresh(); + // Repeat countdown according to refresh_interval. + setInterval(events_refresh, refresh_interval); + } else { + var refr_time = ; + var t = new Date(); + t.setTime (t.getTime () + parseInt()); + $("#refrcounter").countdown ({ + until: t, + layout: '%M%nn%M:%S%nn%S', + labels: ['', '', '', '', '', '', ''], + onExpiry: function () { href = $("a.autorefresh").attr ("href"); href = href + refr_time; $(document).attr ("location", href); } }); + } @@ -694,8 +722,23 @@ if ($config['menu_type'] == 'classic') { $("#combo_refr").toggle (); $("select#ref").change (function () { href = $("a.autorefresh").attr ("href"); - $(document).attr ("location", href + this.value); - }); + + if(autorefresh_draw == true){ + inputs = $("#events_form :input"); + values = {}; + inputs.each(function() { + values[this.name] = $(this).val(); + }) + + var newValue = btoa(JSON.stringify(values)); + console.log(newValue); + $(document).attr("location", href+'&fb64=' + newValue + '&refr=' + this.value); + + } else { + console.log('recargo'); + $(document).attr ("location", href + this.value); + } + }); return false; }); diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 9561872288..b316bea7ff 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -1469,6 +1469,11 @@ echo "
    '; echo ''; + +if ($_GET['refr'] || $do_refresh === true) { + $autorefresh_draw = true; +} + ?> '."\n\t"; } @@ -1892,7 +1892,7 @@ function ui_process_page_head($string, $bitfield) array_push($loaded, $name); - $url_js = ui_get_full_url($filename); + $url_js = ui_get_full_url($filename, false, false, false); $output .= ''."\n\t"; } @@ -2841,7 +2841,7 @@ function ui_progress( width_interval = '.$ajax['interval'].'; if (last % 10 == 0) { $.post({ - url: "'.ui_get_full_url('ajax.php').'", + url: "'.ui_get_full_url('ajax.php', false, false, false).'", data: {'; if (is_array($ajax['data'])) { foreach ($ajax['data'] as $token => $value) { @@ -3216,7 +3216,7 @@ function ui_print_datatable(array $parameters) ], lengthMenu: '.json_encode($pagination_options).', ajax: { - url: "'.ui_get_full_url('ajax.php').'", + url: "'.ui_get_full_url('ajax.php', false, false, false).'", type: "POST", dataSrc: function (json) { if (json.error) { @@ -3692,7 +3692,7 @@ function ui_get_url_refresh($params=false, $relative=true, $add_post=true) $url = htmlspecialchars($url); if (! $relative) { - return ui_get_full_url($url); + return ui_get_full_url($url, false, false, false); } return $url; @@ -4451,7 +4451,7 @@ function ui_print_agent_autocomplete_input($parameters) // Javascript configurations // ------------------------------------------------------------------. - $javascript_ajax_page = ui_get_full_url('ajax.php', false, false, false, false); + $javascript_ajax_page = ui_get_full_url('ajax.php', false, false, false); // Default value. if (isset($parameters['javascript_ajax_page'])) { $javascript_ajax_page = $parameters['javascript_ajax_page']; diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index dd4be3c501..56620cda9a 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -3278,7 +3278,12 @@ function visual_map_get_color_line_status($layoutData) */ function visual_map_get_image_status_element($layoutData, $status=false) { - $img = 'images/console/icons/'.$layoutData['image']; + $metaconsole_hack = ''; + if (is_metaconsole()) { + $metaconsole_hack = '../../'; + } + + $img = $metaconsole_hack.'images/console/icons/'.$layoutData['image']; if ($layoutData['type'] == 5) { // ICON ELEMENT @@ -3611,11 +3616,6 @@ function visual_map_print_visual_map( global $config; - $metaconsole_hack = '/'; - if (defined('METACONSOLE')) { - $metaconsole_hack = '../../'; - } - enterprise_include_once('meta/include/functions_ui_meta.php'); include_once $config['homedir'].'/include/functions_custom_graphs.php'; @@ -3681,11 +3681,11 @@ function visual_map_print_visual_map( $mapHeight = $layout['height']; $backgroundImage = ''; if ($layout['background'] != 'None.png') { - $backgroundImage = $metaconsole_hack.'images/console/background/'.$layout['background']; + $backgroundImage = 'images/console/background/'.$layout['background']; } } - if (defined('METACONSOLE')) { + if (is_metaconsole()) { echo "
    "; } @@ -3698,7 +3698,7 @@ function visual_map_print_visual_map( background-color:'.$layout['background_color'].';">'; if ($layout['background'] != 'None.png') { - echo ""; + echo ""; } $layout_datas = db_get_all_rows_field_filter( @@ -3776,7 +3776,7 @@ function visual_map_print_visual_map( // End main div echo '
    '; - if (defined('METACONSOLE')) { + if (is_metaconsole()) { echo '
    '; } } diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 8e32673b48..309ddf364b 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -24,7 +24,7 @@ function include_javascript_dependencies_flot_graph($return=false) $is_include_javascript = true; $metaconsole_hack = ''; - if (defined('METACONSOLE')) { + if (is_metaconsole()) { $metaconsole_hack = '../../'; } From a6037d8308b1f9360ede33c8612b50b54fb1e604 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 21 Aug 2019 09:27:55 +0200 Subject: [PATCH 200/262] Changed background-color in request new licence --- pandora_console/include/styles/pandora_black.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index a52c994ed2..6f0c74d16b 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -392,3 +392,11 @@ div#box_online * { #text_wizard { color: #555; } + +div#code_license_dialog div#code, +div#form_activate_licence #code { + margin-top: 20px; + margin-bottom: 20px; + border: 0px; + background-color: #222; +} From ff44666e41bfdd23fe43adbff17384e369640813 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 21 Aug 2019 09:49:17 +0200 Subject: [PATCH 201/262] fixed visual error2 --- pandora_console/godmode/agentes/agent_manager.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index c4a0bfe8e0..ca72ac286b 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -971,6 +971,8 @@ if (enterprise_installed()) { ); } + echo '
    '; + echo '
    '; } From a8c351d1779d86deca237ce17c3eb6d237cd188e Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Wed, 21 Aug 2019 09:55:53 +0200 Subject: [PATCH 202/262] Custom fields type hint BBCode updated --- pandora_console/godmode/agentes/agent_manager.php | 2 +- pandora_console/godmode/massive/massive_edit_agents.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index dfdd7390c3..f467a93695 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -787,7 +787,7 @@ $table->class = 'custom_fields_table'; $table->head = [ 0 => __('Click to display').ui_print_help_tip( - __('This field allows url insertion using the BBCode\'s url tag').'.
    '.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.

    '.__('e.g.: [url=google.com]Google web search[/url]'), + __('This field allows url insertion using the BBCode\'s url tag').'.
    '.__('The format is: [url=\'url to navigate\']\'text to show\'[/url] or [url]\'url to navigate\'[/url] ').'.

    '.__('e.g.: [url=google.com]Google web search[/url] or [url]www.goole.com[/url]'), true ), ]; diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index da1a0887b5..3ddbbe04cf 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -686,7 +686,7 @@ if ($fields === false) { foreach ($fields as $field) { $data[0] = ''.$field['name'].''; $data[0] .= ui_print_help_tip( - __('This field allows url insertion using the BBCode\'s url tag').'.
    '.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.

    '.__('e.g.: [url=google.com]Google web search[/url]'), + __('This field allows url insertion using the BBCode\'s url tag').'.
    '.__('The format is: [url=\'url to navigate\']\'text to show\'[/url] or [url]\'url to navigate\'[/url] ').'.

    '.__('e.g.: [url=google.com]Google web search[/url] or [url]www.goole.com[/url]'), true ); $combo = []; From d515e510f3a6bc0d7c1e588e486cd7d3931c5931 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 21 Aug 2019 13:38:53 +0200 Subject: [PATCH 203/262] Fixed bug in custom unit #4166 --- pandora_console/godmode/agentes/configurar_agente.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 842f6c3d46..82898832fe 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1382,7 +1382,7 @@ if ($update_module || $create_module) { $each_ff = (int) get_parameter('each_ff'); $ff_timeout = (int) get_parameter('ff_timeout'); $unit = (string) get_parameter('unit_select'); - if ($unit == 'none') { + if ($unit == 'none' || $unit == '') { $unit = (string) get_parameter('unit_text'); } From b444be87b4014a9b0b781768babe880f661c05f4 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 21 Aug 2019 14:46:58 +0200 Subject: [PATCH 204/262] Fixed bug in custom unit #4166 --- pandora_console/godmode/agentes/configurar_agente.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 82898832fe..99b5a68446 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1381,11 +1381,7 @@ if ($update_module || $create_module) { $ff_type = (int) get_parameter('ff_type'); $each_ff = (int) get_parameter('each_ff'); $ff_timeout = (int) get_parameter('ff_timeout'); - $unit = (string) get_parameter('unit_select'); - if ($unit == 'none' || $unit == '') { - $unit = (string) get_parameter('unit_text'); - } - + $unit = (string) get_parameter('unit'); $id_tag = (array) get_parameter('id_tag_selected'); $serialize_ops = (string) get_parameter('serialize_ops'); $critical_instructions = (string) get_parameter('critical_instructions'); From 1d0875e89ae531144d1e6beaeb87a560e0e293e5 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 22 Aug 2019 00:01:11 +0200 Subject: [PATCH 205/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 8de0b5d54f..047bb2c0c9 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190821 +Version: 7.0NG.738-190822 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index a26e778649..0b848d2048 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190821" +pandora_version="7.0NG.738-190822" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index ae770d40a8..e83f11e231 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190821'; +use constant AGENT_BUILD => '190822'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 0e93bba00b..a8d1783d08 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190821 +%define release 190822 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index b3441e3945..405d9a527e 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190821 +%define release 190822 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 7056ce4102..832e17abdf 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190821" +PI_BUILD="190822" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b5ec69f3d6..aa3d8b1aaa 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190821} +{190822} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 9863811ef2..f549460365 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190821)") +#define PANDORA_VERSION ("7.0NG.738(Build 190822)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a672879c29..f17a6cfc09 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190821))" + VALUE "ProductVersion", "(7.0NG.738(Build 190822))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 999adf9b50..7c3d72b0fa 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190821 +Version: 7.0NG.738-190822 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 1dd37982e9..aded63bd4d 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190821" +pandora_version="7.0NG.738-190822" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a084e77246..08ccd024a3 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190821'; +$build_version = 'PC190822'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index c9b93d5147..e1a30413fd 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 4fe138ff1a..8d7b1ca43d 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190821 +%define release 190822 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index cf930a0ef9..8f71041b54 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190821 +%define release 190822 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index fb7fb32dfe..e6d720030f 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190821" +PI_BUILD="190822" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 7eee0698fa..38f3b6e77d 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190821"; +my $version = "7.0NG.738 PS190822"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 79ac99404b..6ddd676c33 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190821"; +my $version = "7.0NG.738 PS190822"; # save program name for logging my $progname = basename($0); From e8a873de7cdf268ece5293a5682d130c9528d46a Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Thu, 22 Aug 2019 11:22:40 +0200 Subject: [PATCH 206/262] Changed input for textarea in command field - #4524 --- pandora_console/godmode/events/event_responses.editor.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/events/event_responses.editor.php b/pandora_console/godmode/events/event_responses.editor.php index 1705605744..c514ded346 100644 --- a/pandora_console/godmode/events/event_responses.editor.php +++ b/pandora_console/godmode/events/event_responses.editor.php @@ -143,12 +143,12 @@ $table->data[3] = $data; $data = []; $data[0] = ''.__('Command').''.ui_print_help_icon('response_macros', true); -$data[1] = html_print_input_text( +$data[1] = html_print_textarea( 'target', + 3, + 1, $event_response['target'], - '', - 100, - 255, + 'style="min-height:initial;"', true ); From 31da17db031830760253b89f37b19d3dabd5cba4 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Thu, 22 Aug 2019 14:27:45 +0200 Subject: [PATCH 207/262] fixed event view metaconsole --- pandora_console/include/ajax/events.php | 8 ++++---- pandora_console/include/functions_events.php | 18 +++++++++--------- pandora_console/include/functions_ui.php | 4 ++-- pandora_console/operation/events/events.php | 2 ++ 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index c891751974..ad9d59a748 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -1290,12 +1290,14 @@ if ($get_extended_event) { $details = events_page_details($event, $server); + if ($meta) { + metaconsole_restore_db(); + } + if (events_has_extended_info($event['id_evento']) === true) { $related = events_page_related($event, $server); } - // Juanma (09/05/2014) Fix: Needs to reconnect to node, in previous funct - // node connection was lost. if ($meta) { $server = metaconsole_get_connection_by_id($server_id); metaconsole_connect($server); @@ -1574,7 +1576,6 @@ if ($get_list_events_agents) { $date_from = get_parameter('date_from'); $date_to = get_parameter('date_to'); $id_user = $config['id_user']; - $server_id = get_parameter('server_id'); $returned_sql = events_sql_events_grouped_agents( $id_agent, @@ -1810,4 +1811,3 @@ if ($get_events_fired) { echo io_json_mb_encode($return); } - diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index bf51bae9c1..1c24eef9b3 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -878,9 +878,11 @@ function events_get_all( $agent_join_filters = []; $tagente_table = 'tagente'; $tagente_field = 'id_agente'; + $conditionMetaconsole = ''; if (is_metaconsole()) { $tagente_table = 'tmetaconsole_agent'; $tagente_field = 'id_tagente'; + $conditionMetaconsole = ' AND ta.id_tmetaconsole_setup = te.server_id '; } // Agent alias. @@ -1214,12 +1216,12 @@ function events_get_all( $server_join = ''; if (is_metaconsole()) { - $server_join = ' INNER JOIN tmetaconsole_setup ts - ON ts.id = te.server_id AND ts.server_name = ta.server_name'; + $server_join = ' LEFT JOIN tmetaconsole_setup ts + ON ts.id = te.server_id'; if (!empty($filter['server_id'])) { $server_join = sprintf( - ' INNER JOIN tmetaconsole_setup ts - ON ts.id = te.server_id AND ts.server_name = ta.server_name AND ts.id= %d', + ' LEFT JOIN tmetaconsole_setup ts + ON ts.id = te.server_id AND ts.id= %d', $filter['server_id'] ); } @@ -1254,6 +1256,7 @@ function events_get_all( %s JOIN %s ta ON ta.%s = te.id_agente %s + %s %s JOIN tgrupo tg ON te.id_grupo = tg.id_grupo %s @@ -1273,6 +1276,7 @@ function events_get_all( $tagente_join, $tagente_table, $tagente_field, + $conditionMetaconsole, join(' ', $agent_join_filters), $tgrupo_join, join(' ', $tgrupo_join_filters), @@ -3883,7 +3887,7 @@ function events_page_details($event, $server='') global $config; // If server is provided, get the hash parameters. - if (!empty($server) && defined('METACONSOLE')) { + if (!empty($server) && is_metaconsole()) { $hashdata = metaconsole_get_server_hashdata($server); $hashstring = '&loginhash=auto&loginhash_data='.$hashdata.'&loginhash_user='.str_rot13($config['id_user']); $serverstring = $server['server_url'].'/'; @@ -4185,10 +4189,6 @@ function events_page_details($event, $server='') $details = '
    '.html_print_table($table_details, true).'
    '; - if (!empty($server) && defined('METACONSOLE')) { - metaconsole_restore_db(); - } - return $details; } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 7b7170ff09..15a92c3bcf 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1487,7 +1487,7 @@ function ui_require_javascript_file($name, $path='include/javascript/', $echo_ta $filename = $path.$name.'.js'; if ($echo_tag) { - echo ''; + echo ''; return null; } @@ -1504,7 +1504,7 @@ function ui_require_javascript_file($name, $path='include/javascript/', $echo_ta return false; } - if (defined('METACONSOLE')) { + if (is_metaconsole()) { $config['js'][$name] = '../../'.$filename; } else { $config['js'][$name] = $filename; diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 52eac8b77e..e7f927a3b9 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -246,6 +246,8 @@ if (is_ajax()) { $fields[] = 'ta.server_name as server_name'; } else { $fields[] = 'ts.server_name as server_name'; + $fields[] = 'te.id_agentmodule'; + $fields[] = 'te.server_id'; } $events = events_get_all( From 8d8e08d37b5f3261e94ed9ea553b818e0f17af79 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 22 Aug 2019 15:25:35 +0200 Subject: [PATCH 208/262] fixed visual error --- .../godmode/users/configure_user.php | 61 ++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 9333c15e9b..cfdb851d14 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -256,6 +256,36 @@ if ($create_user) { $password_confirm = ''; $new_user = true; } else { + $have_number = false; + $have_simbols = false; + + if ($config['pass_needs_numbers']) { + $nums = preg_match('/([[:alpha:]])*(\d)+(\w)*/', $password_confirm); + if ($nums == 0) { + ui_print_error_message(__('Password must contain numbers')); + $user_info = $values; + $password_new = ''; + $password_confirm = ''; + $new_user = true; + } else { + $have_number = true; + } + } + + if ($config['pass_needs_symbols']) { + $symbols = preg_match('/(\w)*(\W)+(\w)*/', $password_confirm); + if ($symbols == 0) { + ui_print_error_message(__('Password must contain symbols')); + $user_info = $values; + $password_new = ''; + $password_confirm = ''; + $new_user = true; + } else { + $have_simbols = true; + } + } + + $info = '{"Id_user":"'.$values['id_user'].'","FullName":"'.$values['fullname'].'","Firstname":"'.$values['firstname'].'","Lastname":"'.$values['lastname'].'","Email":"'.$values['email'].'","Phone":"'.$values['phone'].'","Comments":"'.$values['comments'].'","Is_admin":"'.$values['is_admin'].'","Language":"'.$values['language'].'","Timezone":"'.$values['timezone'].'","Block size":"'.$values['block_size'].'"'; if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) { @@ -264,7 +294,36 @@ if ($create_user) { $info .= '}'; } - $result = create_user($id, $password_new, $values); + $can_create = false; + + if ($config['pass_needs_symbols']) { + if ($have_simbols) { + $symbols = true; + } + } + + if ($config['pass_needs_numbers']) { + if ($have_number) { + $nums = true; + } + } + + if ($config['pass_needs_symbols'] && $config['pass_needs_numbers']) { + if ($nums && $symbols) { + $result = create_user($id, $password_new, $values); + } + } else if ($config['pass_needs_symbols'] && !$config['pass_needs_numbers']) { + if ($symbols) { + $result = create_user($id, $password_new, $values); + } + } else if (!$config['pass_needs_symbols'] && $config['pass_needs_numbers']) { + if ($nums) { + $result = create_user($id, $password_new, $values); + } + } else { + $result = create_user($id, $password_new, $values); + } + if ($result) { $res = save_pass_history($id, $password_new); } From 6a982697d23664217c4805b396ca3b3bcf16b972 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 23 Aug 2019 00:01:11 +0200 Subject: [PATCH 209/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 047bb2c0c9..08d03aa2cb 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190822 +Version: 7.0NG.738-190823 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 0b848d2048..cbc2443767 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190822" +pandora_version="7.0NG.738-190823" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index e83f11e231..8a5e85fc86 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190822'; +use constant AGENT_BUILD => '190823'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index a8d1783d08..aa180e4cf5 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190822 +%define release 190823 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 405d9a527e..bda4a011f6 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190822 +%define release 190823 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 832e17abdf..719c877d2f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190822" +PI_BUILD="190823" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index aa3d8b1aaa..6e5c577420 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190822} +{190823} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f549460365..99983bb093 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190822)") +#define PANDORA_VERSION ("7.0NG.738(Build 190823)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f17a6cfc09..a5a963b891 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190822))" + VALUE "ProductVersion", "(7.0NG.738(Build 190823))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7c3d72b0fa..826c706135 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190822 +Version: 7.0NG.738-190823 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index aded63bd4d..458846bb1e 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190822" +pandora_version="7.0NG.738-190823" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 08ccd024a3..5051d92052 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190822'; +$build_version = 'PC190823'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e1a30413fd..d3311baa9f 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 8d7b1ca43d..0030dc084e 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190822 +%define release 190823 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 8f71041b54..0bce047f69 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190822 +%define release 190823 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e6d720030f..0d2323fa89 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190822" +PI_BUILD="190823" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 38f3b6e77d..7e8e659bf6 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190822"; +my $version = "7.0NG.738 PS190823"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 6ddd676c33..f026223ef3 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190822"; +my $version = "7.0NG.738 PS190823"; # save program name for logging my $progname = basename($0); From 22f125dee089ae08a49efd60806bd1f4cf89c8dd Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Fri, 23 Aug 2019 10:59:06 +0200 Subject: [PATCH 210/262] fixed error labels pie chart --- .../include/graphs/flot/jquery.flot.pie.js | 1588 +++++++++-------- .../include/graphs/flot/pandora.flot.js | 105 +- 2 files changed, 887 insertions(+), 806 deletions(-) diff --git a/pandora_console/include/graphs/flot/jquery.flot.pie.js b/pandora_console/include/graphs/flot/jquery.flot.pie.js index 9c19db998b..37a8135e08 100644 --- a/pandora_console/include/graphs/flot/jquery.flot.pie.js +++ b/pandora_console/include/graphs/flot/jquery.flot.pie.js @@ -56,765 +56,897 @@ More detail and specific examples can be found in the included HTML file. */ (function($) { + // Maximum redraw attempts when fitting labels within the plot - // Maximum redraw attempts when fitting labels within the plot + var REDRAW_ATTEMPTS = 10; - var REDRAW_ATTEMPTS = 10; + // Factor by which to shrink the pie when fitting labels within the plot - // Factor by which to shrink the pie when fitting labels within the plot + var REDRAW_SHRINK = 0.95; - var REDRAW_SHRINK = 0.95; + function init(plot) { + var canvas = null, + target = null, + options = null, + maxRadius = null, + centerLeft = null, + centerTop = null, + processed = false, + ctx = null; - function init(plot) { + // interactive variables - var canvas = null, - target = null, - options = null, - maxRadius = null, - centerLeft = null, - centerTop = null, - processed = false, - ctx = null; + var highlights = []; - // interactive variables + // add hook to determine if pie plugin in enabled, and then perform necessary operations - var highlights = []; + plot.hooks.processOptions.push(function(plot, options) { + if (options.series.pie.show) { + options.grid.show = false; - // add hook to determine if pie plugin in enabled, and then perform necessary operations + // set labels.show - plot.hooks.processOptions.push(function(plot, options) { - if (options.series.pie.show) { + if (options.series.pie.label.show == "auto") { + if (options.legend.show) { + options.series.pie.label.show = false; + } else { + options.series.pie.label.show = true; + } + } - options.grid.show = false; + // set radius - // set labels.show + if (options.series.pie.radius == "auto") { + if (options.series.pie.label.show) { + options.series.pie.radius = 3 / 4; + } else { + options.series.pie.radius = 1; + } + } - if (options.series.pie.label.show == "auto") { - if (options.legend.show) { - options.series.pie.label.show = false; - } else { - options.series.pie.label.show = true; - } - } + // ensure sane tilt - // set radius + if (options.series.pie.tilt > 1) { + options.series.pie.tilt = 1; + } else if (options.series.pie.tilt < 0) { + options.series.pie.tilt = 0; + } + } + }); - if (options.series.pie.radius == "auto") { - if (options.series.pie.label.show) { - options.series.pie.radius = 3/4; - } else { - options.series.pie.radius = 1; - } - } + plot.hooks.bindEvents.push(function(plot, eventHolder) { + var options = plot.getOptions(); + if (options.series.pie.show) { + if (options.grid.hoverable) { + eventHolder.unbind("mousemove").mousemove(onMouseMove); + } + if (options.grid.clickable) { + eventHolder.unbind("click").click(onClick); + } + } + }); - // ensure sane tilt + plot.hooks.processDatapoints.push(function(plot, series, data, datapoints) { + var options = plot.getOptions(); + if (options.series.pie.show) { + processDatapoints(plot, series, data, datapoints); + } + }); - if (options.series.pie.tilt > 1) { - options.series.pie.tilt = 1; - } else if (options.series.pie.tilt < 0) { - options.series.pie.tilt = 0; - } - } - }); + plot.hooks.drawOverlay.push(function(plot, octx) { + var options = plot.getOptions(); + if (options.series.pie.show) { + drawOverlay(plot, octx); + } + }); - plot.hooks.bindEvents.push(function(plot, eventHolder) { - var options = plot.getOptions(); - if (options.series.pie.show) { - if (options.grid.hoverable) { - eventHolder.unbind("mousemove").mousemove(onMouseMove); - } - if (options.grid.clickable) { - eventHolder.unbind("click").click(onClick); - } - } - }); + plot.hooks.draw.push(function(plot, newCtx) { + var options = plot.getOptions(); + if (options.series.pie.show) { + draw(plot, newCtx); + } + }); - plot.hooks.processDatapoints.push(function(plot, series, data, datapoints) { - var options = plot.getOptions(); - if (options.series.pie.show) { - processDatapoints(plot, series, data, datapoints); - } - }); + function processDatapoints(plot) { + if (!processed) { + processed = true; + canvas = plot.getCanvas(); + target = $(canvas).parent(); + options = plot.getOptions(); + plot.setData(combine(plot.getData())); + } + } - plot.hooks.drawOverlay.push(function(plot, octx) { - var options = plot.getOptions(); - if (options.series.pie.show) { - drawOverlay(plot, octx); - } - }); + function combine(data) { + var total = 0, + combined = 0, + numCombined = 0, + color = options.series.pie.combine.color, + newdata = []; - plot.hooks.draw.push(function(plot, newCtx) { - var options = plot.getOptions(); - if (options.series.pie.show) { - draw(plot, newCtx); - } - }); + // Fix up the raw data from Flot, ensuring the data is numeric - function processDatapoints(plot, series, datapoints) { - if (!processed) { - processed = true; - canvas = plot.getCanvas(); - target = $(canvas).parent(); - options = plot.getOptions(); - plot.setData(combine(plot.getData())); - } - } + for (var i = 0; i < data.length; ++i) { + var value = data[i].data; - function combine(data) { + // If the data is an array, we'll assume that it's a standard + // Flot x-y pair, and are concerned only with the second value. - var total = 0, - combined = 0, - numCombined = 0, - color = options.series.pie.combine.color, - newdata = []; + // Note how we use the original array, rather than creating a + // new one; this is more efficient and preserves any extra data + // that the user may have stored in higher indexes. - // Fix up the raw data from Flot, ensuring the data is numeric + if ($.isArray(value) && value.length == 1) { + value = value[0]; + } - for (var i = 0; i < data.length; ++i) { + if ($.isArray(value)) { + // Equivalent to $.isNumeric() but compatible with jQuery < 1.7 + if (!isNaN(parseFloat(value[1])) && isFinite(value[1])) { + value[1] = +value[1]; + } else { + value[1] = 0; + } + } else if (!isNaN(parseFloat(value)) && isFinite(value)) { + value = [1, +value]; + } else { + value = [1, 0]; + } - var value = data[i].data; + data[i].data = [value]; + } - // If the data is an array, we'll assume that it's a standard - // Flot x-y pair, and are concerned only with the second value. + // Sum up all the slices, so we can calculate percentages for each - // Note how we use the original array, rather than creating a - // new one; this is more efficient and preserves any extra data - // that the user may have stored in higher indexes. + for (var i = 0; i < data.length; ++i) { + total += data[i].data[0][1]; + } - if ($.isArray(value) && value.length == 1) { - value = value[0]; - } + // Count the number of slices with percentages below the combine + // threshold; if it turns out to be just one, we won't combine. - if ($.isArray(value)) { - // Equivalent to $.isNumeric() but compatible with jQuery < 1.7 - if (!isNaN(parseFloat(value[1])) && isFinite(value[1])) { - value[1] = +value[1]; - } else { - value[1] = 0; - } - } else if (!isNaN(parseFloat(value)) && isFinite(value)) { - value = [1, +value]; - } else { - value = [1, 0]; - } + for (var i = 0; i < data.length; ++i) { + var value = data[i].data[0][1]; + if (value / total <= options.series.pie.combine.threshold) { + combined += value; + numCombined++; + if (!color) { + color = data[i].color; + } + } + } - data[i].data = [value]; - } - - // Sum up all the slices, so we can calculate percentages for each - - for (var i = 0; i < data.length; ++i) { - total += data[i].data[0][1]; - } - - // Count the number of slices with percentages below the combine - // threshold; if it turns out to be just one, we won't combine. - - for (var i = 0; i < data.length; ++i) { - var value = data[i].data[0][1]; - if (value / total <= options.series.pie.combine.threshold) { - combined += value; - numCombined++; - if (!color) { - color = data[i].color; - } - } - } - - for (var i = 0; i < data.length; ++i) { - var value = data[i].data[0][1]; - if (numCombined < 2 || value / total > options.series.pie.combine.threshold) { - newdata.push( - $.extend(data[i], { /* extend to allow keeping all other original data values + for (var i = 0; i < data.length; ++i) { + var value = data[i].data[0][1]; + if ( + numCombined < 2 || + value / total > options.series.pie.combine.threshold + ) { + newdata.push( + $.extend(data[i], { + /* extend to allow keeping all other original data values and using them e.g. in labelFormatter. */ - data: [[1, value]], - color: data[i].color, - label: data[i].label, - angle: value * Math.PI * 2 / total, - percent: value / (total / 100) - }) - ); - } - } - - if (numCombined > 1) { - newdata.push({ - data: [[1, combined]], - color: color, - label: options.series.pie.combine.label, - angle: combined * Math.PI * 2 / total, - percent: combined / (total / 100) - }); - } - - return newdata; - } - - function draw(plot, newCtx) { - - if (!target) { - return; // if no series were passed - } - - var canvasWidth = plot.getPlaceholder().width(), - canvasHeight = plot.getPlaceholder().height(), - legendWidth = target.children().filter(".legend").children().width() || 0; - - ctx = newCtx; - - // WARNING: HACK! REWRITE THIS CODE AS SOON AS POSSIBLE! - - // When combining smaller slices into an 'other' slice, we need to - // add a new series. Since Flot gives plugins no way to modify the - // list of series, the pie plugin uses a hack where the first call - // to processDatapoints results in a call to setData with the new - // list of series, then subsequent processDatapoints do nothing. - - // The plugin-global 'processed' flag is used to control this hack; - // it starts out false, and is set to true after the first call to - // processDatapoints. - - // Unfortunately this turns future setData calls into no-ops; they - // call processDatapoints, the flag is true, and nothing happens. - - // To fix this we'll set the flag back to false here in draw, when - // all series have been processed, so the next sequence of calls to - // processDatapoints once again starts out with a slice-combine. - // This is really a hack; in 0.9 we need to give plugins a proper - // way to modify series before any processing begins. - - processed = false; - - // calculate maximum radius and center point - - maxRadius = Math.min(canvasWidth, canvasHeight / options.series.pie.tilt) / 2; - centerTop = canvasHeight / 2 + options.series.pie.offset.top; - centerLeft = canvasWidth / 2; - - if (options.series.pie.offset.left == "auto") { - if (options.legend.position.match("w")) { - centerLeft += legendWidth / 2; - } else { - centerLeft -= legendWidth / 2; - } - if (centerLeft < maxRadius) { - centerLeft = maxRadius; - } else if (centerLeft > canvasWidth - maxRadius) { - centerLeft = canvasWidth - maxRadius; - } - } else { - centerLeft += options.series.pie.offset.left; - } - - var slices = plot.getData(), - attempts = 0; - - // Keep shrinking the pie's radius until drawPie returns true, - // indicating that all the labels fit, or we try too many times. - - do { - if (attempts > 0) { - maxRadius *= REDRAW_SHRINK; - } - attempts += 1; - clear(); - if (options.series.pie.tilt <= 0.8) { - drawShadow(); - } - } while (!drawPie() && attempts < REDRAW_ATTEMPTS) - - if (attempts >= REDRAW_ATTEMPTS) { - clear(); - target.prepend("
    Could not draw pie with labels contained inside canvas
    "); - } - - if (plot.setSeries && plot.insertLegend) { - plot.setSeries(slices); - plot.insertLegend(); - } - - // we're actually done at this point, just defining internal functions at this point - - function clear() { - ctx.clearRect(0, 0, canvasWidth, canvasHeight); - target.children().filter(".pieLabel, .pieLabelBackground").remove(); - } - - function drawShadow() { - - var shadowLeft = options.series.pie.shadow.left; - var shadowTop = options.series.pie.shadow.top; - var edge = 10; - var alpha = options.series.pie.shadow.alpha; - var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; - - if (radius >= canvasWidth / 2 - shadowLeft || radius * options.series.pie.tilt >= canvasHeight / 2 - shadowTop || radius <= edge) { - return; // shadow would be outside canvas, so don't draw it - } - - ctx.save(); - ctx.translate(shadowLeft,shadowTop); - ctx.globalAlpha = alpha; - ctx.fillStyle = "#000"; - - // center and rotate to starting position - - ctx.translate(centerLeft,centerTop); - ctx.scale(1, options.series.pie.tilt); - - //radius -= edge; - - for (var i = 1; i <= edge; i++) { - ctx.beginPath(); - ctx.arc(0, 0, radius, 0, Math.PI * 2, false); - ctx.fill(); - radius -= i; - } - - ctx.restore(); - } - - function drawPie() { - - var startAngle = Math.PI * options.series.pie.startAngle; - var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; - - // center and rotate to starting position - - ctx.save(); - ctx.translate(centerLeft,centerTop); - ctx.scale(1, options.series.pie.tilt); - //ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera - - // draw slices - - ctx.save(); - var currentAngle = startAngle; - for (var i = 0; i < slices.length; ++i) { - slices[i].startAngle = currentAngle; - drawSlice(slices[i].angle, slices[i].color, true); - } - ctx.restore(); - - // draw slice outlines - - if (options.series.pie.stroke.width > 0) { - ctx.save(); - ctx.lineWidth = options.series.pie.stroke.width; - currentAngle = startAngle; - for (var i = 0; i < slices.length; ++i) { - drawSlice(slices[i].angle, options.series.pie.stroke.color, false); - } - ctx.restore(); - } - - // draw donut hole - - drawDonutHole(ctx); - - ctx.restore(); - - // Draw the labels, returning true if they fit within the plot - - if (options.series.pie.label.show) { - return drawLabels(); - } else return true; - - function drawSlice(angle, color, fill) { - - if (angle <= 0 || isNaN(angle)) { - return; - } - - if (fill) { - ctx.fillStyle = color; - } else { - ctx.strokeStyle = color; - ctx.lineJoin = "round"; - } - - ctx.beginPath(); - if (Math.abs(angle - Math.PI * 2) > 0.000000001) { - ctx.moveTo(0, 0); // Center of the pie - } - - //ctx.arc(0, 0, radius, 0, angle, false); // This doesn't work properly in Opera - ctx.arc(0, 0, radius,currentAngle, currentAngle + angle / 2, false); - ctx.arc(0, 0, radius,currentAngle + angle / 2, currentAngle + angle, false); - ctx.closePath(); - //ctx.rotate(angle); // This doesn't work properly in Opera - currentAngle += angle; - - if (fill) { - ctx.fill(); - } else { - ctx.stroke(); - } - } - - function drawLabels() { - - var currentAngle = startAngle; - var radius = options.series.pie.label.radius > 1 ? options.series.pie.label.radius : maxRadius * options.series.pie.label.radius; - - for (var i = 0; i < slices.length; ++i) { - if (slices[i].percent >= options.series.pie.label.threshold * 100) { - if (!drawLabel(slices[i], currentAngle, i)) { - return false; - } - } - currentAngle += slices[i].angle; - } - - return true; - - function drawLabel(slice, startAngle, index) { - - if (slice.data[0][1] == 0) { - return true; - } - - // format label text - - var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter; - - if (lf) { - text = lf(slice.label, slice); - } else { - text = slice.label; - } - - if (plf) { - text = plf(text, slice); - } - - var halfAngle = ((startAngle + slice.angle) + startAngle) / 2; - var x = centerLeft + Math.round(Math.cos(halfAngle) * radius); - var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt; - - var html = "" + text + ""; - target.append(html); - - var label = target.children("#pieLabel" + index); - var labelTop = (y - label.height() / 2); - var labelLeft = (x - label.width() / 2); - - label.css("top", labelTop); - label.css("left", labelLeft); - - // check to make sure that the label is not outside the canvas - - if (0 - labelTop > 0 || 0 - labelLeft > 0 || canvasHeight - (labelTop + label.height()) < 0 || canvasWidth - (labelLeft + label.width()) < 0) { - return false; - } - - if (options.series.pie.label.background.opacity != 0) { - - // put in the transparent background separately to avoid blended labels and label boxes - - var c = options.series.pie.label.background.color; - - if (c == null) { - c = slice.color; - } - - var pos = "top:" + labelTop + "px;left:" + labelLeft + "px;"; - $("
    ") - .css("opacity", options.series.pie.label.background.opacity) - .insertBefore(label); - } - - return true; - } // end individual label function - } // end drawLabels function - } // end drawPie function - } // end draw function - - // Placed here because it needs to be accessed from multiple locations - - function drawDonutHole(layer) { - if (options.series.pie.innerRadius > 0) { - - // subtract the center - - layer.save(); - var innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius; - layer.globalCompositeOperation = "destination-out"; // this does not work with excanvas, but it will fall back to using the stroke color - layer.beginPath(); - layer.fillStyle = options.series.pie.stroke.color; - layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false); - layer.fill(); - layer.closePath(); - layer.restore(); - - // add inner stroke - - layer.save(); - layer.beginPath(); - layer.strokeStyle = options.series.pie.stroke.color; - layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false); - layer.stroke(); - layer.closePath(); - layer.restore(); - - // TODO: add extra shadow inside hole (with a mask) if the pie is tilted. - } - } - - //-- Additional Interactive related functions -- - - function isPointInPoly(poly, pt) { - for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i) - ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1])) - && (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0]) - && (c = !c); - return c; - } - - function findNearbySlice(mouseX, mouseY) { - - var slices = plot.getData(), - options = plot.getOptions(), - radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius, - x, y; - - for (var i = 0; i < slices.length; ++i) { - - var s = slices[i]; - - if (s.pie.show) { - - ctx.save(); - ctx.beginPath(); - ctx.moveTo(0, 0); // Center of the pie - //ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here. - ctx.arc(0, 0, radius, s.startAngle, s.startAngle + s.angle / 2, false); - ctx.arc(0, 0, radius, s.startAngle + s.angle / 2, s.startAngle + s.angle, false); - ctx.closePath(); - x = mouseX - centerLeft; - y = mouseY - centerTop; - - if (ctx.isPointInPath) { - if (ctx.isPointInPath(mouseX - centerLeft, mouseY - centerTop)) { - ctx.restore(); - return { - datapoint: [s.percent, s.data], - dataIndex: 0, - series: s, - seriesIndex: i - }; - } - } else { - - // excanvas for IE doesn;t support isPointInPath, this is a workaround. - - var p1X = radius * Math.cos(s.startAngle), - p1Y = radius * Math.sin(s.startAngle), - p2X = radius * Math.cos(s.startAngle + s.angle / 4), - p2Y = radius * Math.sin(s.startAngle + s.angle / 4), - p3X = radius * Math.cos(s.startAngle + s.angle / 2), - p3Y = radius * Math.sin(s.startAngle + s.angle / 2), - p4X = radius * Math.cos(s.startAngle + s.angle / 1.5), - p4Y = radius * Math.sin(s.startAngle + s.angle / 1.5), - p5X = radius * Math.cos(s.startAngle + s.angle), - p5Y = radius * Math.sin(s.startAngle + s.angle), - arrPoly = [[0, 0], [p1X, p1Y], [p2X, p2Y], [p3X, p3Y], [p4X, p4Y], [p5X, p5Y]], - arrPoint = [x, y]; - - // TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt? - - if (isPointInPoly(arrPoly, arrPoint)) { - ctx.restore(); - return { - datapoint: [s.percent, s.data], - dataIndex: 0, - series: s, - seriesIndex: i - }; - } - } - - ctx.restore(); - } - } - - return null; - } - - function onMouseMove(e) { - triggerClickHoverEvent("plothover", e); - } - - function onClick(e) { - triggerClickHoverEvent("plotclick", e); - } - - // trigger click or hover event (they send the same parameters so we share their code) - - function triggerClickHoverEvent(eventname, e) { - - var offset = plot.offset(); - var canvasX = parseInt(e.pageX - offset.left); - var canvasY = parseInt(e.pageY - offset.top); - var item = findNearbySlice(canvasX, canvasY); - - if (options.grid.autoHighlight) { - - // clear auto-highlights - - for (var i = 0; i < highlights.length; ++i) { - var h = highlights[i]; - if (h.auto == eventname && !(item && h.series == item.series)) { - unhighlight(h.series); - } - } - } - - // highlight the slice - - if (item) { - highlight(item.series, eventname); - } - - // trigger any hover bind events - - var pos = { pageX: e.pageX, pageY: e.pageY }; - target.trigger(eventname, [pos, item]); - } - - function highlight(s, auto) { - //if (typeof s == "number") { - // s = series[s]; - //} - - var i = indexOfHighlight(s); - - if (i == -1) { - highlights.push({ series: s, auto: auto }); - plot.triggerRedrawOverlay(); - } else if (!auto) { - highlights[i].auto = false; - } - } - - function unhighlight(s) { - if (s == null) { - highlights = []; - plot.triggerRedrawOverlay(); - } - - //if (typeof s == "number") { - // s = series[s]; - //} - - var i = indexOfHighlight(s); - - if (i != -1) { - highlights.splice(i, 1); - plot.triggerRedrawOverlay(); - } - } - - function indexOfHighlight(s) { - for (var i = 0; i < highlights.length; ++i) { - var h = highlights[i]; - if (h.series == s) - return i; - } - return -1; - } - - function drawOverlay(plot, octx) { - - var options = plot.getOptions(); - - var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; - - octx.save(); - octx.translate(centerLeft, centerTop); - octx.scale(1, options.series.pie.tilt); - - for (var i = 0; i < highlights.length; ++i) { - drawHighlight(highlights[i].series); - } - - drawDonutHole(octx); - - octx.restore(); - - function drawHighlight(series) { - - if (series.angle <= 0 || isNaN(series.angle)) { - return; - } - - //octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString(); - octx.fillStyle = "rgba(255, 255, 255, " + options.series.pie.highlight.opacity + ")"; // this is temporary until we have access to parseColor - octx.beginPath(); - if (Math.abs(series.angle - Math.PI * 2) > 0.000000001) { - octx.moveTo(0, 0); // Center of the pie - } - octx.arc(0, 0, radius, series.startAngle, series.startAngle + series.angle / 2, false); - octx.arc(0, 0, radius, series.startAngle + series.angle / 2, series.startAngle + series.angle, false); - octx.closePath(); - octx.fill(); - } - } - } // end init (plugin body) - - // define pie specific options and their default values - - var options = { - series: { - pie: { - show: false, - radius: "auto", // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value) - innerRadius: 0, /* for donut */ - startAngle: 3/2, - tilt: 1, - shadow: { - left: 5, // shadow left offset - top: 15, // shadow top offset - alpha: 0.02 // shadow alpha - }, - offset: { - top: 0, - left: "auto" - }, - stroke: { - color: "#fff", - width: 1 - }, - label: { - show: "auto", - formatter: function(label, slice) { - return "
    " + label + "
    " + Math.round(slice.percent) + "%
    "; - }, // formatter function - radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value) - background: { - color: null, - opacity: 0 - }, - threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow) - }, - combine: { - threshold: -1, // percentage at which to combine little slices into one larger slice - color: null, // color to give the new slice (auto-generated if null) - label: "Other" // label to give the new slice - }, - highlight: { - //color: "#fff", // will add this functionality once parseColor is available - opacity: 0.5 - } - } - } - }; - - $.plot.plugins.push({ - init: init, - options: options, - name: "pie", - version: "1.1" - }); - + data: [[1, value]], + color: data[i].color, + label: data[i].label, + angle: (value * Math.PI * 2) / total, + percent: value / (total / 100) + }) + ); + } + } + + if (numCombined > 1) { + newdata.push({ + data: [[1, combined]], + color: color, + label: options.series.pie.combine.label, + angle: (combined * Math.PI * 2) / total, + percent: combined / (total / 100) + }); + } + + return newdata; + } + + function draw(plot, newCtx) { + if (!target) { + return; // if no series were passed + } + + var canvasWidth = plot.getPlaceholder().width(), + canvasHeight = plot.getPlaceholder().height(), + legendWidth = + target + .children() + .filter(".legend") + .children() + .width() || 0; + + ctx = newCtx; + + // WARNING: HACK! REWRITE THIS CODE AS SOON AS POSSIBLE! + + // When combining smaller slices into an 'other' slice, we need to + // add a new series. Since Flot gives plugins no way to modify the + // list of series, the pie plugin uses a hack where the first call + // to processDatapoints results in a call to setData with the new + // list of series, then subsequent processDatapoints do nothing. + + // The plugin-global 'processed' flag is used to control this hack; + // it starts out false, and is set to true after the first call to + // processDatapoints. + + // Unfortunately this turns future setData calls into no-ops; they + // call processDatapoints, the flag is true, and nothing happens. + + // To fix this we'll set the flag back to false here in draw, when + // all series have been processed, so the next sequence of calls to + // processDatapoints once again starts out with a slice-combine. + // This is really a hack; in 0.9 we need to give plugins a proper + // way to modify series before any processing begins. + + processed = false; + + // calculate maximum radius and center point + + maxRadius = + Math.min(canvasWidth, canvasHeight / options.series.pie.tilt) / 2; + centerTop = canvasHeight / 2 + options.series.pie.offset.top; + centerLeft = canvasWidth / 2; + + if (options.series.pie.offset.left == "auto") { + if (options.legend.position.match("w")) { + centerLeft += legendWidth / 2; + } else { + centerLeft -= legendWidth / 2; + } + if (centerLeft < maxRadius) { + centerLeft = maxRadius; + } else if (centerLeft > canvasWidth - maxRadius) { + centerLeft = canvasWidth - maxRadius; + } + } else { + centerLeft += options.series.pie.offset.left; + } + + var slices = plot.getData(), + attempts = 0; + + // Keep shrinking the pie's radius until drawPie returns true, + // indicating that all the labels fit, or we try too many times. + + do { + if (attempts > 0) { + maxRadius *= REDRAW_SHRINK; + } + attempts += 1; + clear(); + if (options.series.pie.tilt <= 0.8) { + drawShadow(); + } + } while (!drawPie() && attempts < REDRAW_ATTEMPTS); + + if (attempts >= REDRAW_ATTEMPTS) { + clear(); + target.prepend( + "
    Could not draw pie with labels contained inside canvas
    " + ); + } + + if (plot.setSeries && plot.insertLegend) { + plot.setSeries(slices); + plot.insertLegend(); + } + + // we're actually done at this point, just defining internal functions at this point + + function clear() { + ctx.clearRect(0, 0, canvasWidth, canvasHeight); + target + .children() + .filter(".pieLabel, .pieLabelBackground") + .remove(); + } + + function drawShadow() { + var shadowLeft = options.series.pie.shadow.left; + var shadowTop = options.series.pie.shadow.top; + var edge = 10; + var alpha = options.series.pie.shadow.alpha; + var radius = + options.series.pie.radius > 1 + ? options.series.pie.radius + : maxRadius * options.series.pie.radius; + + if ( + radius >= canvasWidth / 2 - shadowLeft || + radius * options.series.pie.tilt >= canvasHeight / 2 - shadowTop || + radius <= edge + ) { + return; // shadow would be outside canvas, so don't draw it + } + + ctx.save(); + ctx.translate(shadowLeft, shadowTop); + ctx.globalAlpha = alpha; + ctx.fillStyle = "#000"; + + // center and rotate to starting position + + ctx.translate(centerLeft, centerTop); + ctx.scale(1, options.series.pie.tilt); + + //radius -= edge; + + for (var i = 1; i <= edge; i++) { + ctx.beginPath(); + ctx.arc(0, 0, radius, 0, Math.PI * 2, false); + ctx.fill(); + radius -= i; + } + + ctx.restore(); + } + + function drawPie() { + var startAngle = Math.PI * options.series.pie.startAngle; + var radius = + options.series.pie.radius > 1 + ? options.series.pie.radius + : maxRadius * options.series.pie.radius; + + // center and rotate to starting position + + ctx.save(); + ctx.translate(centerLeft, centerTop); + ctx.scale(1, options.series.pie.tilt); + //ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera + + // draw slices + + ctx.save(); + var currentAngle = startAngle; + for (var i = 0; i < slices.length; ++i) { + slices[i].startAngle = currentAngle; + drawSlice(slices[i].angle, slices[i].color, true); + } + ctx.restore(); + + // draw slice outlines + + if (options.series.pie.stroke.width > 0) { + ctx.save(); + ctx.lineWidth = options.series.pie.stroke.width; + currentAngle = startAngle; + for (var i = 0; i < slices.length; ++i) { + drawSlice(slices[i].angle, options.series.pie.stroke.color, false); + } + ctx.restore(); + } + + // draw donut hole + + drawDonutHole(ctx); + + ctx.restore(); + + // Draw the labels, returning true if they fit within the plot + + if (options.series.pie.label.show) { + return drawLabels(); + } else return true; + + function drawSlice(angle, color, fill) { + if (angle <= 0 || isNaN(angle)) { + return; + } + + if (fill) { + ctx.fillStyle = color; + } else { + ctx.strokeStyle = color; + ctx.lineJoin = "round"; + } + + ctx.beginPath(); + if (Math.abs(angle - Math.PI * 2) > 0.000000001) { + ctx.moveTo(0, 0); // Center of the pie + } + + //ctx.arc(0, 0, radius, 0, angle, false); // This doesn't work properly in Opera + ctx.arc(0, 0, radius, currentAngle, currentAngle + angle / 2, false); + ctx.arc( + 0, + 0, + radius, + currentAngle + angle / 2, + currentAngle + angle, + false + ); + ctx.closePath(); + //ctx.rotate(angle); // This doesn't work properly in Opera + currentAngle += angle; + + if (fill) { + ctx.fill(); + } else { + ctx.stroke(); + } + } + + function drawLabels() { + var labels = []; + var currentAngle = startAngle; + var radius = + options.series.pie.label.radius > 1 + ? options.series.pie.label.radius + : maxRadius * options.series.pie.label.radius; + + for (var i = 0; i < slices.length; ++i) { + if (slices[i].percent >= options.series.pie.label.threshold * 100) { + if (!drawLabel(slices[i], currentAngle, i)) { + return false; + } + } + currentAngle += slices[i].angle; + } + + return true; + + function drawLabel(slice, startAngle, index) { + if (slice.data[0][1] == 0) { + return true; + } + + // format label text + + var lf = options.legend.labelFormatter, + text, + plf = options.series.pie.label.formatter; + + if (lf) { + text = lf(slice.label, slice); + } else { + text = slice.label; + } + + if (plf) { + text = plf(text, slice); + } + + var halfAngle = (startAngle + slice.angle + startAngle) / 2; + var x = centerLeft + Math.round(Math.cos(halfAngle) * radius); + var y = + centerTop + + Math.round(Math.sin(halfAngle) * radius) * + options.series.pie.tilt; + + var html = + "" + + text + + ""; + target.append(html); + + var label = target.children("#pieLabel" + index); + var labelTop = y - label.height() / 2; + var labelLeft = x - label.width() / 2; + + label.css("top", labelTop); + label.css("left", labelLeft); + + // check to make sure that the label doesn't overlap one of the other labels + var label_pos = getPositions(label); + for (var j = 0; j < labels.length; j++) { + var tmpPos = getPositions(labels[j]); + var horizontalMatch = comparePositions(label_pos[0], tmpPos[0]); + var verticalMatch = comparePositions(label_pos[1], tmpPos[1]); + var match = horizontalMatch && verticalMatch; + if (match) { + var newTop = tmpPos[1][0] - (label.height() + 1); + label.css("top", newTop); + labelTop = newTop; + } + } + + function getPositions(box) { + var $box = $(box); + var pos = $box.position(); + var width = $box.width(); + var height = $box.height(); + return [ + [pos.left, pos.left + width], + [pos.top, pos.top + height] + ]; + } + + function comparePositions(p1, p2) { + var x1 = p1[0] < p2[0] ? p1 : p2; + var x2 = p1[0] < p2[0] ? p2 : p1; + return x1[1] > x2[0] || x1[0] === x2[0] ? true : false; + } + labels.push(label); + + // check to make sure that the label is not outside the canvas + + if ( + 0 - labelTop > 0 || + 0 - labelLeft > 0 || + canvasHeight - (labelTop + label.height()) < 0 || + canvasWidth - (labelLeft + label.width()) < 0 + ) { + return false; + } + + if (options.series.pie.label.background.opacity != 0) { + // put in the transparent background separately to avoid blended labels and label boxes + + var c = options.series.pie.label.background.color; + + if (c == null) { + c = slice.color; + } + + var pos = "top:" + labelTop + "px;left:" + labelLeft + "px;"; + $( + "
    " + ) + .css("opacity", options.series.pie.label.background.opacity) + .insertBefore(label); + } + + return true; + } // end individual label function + } // end drawLabels function + } // end drawPie function + } // end draw function + + // Placed here because it needs to be accessed from multiple locations + + function drawDonutHole(layer) { + if (options.series.pie.innerRadius > 0) { + // subtract the center + + layer.save(); + var innerRadius = + options.series.pie.innerRadius > 1 + ? options.series.pie.innerRadius + : maxRadius * options.series.pie.innerRadius; + layer.globalCompositeOperation = "destination-out"; // this does not work with excanvas, but it will fall back to using the stroke color + layer.beginPath(); + layer.fillStyle = options.series.pie.stroke.color; + layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false); + layer.fill(); + layer.closePath(); + layer.restore(); + + // add inner stroke + + layer.save(); + layer.beginPath(); + layer.strokeStyle = options.series.pie.stroke.color; + layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false); + layer.stroke(); + layer.closePath(); + layer.restore(); + + // TODO: add extra shadow inside hole (with a mask) if the pie is tilted. + } + } + + //-- Additional Interactive related functions -- + + function isPointInPoly(poly, pt) { + for (var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i) + ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || + (poly[j][1] <= pt[1] && pt[1] < poly[i][1])) && + pt[0] < + ((poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1])) / + (poly[j][1] - poly[i][1]) + + poly[i][0] && + (c = !c); + return c; + } + + function findNearbySlice(mouseX, mouseY) { + var slices = plot.getData(), + options = plot.getOptions(), + radius = + options.series.pie.radius > 1 + ? options.series.pie.radius + : maxRadius * options.series.pie.radius, + x, + y; + + for (var i = 0; i < slices.length; ++i) { + var s = slices[i]; + + if (s.pie.show) { + ctx.save(); + ctx.beginPath(); + ctx.moveTo(0, 0); // Center of the pie + //ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here. + ctx.arc( + 0, + 0, + radius, + s.startAngle, + s.startAngle + s.angle / 2, + false + ); + ctx.arc( + 0, + 0, + radius, + s.startAngle + s.angle / 2, + s.startAngle + s.angle, + false + ); + ctx.closePath(); + x = mouseX - centerLeft; + y = mouseY - centerTop; + + if (ctx.isPointInPath) { + if (ctx.isPointInPath(mouseX - centerLeft, mouseY - centerTop)) { + ctx.restore(); + return { + datapoint: [s.percent, s.data], + dataIndex: 0, + series: s, + seriesIndex: i + }; + } + } else { + // excanvas for IE doesn;t support isPointInPath, this is a workaround. + + var p1X = radius * Math.cos(s.startAngle), + p1Y = radius * Math.sin(s.startAngle), + p2X = radius * Math.cos(s.startAngle + s.angle / 4), + p2Y = radius * Math.sin(s.startAngle + s.angle / 4), + p3X = radius * Math.cos(s.startAngle + s.angle / 2), + p3Y = radius * Math.sin(s.startAngle + s.angle / 2), + p4X = radius * Math.cos(s.startAngle + s.angle / 1.5), + p4Y = radius * Math.sin(s.startAngle + s.angle / 1.5), + p5X = radius * Math.cos(s.startAngle + s.angle), + p5Y = radius * Math.sin(s.startAngle + s.angle), + arrPoly = [ + [0, 0], + [p1X, p1Y], + [p2X, p2Y], + [p3X, p3Y], + [p4X, p4Y], + [p5X, p5Y] + ], + arrPoint = [x, y]; + + // TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt? + + if (isPointInPoly(arrPoly, arrPoint)) { + ctx.restore(); + return { + datapoint: [s.percent, s.data], + dataIndex: 0, + series: s, + seriesIndex: i + }; + } + } + + ctx.restore(); + } + } + + return null; + } + + function onMouseMove(e) { + triggerClickHoverEvent("plothover", e); + } + + function onClick(e) { + triggerClickHoverEvent("plotclick", e); + } + + // trigger click or hover event (they send the same parameters so we share their code) + + function triggerClickHoverEvent(eventname, e) { + var offset = plot.offset(); + var canvasX = parseInt(e.pageX - offset.left); + var canvasY = parseInt(e.pageY - offset.top); + var item = findNearbySlice(canvasX, canvasY); + + if (options.grid.autoHighlight) { + // clear auto-highlights + + for (var i = 0; i < highlights.length; ++i) { + var h = highlights[i]; + if (h.auto == eventname && !(item && h.series == item.series)) { + unhighlight(h.series); + } + } + } + + // highlight the slice + + if (item) { + highlight(item.series, eventname); + } + + // trigger any hover bind events + + var pos = { pageX: e.pageX, pageY: e.pageY }; + target.trigger(eventname, [pos, item]); + } + + function highlight(s, auto) { + //if (typeof s == "number") { + // s = series[s]; + //} + + var i = indexOfHighlight(s); + + if (i == -1) { + highlights.push({ series: s, auto: auto }); + plot.triggerRedrawOverlay(); + } else if (!auto) { + highlights[i].auto = false; + } + } + + function unhighlight(s) { + if (s == null) { + highlights = []; + plot.triggerRedrawOverlay(); + } + + //if (typeof s == "number") { + // s = series[s]; + //} + + var i = indexOfHighlight(s); + + if (i != -1) { + highlights.splice(i, 1); + plot.triggerRedrawOverlay(); + } + } + + function indexOfHighlight(s) { + for (var i = 0; i < highlights.length; ++i) { + var h = highlights[i]; + if (h.series == s) return i; + } + return -1; + } + + function drawOverlay(plot, octx) { + var options = plot.getOptions(); + + var radius = + options.series.pie.radius > 1 + ? options.series.pie.radius + : maxRadius * options.series.pie.radius; + + octx.save(); + octx.translate(centerLeft, centerTop); + octx.scale(1, options.series.pie.tilt); + + for (var i = 0; i < highlights.length; ++i) { + drawHighlight(highlights[i].series); + } + + drawDonutHole(octx); + + octx.restore(); + + function drawHighlight(series) { + if (series.angle <= 0 || isNaN(series.angle)) { + return; + } + + //octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString(); + octx.fillStyle = + "rgba(255, 255, 255, " + options.series.pie.highlight.opacity + ")"; // this is temporary until we have access to parseColor + octx.beginPath(); + if (Math.abs(series.angle - Math.PI * 2) > 0.000000001) { + octx.moveTo(0, 0); // Center of the pie + } + octx.arc( + 0, + 0, + radius, + series.startAngle, + series.startAngle + series.angle / 2, + false + ); + octx.arc( + 0, + 0, + radius, + series.startAngle + series.angle / 2, + series.startAngle + series.angle, + false + ); + octx.closePath(); + octx.fill(); + } + } + } // end init (plugin body) + + // define pie specific options and their default values + + var options = { + series: { + pie: { + show: false, + radius: "auto", // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value) + innerRadius: 0 /* for donut */, + startAngle: 3 / 2, + tilt: 1, + shadow: { + left: 5, // shadow left offset + top: 15, // shadow top offset + alpha: 0.02 // shadow alpha + }, + offset: { + top: 0, + left: "auto" + }, + stroke: { + color: "#fff", + width: 1 + }, + label: { + show: "auto", + formatter: function(label, slice) { + return ( + "
    " + + label + + "
    " + + Math.round(slice.percent) + + "%
    " + ); + }, // formatter function + radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value) + background: { + color: null, + opacity: 0 + }, + threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow) + }, + combine: { + threshold: -1, // percentage at which to combine little slices into one larger slice + color: null, // color to give the new slice (auto-generated if null) + label: "Other" // label to give the new slice + }, + highlight: { + //color: "#fff", // will add this functionality once parseColor is available + opacity: 0.5 + } + } + } + }; + + $.plot.plugins.push({ + init: init, + options: options, + name: "pie", + version: "1.1" + }); })(jQuery); diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index f0976cb98f..c62614ccd3 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1,4 +1,5 @@ /* global $ */ +/* exported pandoraFlotPie, pandoraFlotPieCustom */ function pandoraFlotPie( graph_id, @@ -14,7 +15,7 @@ function pandoraFlotPie( colors, hide_labels ) { - var labels = labels.split(separator); + labels = labels.split(separator); var data = values.split(separator); if (colors != "") { @@ -92,7 +93,7 @@ function pandoraFlotPie( function pieHover(event, pos, obj) { if (!obj) return; - index = obj.seriesIndex; + var index = obj.seriesIndex; legends.css("color", "#3F3F3D"); legends.eq(index).css("color", ""); } @@ -144,21 +145,14 @@ function pandoraFlotPieCustom( .pop() .split(".") .shift(); - var labels = labels.split(separator); - var legend = legend.split(separator); + labels = labels.split(separator); + legend = legend.split(separator); var data = values.split(separator); var no_data = 0; if (colors != "") { colors = colors.split(separator); } - var colors_data = [ - "#e63c52", - "#FFA631", - "#f3b200", - "#5BB6E5", - "#F2919D", - "#82b92e" - ]; + var color = null; for (var i = 0; i < data.length; i++) { if (colors != "") { @@ -174,28 +168,31 @@ function pandoraFlotPieCustom( if (width <= 450) { show_legend = false; - label_conf = { - show: false - }; - } else { label_conf = { show: true, - radius: 0.75, + radius: 5 / 8, formatter: function(label, series) { + console.log(series); return ( '
    ' + - series.percent.toFixed(2) + - "%
    " + "pt; font-weight:bolder;" + + "text-align:center;padding:2px;color:rgb(63, 63, 61)" + + '">' + + label + + ":
    " + + series.data[0][1] + + "
    " ); }, background: { - opacity: 0.5, - color: "" + opacity: 0.5 } }; + } else { + label_conf = { + show: false + }; } var conf_pie = { @@ -203,8 +200,8 @@ function pandoraFlotPieCustom( pie: { show: true, radius: 3 / 4, - innerRadius: 0.4 - //label: label_conf + innerRadius: 0.4, + label: label_conf } }, legend: { @@ -234,7 +231,7 @@ function pandoraFlotPieCustom( var legends = $("#" + graph_id + " .legendLabel"); var j = 0; legends.each(function() { - //$(this).css('width', $(this).width()); + //$(this).css("width", $(this).width()); $(this).css("font-size", font_size + "pt"); $(this).removeClass("legendLabel"); $(this).addClass(font); @@ -264,19 +261,6 @@ function pandoraFlotPieCustom( return false; }); - var pielegends = $("#" + graph_id + " .pieLabelBackground"); - pielegends.each(function() { - $(this) - .css("transform", "rotate(-35deg)") - .css("color", "black"); - }); - var labelpielegends = $("#" + graph_id + " .pieLabel"); - labelpielegends.each(function() { - $(this) - .css("transform", "rotate(-35deg)") - .css("color", "black"); - }); - // Events $("#" + graph_id).bind("plothover", pieHover); $("#" + graph_id).bind("plotclick", Clickpie); @@ -287,16 +271,17 @@ function pandoraFlotPieCustom( function pieHover(event, pos, obj) { if (!obj) return; - index = obj.seriesIndex; + var index = obj.seriesIndex; legends.css("color", "#3F3F3D"); legends.eq(index).css("color", ""); } function Clickpie(event, pos, obj) { if (!obj) return; - percent = parseFloat(obj.series.percent).toFixed(2); - valor = parseFloat(obj.series.data[0][1]); + var percent = parseFloat(obj.series.percent).toFixed(2); + var valor = parseFloat(obj.series.data[0][1]); + var value = ""; if (valor > 1000000) { value = Math.round((valor / 1000000) * 100) / 100; value = value + "M"; @@ -325,42 +310,6 @@ function pandoraFlotPieCustom( $("#watermark_image_" + graph_id).attr("src") ); } - /* - window.onresize = function(event) { - $.plot($('#' + graph_id), data, conf_pie); - if (no_data == data.length) { - $('#'+graph_id+' .overlay').remove(); - $('#'+graph_id+' .base').remove(); - $('#'+graph_id).prepend(""); - } - var legends = $('#'+graph_id+' .legendLabel'); - var j = 0; - legends.each(function () { - //$(this).css('width', $(this).width()); - $(this).css('font-size', font_size+'pt'); - $(this).removeClass("legendLabel"); - $(this).addClass(font); - $(this).text(legend[j]); - j++; - }); - - if ($('input[name="custom_graph"]').val()) { - $('.legend>div').css('right',($('.legend>div').height()*-1)); - $('.legend>table').css('right',($('.legend>div').height()*-1)); - } - //$('.legend>table').css('border',"1px solid #E2E2E2"); - $('.legend>table').css('background-color',"transparent"); - - var pielegends = $('#'+graph_id+' .pieLabelBackground'); - pielegends.each(function () { - $(this).css('transform', "rotate(-35deg)").css('color', 'black'); - }); - var labelpielegends = $('#'+graph_id+' .pieLabel'); - labelpielegends.each(function () { - $(this).css('transform', "rotate(-35deg)").css('color', 'black'); - }); - } -*/ } function pandoraFlotHBars( From 56da633588b5e771d60f17b7619beb41f69a4830 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 24 Aug 2019 00:01:09 +0200 Subject: [PATCH 211/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 08d03aa2cb..776a3bb076 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190823 +Version: 7.0NG.738-190824 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index cbc2443767..d0d5b488d0 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190823" +pandora_version="7.0NG.738-190824" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 8a5e85fc86..5412ed7acd 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190823'; +use constant AGENT_BUILD => '190824'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index aa180e4cf5..6c5a208e63 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190823 +%define release 190824 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index bda4a011f6..373671560d 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190823 +%define release 190824 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 719c877d2f..aff292dd9a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190823" +PI_BUILD="190824" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 6e5c577420..0e90b1f5f1 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190823} +{190824} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 99983bb093..8516961761 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190823)") +#define PANDORA_VERSION ("7.0NG.738(Build 190824)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a5a963b891..5da94b6d85 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190823))" + VALUE "ProductVersion", "(7.0NG.738(Build 190824))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 826c706135..4fb2edec09 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190823 +Version: 7.0NG.738-190824 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 458846bb1e..ea6b0383a1 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190823" +pandora_version="7.0NG.738-190824" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 5051d92052..47056d919a 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190823'; +$build_version = 'PC190824'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d3311baa9f..b06098ad59 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 0030dc084e..259daec722 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190823 +%define release 190824 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 0bce047f69..f6cb0e1bc1 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190823 +%define release 190824 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 0d2323fa89..727db318ae 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190823" +PI_BUILD="190824" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 7e8e659bf6..a6ae2c4575 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190823"; +my $version = "7.0NG.738 PS190824"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f026223ef3..4bee8c7128 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190823"; +my $version = "7.0NG.738 PS190824"; # save program name for logging my $progname = basename($0); From 13204266284e53fa201a51b2606c0fb84c1e05b6 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 25 Aug 2019 00:01:09 +0200 Subject: [PATCH 212/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 776a3bb076..9b2c581c75 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190824 +Version: 7.0NG.738-190825 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index d0d5b488d0..92492f9f56 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190824" +pandora_version="7.0NG.738-190825" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 5412ed7acd..5fcffd9c93 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190824'; +use constant AGENT_BUILD => '190825'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 6c5a208e63..f69a525b5b 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190824 +%define release 190825 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 373671560d..569acec41b 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190824 +%define release 190825 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index aff292dd9a..e7d42db814 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190824" +PI_BUILD="190825" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 0e90b1f5f1..b1ba0858bc 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190824} +{190825} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8516961761..23ce35a9a3 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190824)") +#define PANDORA_VERSION ("7.0NG.738(Build 190825)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5da94b6d85..85f8d086eb 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190824))" + VALUE "ProductVersion", "(7.0NG.738(Build 190825))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4fb2edec09..2997ff62ae 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190824 +Version: 7.0NG.738-190825 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index ea6b0383a1..25086e1477 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190824" +pandora_version="7.0NG.738-190825" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 47056d919a..8eb36d6f21 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190824'; +$build_version = 'PC190825'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b06098ad59..f4f6378c71 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 259daec722..e06d31d125 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190824 +%define release 190825 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f6cb0e1bc1..88b846bb39 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190824 +%define release 190825 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 727db318ae..849266a173 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190824" +PI_BUILD="190825" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a6ae2c4575..0b87298c18 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190824"; +my $version = "7.0NG.738 PS190825"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 4bee8c7128..bd477f9e2a 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190824"; +my $version = "7.0NG.738 PS190825"; # save program name for logging my $progname = basename($0); From a2713517f04e19efcd1394607ff57ac64601696a Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 26 Aug 2019 00:01:08 +0200 Subject: [PATCH 213/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9b2c581c75..21c8eb1618 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190825 +Version: 7.0NG.738-190826 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 92492f9f56..c1b88bde90 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190825" +pandora_version="7.0NG.738-190826" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 5fcffd9c93..ba3aa81ec4 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190825'; +use constant AGENT_BUILD => '190826'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index f69a525b5b..f16618c804 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190825 +%define release 190826 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 569acec41b..d1f5f59e3c 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190825 +%define release 190826 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index e7d42db814..94f7220911 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190825" +PI_BUILD="190826" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b1ba0858bc..3435126db0 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190825} +{190826} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 23ce35a9a3..1d4fe508f1 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190825)") +#define PANDORA_VERSION ("7.0NG.738(Build 190826)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 85f8d086eb..e02c737f1a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190825))" + VALUE "ProductVersion", "(7.0NG.738(Build 190826))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2997ff62ae..65772d5f28 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190825 +Version: 7.0NG.738-190826 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 25086e1477..c76bc76501 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190825" +pandora_version="7.0NG.738-190826" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8eb36d6f21..765bd6ed0b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190825'; +$build_version = 'PC190826'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f4f6378c71..5417e996a2 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e06d31d125..5df863894a 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190825 +%define release 190826 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 88b846bb39..5ba44ba9ee 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190825 +%define release 190826 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 849266a173..770bd65ff4 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190825" +PI_BUILD="190826" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 0b87298c18..5f2fd40773 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190825"; +my $version = "7.0NG.738 PS190826"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index bd477f9e2a..915a3021d9 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190825"; +my $version = "7.0NG.738 PS190826"; # save program name for logging my $progname = basename($0); From ea970f2adcf06a039070a4cc1bcd33ddfb29992a Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Mon, 26 Aug 2019 12:26:43 +0200 Subject: [PATCH 214/262] Escape the double quotes that may have the name of the module - #4503 --- pandora_console/include/ajax/module.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 730c82c2cb..e34d287da5 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1151,7 +1151,12 @@ if (check_login()) { } $server_name = ''; - $data[8] .= "".html_print_image('images/binary.png', true, ['border' => '0', 'alt' => '']).''; + + $modules_get_agentmodule_name = modules_get_agentmodule_name($module['id_agente_modulo']); + // Escape the double quotes that may have the name of the module. + $modules_get_agentmodule_name = str_replace('"', '\"', $modules_get_agentmodule_name); + + $data[8] .= "".html_print_image('images/binary.png', true, ['border' => '0', 'alt' => '']).''; } if ($module['estado'] == 3) { From a88329dbb31ecacead5152a07acb2f4fa8771b11 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Mon, 26 Aug 2019 15:07:13 +0200 Subject: [PATCH 215/262] Changed function to get policy name macro --- pandora_server/lib/PandoraFMS/Core.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 3104345f5e..1d5f9004b5 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -4010,7 +4010,7 @@ sub on_demand_macro($$$$$$) { } elsif ($macro eq '_moduletags_') { return (defined ($module)) ? pandora_get_module_url_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : ''; } elsif ($macro eq '_policy_') { - return (defined ($module)) ? enterprise_hook('get_policy_name', [$dbh, $module->{'id_policy_module'}]) : ''; + return (defined ($module)) ? enterprise_hook('get_policy_name_policy_module_id', [$dbh, $module->{'id_policy_module'}]) : ''; } elsif ($macro eq '_email_tag_') { return (defined ($module)) ? pandora_get_module_email_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : ''; } elsif ($macro eq '_phone_tag_') { From 63da85798e543b59364bea7dbd399408a43c4ad1 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 26 Aug 2019 16:10:06 +0200 Subject: [PATCH 216/262] Change mr --- pandora_console/extras/30.sql | 7 ------- pandora_console/extras/mr/31.sql | 4 ++++ 2 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 pandora_console/extras/30.sql diff --git a/pandora_console/extras/30.sql b/pandora_console/extras/30.sql deleted file mode 100644 index eb6650dc5a..0000000000 --- a/pandora_console/extras/30.sql +++ /dev/null @@ -1,7 +0,0 @@ -START TRANSACTION; - -UPDATE `tlayout_data` SET `height` = 70 , `width` = 70 WHERE `height` = 0 && `width` = 0 && ((`type` IN (0,5)) || -(`type` = 10 && `image` IS NOT NULL && `image` != '' && `image` != 'none') || -(`type` = 11 && `image` IS NOT NULL && `image` != '' && `image` != 'none' && `show_statistics` = 0)); - -COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/mr/31.sql b/pandora_console/extras/mr/31.sql index 3e527bff53..0d6e69bf2a 100644 --- a/pandora_console/extras/mr/31.sql +++ b/pandora_console/extras/mr/31.sql @@ -9,4 +9,8 @@ DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_inventory'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_url'; +UPDATE `tlayout_data` SET `height` = 70 , `width` = 70 WHERE `height` = 0 && `width` = 0 && ((`type` IN (0,5)) || +(`type` = 10 && `image` IS NOT NULL && `image` != '' && `image` != 'none') || +(`type` = 11 && `image` IS NOT NULL && `image` != '' && `image` != 'none' && `show_statistics` = 0)); + COMMIT; \ No newline at end of file From c06ec0477c6cb78a76f24066d34fdb9ed340277e Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 27 Aug 2019 00:01:10 +0200 Subject: [PATCH 217/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 21c8eb1618..683ba31482 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190826 +Version: 7.0NG.738-190827 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index c1b88bde90..19827255c3 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190826" +pandora_version="7.0NG.738-190827" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index ba3aa81ec4..71625bf37b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190826'; +use constant AGENT_BUILD => '190827'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index f16618c804..807c21d73e 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190826 +%define release 190827 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index d1f5f59e3c..2becba21bb 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190826 +%define release 190827 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 94f7220911..0a59fdcd41 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190826" +PI_BUILD="190827" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 3435126db0..360de002b7 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190826} +{190827} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 1d4fe508f1..f4f042de30 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190826)") +#define PANDORA_VERSION ("7.0NG.738(Build 190827)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e02c737f1a..34009e3392 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190826))" + VALUE "ProductVersion", "(7.0NG.738(Build 190827))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 65772d5f28..dd1b74c83b 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190826 +Version: 7.0NG.738-190827 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index c76bc76501..88dc8df1e6 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190826" +pandora_version="7.0NG.738-190827" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 765bd6ed0b..c80721b720 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190826'; +$build_version = 'PC190827'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 5417e996a2..6d1ecf9435 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 5df863894a..8a4fd375f6 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190826 +%define release 190827 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 5ba44ba9ee..1c899363db 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190826 +%define release 190827 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 770bd65ff4..960acb6d57 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190826" +PI_BUILD="190827" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 5f2fd40773..0648acc183 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190826"; +my $version = "7.0NG.738 PS190827"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 915a3021d9..13ecf4bb32 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190826"; +my $version = "7.0NG.738 PS190827"; # save program name for logging my $progname = basename($0); From 23e5c50d1379bcd981aef9be7fbe83c1d0f1eadb Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Tue, 27 Aug 2019 09:34:42 +0200 Subject: [PATCH 218/262] Added new custom fields url formating to custom fields --- pandora_console/include/ajax/custom_fields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/ajax/custom_fields.php b/pandora_console/include/ajax/custom_fields.php index 955185bae5..85066675a1 100644 --- a/pandora_console/include/ajax/custom_fields.php +++ b/pandora_console/include/ajax/custom_fields.php @@ -292,7 +292,7 @@ if (check_login()) { $data[] = [ 'ref' => $referencia, - 'data_custom_field' => $values['name_custom_fields'], + 'data_custom_field' => ui_bbcode_to_html($values['name_custom_fields']), 'server' => $values['server_name'], 'agent' => $agent, 'IP' => $values['direccion'], From d38f1f8aec1fb5b7a3902fd68e95be47416f5a8e Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Tue, 27 Aug 2019 12:21:00 +0200 Subject: [PATCH 219/262] Fixed bug in unit in massive operations - #4166 --- pandora_console/godmode/massive/massive_edit_modules.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index f52707cb2a..013aa83498 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -1930,11 +1930,7 @@ function process_manage_edit($module_name, $agents_select=null, $module_status=' case 'unit_select': if ($value != -1) { - if ($value == 'none') { - $values['unit'] = (string) get_parameter('unit_text'); - } else { - $values['unit'] = $value; - } + $values['unit'] = (string) get_parameter('unit'); } break; From 3901a1abb64f7085ab999561997ad2b941282e31 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 27 Aug 2019 15:46:22 +0200 Subject: [PATCH 220/262] Fixed bug in metaconsole filter events --- pandora_console/include/functions_events.php | 2 +- pandora_console/operation/events/events.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 1c24eef9b3..08a57b80b9 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1220,7 +1220,7 @@ function events_get_all( ON ts.id = te.server_id'; if (!empty($filter['server_id'])) { $server_join = sprintf( - ' LEFT JOIN tmetaconsole_setup ts + ' INNER JOIN tmetaconsole_setup ts ON ts.id = te.server_id AND ts.id= %d', $filter['server_id'] ); diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index e7f927a3b9..78338137f9 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -984,7 +984,7 @@ if (is_metaconsole()) { 'SELECT id, server_name FROM tmetaconsole_setup', 'server_id', $server_id, - 'script', + '', __('All'), '0', true From 662c9ca7f278a3d43a0929b30b4bdadb0e3f1641 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 28 Aug 2019 00:01:10 +0200 Subject: [PATCH 221/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 683ba31482..0e4757fe38 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190827 +Version: 7.0NG.738-190828 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 19827255c3..4f56970838 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190827" +pandora_version="7.0NG.738-190828" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 71625bf37b..cb26ae6b07 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190827'; +use constant AGENT_BUILD => '190828'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 807c21d73e..81699d7d61 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190827 +%define release 190828 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 2becba21bb..0f78c7e651 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190827 +%define release 190828 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 0a59fdcd41..ef9c2ddea9 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190827" +PI_BUILD="190828" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 360de002b7..15ed21f197 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190827} +{190828} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f4f042de30..0b9492d48a 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190827)") +#define PANDORA_VERSION ("7.0NG.738(Build 190828)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 34009e3392..f42c57c600 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190827))" + VALUE "ProductVersion", "(7.0NG.738(Build 190828))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index dd1b74c83b..09c2fe567d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190827 +Version: 7.0NG.738-190828 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 88dc8df1e6..c49abe5ed8 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190827" +pandora_version="7.0NG.738-190828" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index c80721b720..2e8132f6b2 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190827'; +$build_version = 'PC190828'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 6d1ecf9435..b705558cf2 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 8a4fd375f6..1e6ec2e5d2 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190827 +%define release 190828 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1c899363db..f2d06c2160 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190827 +%define release 190828 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 960acb6d57..aad0c87643 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190827" +PI_BUILD="190828" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 0648acc183..9350df0529 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190827"; +my $version = "7.0NG.738 PS190828"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 13ecf4bb32..3a9263a7f9 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190827"; +my $version = "7.0NG.738 PS190828"; # save program name for logging my $progname = basename($0); From 94d797b4b7eee35a81419fb5d7d77a89c7af1e73 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 28 Aug 2019 11:33:02 +0200 Subject: [PATCH 222/262] Fixed session garbage collector --- pandora_console/include/load_session.php | 26 +++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/load_session.php b/pandora_console/include/load_session.php index 8b243d808a..80fb8643ef 100644 --- a/pandora_console/include/load_session.php +++ b/pandora_console/include/load_session.php @@ -159,7 +159,26 @@ function pandora_session_gc($max_lifetime=300) global $config; if (isset($config['session_timeout'])) { - $max_lifetime = $config['session_timeout']; + $session_timeout = $config['session_timeout']; + } else { + // if $config doesn`t work ... + $session_timeout = db_get_value( + 'value', + 'tconfig', + 'token', + 'session_timeout' + ); + } + + if (!empty($session_timeout)) { + if ($session_timeout == -1) { + // The session expires in 10 years + $session_timeout = 315576000; + } else { + $session_timeout *= 60; + } + + $max_lifetime = $session_timeout; } $time_limit = (time() - $max_lifetime); @@ -171,6 +190,11 @@ function pandora_session_gc($max_lifetime=300) ] ); + // Deleting cron and empty sessions. + $sql = "DELETE FROM tsessions_php WHERE + data IS NULL OR id_session REGEXP '^cron-'"; + db_process_sql($sql); + return $retval; } From 5ad22620b91ed155395b5bd060bcf43c8eb53ce4 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 28 Aug 2019 12:49:41 +0200 Subject: [PATCH 223/262] mr power up --- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +- pandora_console/pandoradb_data.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 964441c6c1..704ab61d74 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1243,7 +1243,7 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned; INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); -INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 30); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 31); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'); diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index e36a1a6fbf..a02f88fe5f 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -109,7 +109,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 30), +('MR', 31), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), ('current_package_enterprise', '738'), From 74c9e604e8a68bf55565c724d8caa27142f9b1de Mon Sep 17 00:00:00 2001 From: Daniel Rodriguez Date: Wed, 28 Aug 2019 14:19:59 +0200 Subject: [PATCH 224/262] Revert "Merge branch 'ent-4489-revision-comportamiento-pandora_server-e7' into 'develop'" This reverts merge request !2644 --- pandora_server/lib/PandoraFMS/DataServer.pm | 24 +-------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index b7beb919a3..b0c7e2dcc8 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -58,7 +58,6 @@ my %Agents :shared; my $Sem :shared; my $TaskSem :shared; my $AgentSem :shared; -my $XMLinSem :shared; ######################################################################################## # Data Server class constructor. @@ -75,7 +74,6 @@ sub new ($$;$) { $Sem = Thread::Semaphore->new; $TaskSem = Thread::Semaphore->new (0); $AgentSem = Thread::Semaphore->new (1); - $XMLinSem = Thread::Semaphore->new (1); # Call the constructor of the parent class my $self = $class->SUPER::new($config, DATASERVER, \&PandoraFMS::DataServer::data_producer, \&PandoraFMS::DataServer::data_consumer, $dbh); @@ -177,7 +175,6 @@ sub data_consumer ($$) { my $agent_name = $1; my $file_name = $pa_config->{'incomingdir'}; my $xml_err; - my $error; # Fix path $file_name .= "/" unless (substr ($file_name, -1, 1) eq '/'); @@ -194,37 +191,18 @@ sub data_consumer ($$) { for (0..1) { eval { - local $SIG{__DIE__}; threads->yield; - # XML::SAX::ExpatXS is not thread safe. - if ($XML::Simple::PREFERRED_PARSER eq 'XML::SAX::ExpatXS') { - $XMLinSem->down(); - } $xml_data = XMLin ($file_name, forcearray => 'module'); - - if ($XML::Simple::PREFERRED_PARSER eq 'XML::SAX::ExpatXS') { - $XMLinSem->up(); - } }; # Invalid XML - if ($@) { - $error = 1; - if ($XML::Simple::PREFERRED_PARSER eq 'XML::SAX::ExpatXS') { - $XMLinSem->up(); - } - } - - if ($error || ref($xml_data) ne 'HASH') { - + if ($@ || ref($xml_data) ne 'HASH') { if ($@) { $xml_err = $@; } else { $xml_err = "Invalid XML format."; } - - logger($pa_config, "Failed to parse $file_name $xml_err", 3); sleep (2); next; } From 1c4b639deb6c929b1f9177035faf805b84e59768 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 29 Aug 2019 00:01:08 +0200 Subject: [PATCH 225/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 0e4757fe38..5b3b30e06f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190828 +Version: 7.0NG.738-190829 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 4f56970838..c78e59f1d6 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190828" +pandora_version="7.0NG.738-190829" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index cb26ae6b07..9d252b2c9f 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190828'; +use constant AGENT_BUILD => '190829'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 81699d7d61..7730ef6bde 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190828 +%define release 190829 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 0f78c7e651..66bbb55b42 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190828 +%define release 190829 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index ef9c2ddea9..4f85274479 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190828" +PI_BUILD="190829" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 15ed21f197..d9c2b0ef8a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190828} +{190829} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0b9492d48a..09f0753eb2 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190828)") +#define PANDORA_VERSION ("7.0NG.738(Build 190829)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f42c57c600..7c8060bb2b 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190828))" + VALUE "ProductVersion", "(7.0NG.738(Build 190829))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 09c2fe567d..bec4289da4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190828 +Version: 7.0NG.738-190829 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index c49abe5ed8..76d0c3a7cd 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190828" +pandora_version="7.0NG.738-190829" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 2e8132f6b2..3db5099614 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190828'; +$build_version = 'PC190829'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b705558cf2..6538a0c447 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 1e6ec2e5d2..963339815e 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190828 +%define release 190829 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f2d06c2160..31b728e82f 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190828 +%define release 190829 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index aad0c87643..a969228bdf 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190828" +PI_BUILD="190829" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 9350df0529..88c9785b0e 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190828"; +my $version = "7.0NG.738 PS190829"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 3a9263a7f9..48c60bf9d3 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190828"; +my $version = "7.0NG.738 PS190829"; # save program name for logging my $progname = basename($0); From 94195cf70afa677d090e7267cc68b987252df2a6 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Thu, 29 Aug 2019 11:27:40 +0200 Subject: [PATCH 226/262] Change permissions to save custom graph in agent view - #4575 --- pandora_console/operation/agentes/graphs.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pandora_console/operation/agentes/graphs.php b/pandora_console/operation/agentes/graphs.php index 79ff02b021..308481d8e0 100644 --- a/pandora_console/operation/agentes/graphs.php +++ b/pandora_console/operation/agentes/graphs.php @@ -244,14 +244,18 @@ $htmlForm = ''; -$htmlForm .= html_print_button( - __('Save as custom graph'), - 'save_custom_graph', - false, - '', - 'class="sub add" style=""', - true -).'  '.html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub upd" style=""', true); +if (check_acl($config['id_user'], 0, 'RW') || check_acl($config['id_user'], 0, 'RM')) { + $htmlForm .= html_print_button( + __('Save as custom graph'), + 'save_custom_graph', + false, + '', + 'class="sub add" style=""', + true + ); +} + +$htmlForm .= '  '.html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub upd" style=""', true); $htmlForm .= '
    '; $htmlForm .= ''; From b6870178c948b0cf1b3190ae7fd7ebf6fccc540c Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 29 Aug 2019 15:21:39 +0200 Subject: [PATCH 227/262] Fixed minor error --- pandora_console/operation/snmpconsole/snmp_view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index 66b0893c6a..677a7a625a 100755 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -756,7 +756,7 @@ $urlPagination = $url_snmp.'&pagination='.$pagination.'&offset='.$offset; ui_pagination($trapcount, $urlPagination, $offset, $pagination); -echo '
    '; +echo ''; $table->cellpadding = 0; $table->cellspacing = 0; From 79298d0b8e6c2721cc55fa656c937ca65ac1e5df Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 30 Aug 2019 00:01:09 +0200 Subject: [PATCH 228/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 5b3b30e06f..b79f3e944a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190829 +Version: 7.0NG.738-190830 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index c78e59f1d6..fbe19cc298 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190829" +pandora_version="7.0NG.738-190830" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 9d252b2c9f..5d4207fdf2 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190829'; +use constant AGENT_BUILD => '190830'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 7730ef6bde..b164474459 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190829 +%define release 190830 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 66bbb55b42..d798554060 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190829 +%define release 190830 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 4f85274479..14d0775c80 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190829" +PI_BUILD="190830" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index d9c2b0ef8a..afdf35a32a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190829} +{190830} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 09f0753eb2..41ed2c8828 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190829)") +#define PANDORA_VERSION ("7.0NG.738(Build 190830)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7c8060bb2b..2ecb943b9e 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190829))" + VALUE "ProductVersion", "(7.0NG.738(Build 190830))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index bec4289da4..e4d75df4f1 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190829 +Version: 7.0NG.738-190830 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 76d0c3a7cd..dba3751524 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190829" +pandora_version="7.0NG.738-190830" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 3db5099614..49531695be 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190829'; +$build_version = 'PC190830'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 6538a0c447..ee9c3e7edc 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 963339815e..beccfdfa4f 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190829 +%define release 190830 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 31b728e82f..da5097894e 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190829 +%define release 190830 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index a969228bdf..40517928e8 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190829" +PI_BUILD="190830" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 88c9785b0e..d16a65bc91 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190829"; +my $version = "7.0NG.738 PS190830"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 48c60bf9d3..97124d7f6d 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190829"; +my $version = "7.0NG.738 PS190830"; # save program name for logging my $progname = basename($0); From 25354f6f3bed7f6e4c73e8c3429699874d72d7ab Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 30 Aug 2019 08:47:49 +0200 Subject: [PATCH 229/262] delete session open by api calls --- pandora_console/include/load_session.php | 5 +++++ pandora_server/util/pandora_db.pl | 21 +++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/load_session.php b/pandora_console/include/load_session.php index 80fb8643ef..39e0973287 100644 --- a/pandora_console/include/load_session.php +++ b/pandora_console/include/load_session.php @@ -91,6 +91,11 @@ function pandora_session_write($session_id, $data) { $session_id = addslashes($session_id); + // If it's an api call, the session must not be created. + if (get_parameter('op', false) && get_parameter('op2', false)) { + return true; + } + if (is_ajax()) { // Avoid session upadte while processing ajax responses - notifications. if (get_parameter('check_new_notifications', false)) { diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index d16a65bc91..0c717e9abb 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -136,7 +136,7 @@ sub pandora_purgedb ($$) { pandora_delete_old_export_data ($dbh, $ulimit_timestamp); # Delete sessions data - pandora_delete_old_session_data ($dbh, $ulimit_timestamp); + pandora_delete_old_session_data (\%conf, $dbh, $ulimit_timestamp); # Delete old inventory data @@ -678,6 +678,7 @@ sub pandora_load_config_pdb ($) { $conf->{'_netflow_nfexpire'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_nfexpire'"); $conf->{'_netflow_path'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_path'"); $conf->{'_delete_notinit'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_notinit'"); + $conf->{'_session_timeout'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'session_timeout'"); $conf->{'_big_operation_step_datos_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'big_operation_step_datos_purge'"); $conf->{'_small_operation_step_datos_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'small_operation_step_datos_purge'"); @@ -990,12 +991,28 @@ sub pandora_delete_old_export_data { # Delete old session data. ############################################################################## sub pandora_delete_old_session_data { - my ($dbh, $ulimit_timestamp) = @_; + my ($conf, $dbh, $ulimit_timestamp) = @_; + + my $session_timeout = $conf->{'_session_timeout'}; + + if ($session_timeout ne '') { + if ($session_timeout == -1) { + # The session expires in 10 years + $session_timeout = 315576000; + } else { + $session_timeout *= 60; + } + + $ulimit_timestamp = time() - $session_timeout; + } log_message ('PURGE', "Deleting old session data from tsessions_php\n"); while(db_delete_limit ($dbh, 'tsessions_php', 'last_active < ?', $SMALL_OPERATION_STEP, $ulimit_timestamp) ne '0E0') { usleep (10000); }; + + db_do ($dbh, "DELETE FROM tsessions_php WHERE + data IS NULL OR id_session REGEXP '^cron-'"); } ############################################################################### From f423ddc42f247df902d70aaed2374abfae3f3079 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Fri, 30 Aug 2019 09:42:58 +0200 Subject: [PATCH 230/262] modified function to export audit csv to decode entities as separator --- pandora_console/include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 461f1d27bc..fa42a8610c 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -2852,7 +2852,7 @@ function print_audit_csv($data) global $config; global $graphic_type; - $divider = $config['csv_divider']; + $divider = html_entity_decode($config['csv_divider']); if (!$data) { echo __('No data found to export'); From de472757354f557a000f5fbaf5a78a796346c486 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 30 Aug 2019 10:34:52 +0200 Subject: [PATCH 231/262] Fixed mr --- pandora_console/extras/mr/31.sql | 4 ---- pandora_console/extras/mr/32.sql | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 pandora_console/extras/mr/32.sql diff --git a/pandora_console/extras/mr/31.sql b/pandora_console/extras/mr/31.sql index 0d6e69bf2a..3e527bff53 100644 --- a/pandora_console/extras/mr/31.sql +++ b/pandora_console/extras/mr/31.sql @@ -9,8 +9,4 @@ DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_inventory'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_url'; -UPDATE `tlayout_data` SET `height` = 70 , `width` = 70 WHERE `height` = 0 && `width` = 0 && ((`type` IN (0,5)) || -(`type` = 10 && `image` IS NOT NULL && `image` != '' && `image` != 'none') || -(`type` = 11 && `image` IS NOT NULL && `image` != '' && `image` != 'none' && `show_statistics` = 0)); - COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/mr/32.sql b/pandora_console/extras/mr/32.sql new file mode 100644 index 0000000000..3100d73092 --- /dev/null +++ b/pandora_console/extras/mr/32.sql @@ -0,0 +1,7 @@ +START TRANSACTION; + +UPDATE `tlayout_data` SET `height` = 70 , `width` = 70 WHERE `height` = 0 && `width` = 0 && image NOT LIKE '%dot%' && ((`type` IN (0,5)) || +(`type` = 10 && `image` IS NOT NULL && `image` != '' && `image` != 'none') || +(`type` = 11 && `image` IS NOT NULL && `image` != '' && `image` != 'none' && `show_statistics` = 0)); + +COMMIT; \ No newline at end of file From d650ff6959ce4e255fa559c80b55900c3509a41a Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Fri, 30 Aug 2019 11:28:24 +0200 Subject: [PATCH 232/262] fixed error --- pandora_console/general/login_page.php | 9 +- .../godmode/users/configure_user.php | 88 ++++++++----------- 2 files changed, 45 insertions(+), 52 deletions(-) diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index d8ac4cb91e..5aecfcc92c 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -389,9 +389,12 @@ if (isset($login_failed)) { echo '

    '.__('ERROR').'

    '; echo '

    '.$config['auth_error'].'

    '; echo '
    '; - echo '
    '; - echo '

    Remaining attempts: '.$attemps.'

    '; - echo '
    '; + if ($config['enable_pass_policy']) { + echo '
    '; + echo '

    Remaining attempts: '.$attemps.'

    '; + echo '
    '; + } + echo '
    '; html_print_submit_button('Ok', 'hide-login-error', false); echo '
    '; diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index cfdb851d14..07e9942880 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -258,33 +258,49 @@ if ($create_user) { } else { $have_number = false; $have_simbols = false; - - if ($config['pass_needs_numbers']) { - $nums = preg_match('/([[:alpha:]])*(\d)+(\w)*/', $password_confirm); - if ($nums == 0) { - ui_print_error_message(__('Password must contain numbers')); - $user_info = $values; - $password_new = ''; - $password_confirm = ''; - $new_user = true; - } else { - $have_number = true; + if ($config['enable_pass_policy']) { + if ($config['pass_needs_numbers']) { + $nums = preg_match('/([[:alpha:]])*(\d)+(\w)*/', $password_confirm); + if ($nums == 0) { + ui_print_error_message(__('Password must contain numbers')); + $user_info = $values; + $password_new = ''; + $password_confirm = ''; + $new_user = true; + } else { + $have_number = true; + } } - } - if ($config['pass_needs_symbols']) { - $symbols = preg_match('/(\w)*(\W)+(\w)*/', $password_confirm); - if ($symbols == 0) { - ui_print_error_message(__('Password must contain symbols')); - $user_info = $values; - $password_new = ''; - $password_confirm = ''; - $new_user = true; - } else { - $have_simbols = true; + if ($config['pass_needs_symbols']) { + $symbols = preg_match('/(\w)*(\W)+(\w)*/', $password_confirm); + if ($symbols == 0) { + ui_print_error_message(__('Password must contain symbols')); + $user_info = $values; + $password_new = ''; + $password_confirm = ''; + $new_user = true; + } else { + $have_simbols = true; + } } - } + if ($config['pass_needs_symbols'] && $config['pass_needs_numbers']) { + if ($have_number && $have_simbols) { + $result = create_user($id, $password_new, $values); + } + } else if ($config['pass_needs_symbols'] && !$config['pass_needs_numbers']) { + if ($have_simbols) { + $result = create_user($id, $password_new, $values); + } + } else if (!$config['pass_needs_symbols'] && $config['pass_needs_numbers']) { + if ($have_number) { + $result = create_user($id, $password_new, $values); + } + } + } else { + $result = create_user($id, $password_new, $values); + } $info = '{"Id_user":"'.$values['id_user'].'","FullName":"'.$values['fullname'].'","Firstname":"'.$values['firstname'].'","Lastname":"'.$values['lastname'].'","Email":"'.$values['email'].'","Phone":"'.$values['phone'].'","Comments":"'.$values['comments'].'","Is_admin":"'.$values['is_admin'].'","Language":"'.$values['language'].'","Timezone":"'.$values['timezone'].'","Block size":"'.$values['block_size'].'"'; @@ -296,33 +312,7 @@ if ($create_user) { $can_create = false; - if ($config['pass_needs_symbols']) { - if ($have_simbols) { - $symbols = true; - } - } - if ($config['pass_needs_numbers']) { - if ($have_number) { - $nums = true; - } - } - - if ($config['pass_needs_symbols'] && $config['pass_needs_numbers']) { - if ($nums && $symbols) { - $result = create_user($id, $password_new, $values); - } - } else if ($config['pass_needs_symbols'] && !$config['pass_needs_numbers']) { - if ($symbols) { - $result = create_user($id, $password_new, $values); - } - } else if (!$config['pass_needs_symbols'] && $config['pass_needs_numbers']) { - if ($nums) { - $result = create_user($id, $password_new, $values); - } - } else { - $result = create_user($id, $password_new, $values); - } if ($result) { $res = save_pass_history($id, $password_new); From 72ba228b68906c40e8032e606fa61a1afc6d708f Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Fri, 30 Aug 2019 12:48:03 +0200 Subject: [PATCH 233/262] Fixed policy macro on mail --- pandora_server/lib/PandoraFMS/Core.pm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 1d5f9004b5..e1556d74b6 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1205,13 +1205,13 @@ sub pandora_execute_action ($$$$$$$$$;$) { # Address - $field1 = subst_alert_macros ($field1, \%macros, $pa_config, $dbh, $agent, $module); + $field1 = subst_alert_macros ($field1, \%macros, $pa_config, $dbh, $agent, $module, $alert); # Subject - $field2 = subst_alert_macros ($field2, \%macros, $pa_config, $dbh, $agent, $module); + $field2 = subst_alert_macros ($field2, \%macros, $pa_config, $dbh, $agent, $module, $alert); # Message - $field3 = subst_alert_macros ($field3, \%macros, $pa_config, $dbh, $agent, $module); + $field3 = subst_alert_macros ($field3, \%macros, $pa_config, $dbh, $agent, $module, $alert); # Content - $field4 = subst_alert_macros ($field4, \%macros, $pa_config, $dbh, $agent, $module); + $field4 = subst_alert_macros ($field4, \%macros, $pa_config, $dbh, $agent, $module, $alert); if($field4 eq ""){ $field4 = "text/html"; @@ -3943,8 +3943,8 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$$) { ########################################################################## # Search string for macros and substitutes them with their values. ########################################################################## -sub subst_alert_macros ($$;$$$$) { - my ($string, $macros, $pa_config, $dbh, $agent, $module) = @_; +sub subst_alert_macros ($$;$$$$$) { + my ($string, $macros, $pa_config, $dbh, $agent, $module, $alert) = @_; my $macro_regexp = join('|', keys %{$macros}); @@ -3952,14 +3952,14 @@ sub subst_alert_macros ($$;$$$$) { if (defined($string) && $string =~ m/^(?:(")(?:.*)"|(')(?:.*)')$/) { my $quote = $1 ? $1 : $2; $subst_func = sub { - my $macro = on_demand_macro($pa_config, $dbh, shift, $macros, $agent, $module); + my $macro = on_demand_macro($pa_config, $dbh, shift, $macros, $agent, $module,$alert); $macro =~ s/'/'\\''/g; # close, escape, open return decode_entities($quote . "'" . $macro . "'" . $quote); # close, quote, open }; } else { $subst_func = sub { - my $macro = on_demand_macro($pa_config, $dbh, shift, $macros, $agent, $module); + my $macro = on_demand_macro($pa_config, $dbh, shift, $macros, $agent, $module, $alert); return decode_entities($macro); }; } @@ -3993,8 +3993,8 @@ sub subst_column_macros ($$;$$$$) { ########################################################################## # Load macros that access the database on demand. ########################################################################## -sub on_demand_macro($$$$$$) { - my ($pa_config, $dbh, $macro, $macros, $agent, $module) = @_; +sub on_demand_macro($$$$$$;$) { + my ($pa_config, $dbh, $macro, $macros, $agent, $module,$alert) = @_; # Static macro. return $macros->{$macro} if (defined($macros->{$macro})); @@ -4010,7 +4010,7 @@ sub on_demand_macro($$$$$$) { } elsif ($macro eq '_moduletags_') { return (defined ($module)) ? pandora_get_module_url_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : ''; } elsif ($macro eq '_policy_') { - return (defined ($module)) ? enterprise_hook('get_policy_name_policy_module_id', [$dbh, $module->{'id_policy_module'}]) : ''; + return (defined ($alert)) ? enterprise_hook('get_policy_name_policy_alerts_id', [$dbh, $alert->{'id_policy_alerts'}]) : ''; } elsif ($macro eq '_email_tag_') { return (defined ($module)) ? pandora_get_module_email_tags ($pa_config, $dbh, $module->{'id_agente_modulo'}) : ''; } elsif ($macro eq '_phone_tag_') { From fe7ec38cef0a0a08cae9f18111d32ce10e75362a Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 31 Aug 2019 00:01:12 +0200 Subject: [PATCH 234/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b79f3e944a..2c1d796dd4 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190830 +Version: 7.0NG.738-190831 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index fbe19cc298..1f1f209c4e 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190830" +pandora_version="7.0NG.738-190831" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 5d4207fdf2..5055c13dab 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190830'; +use constant AGENT_BUILD => '190831'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index b164474459..05f4b300b1 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190830 +%define release 190831 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index d798554060..b7b1ddef2c 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190830 +%define release 190831 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 14d0775c80..5047b41664 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190830" +PI_BUILD="190831" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index afdf35a32a..2ac8dbbf9a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190830} +{190831} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 41ed2c8828..449537538f 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190830)") +#define PANDORA_VERSION ("7.0NG.738(Build 190831)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2ecb943b9e..a4a14a8a55 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190830))" + VALUE "ProductVersion", "(7.0NG.738(Build 190831))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e4d75df4f1..85863e45d1 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190830 +Version: 7.0NG.738-190831 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index dba3751524..e0602d89ae 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190830" +pandora_version="7.0NG.738-190831" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 49531695be..43f10b7c22 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190830'; +$build_version = 'PC190831'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ee9c3e7edc..4d3045ef8e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index beccfdfa4f..2efb4a48cd 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190830 +%define release 190831 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index da5097894e..e8b185c2c1 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190830 +%define release 190831 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 40517928e8..db88e87259 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190830" +PI_BUILD="190831" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index d16a65bc91..50b8d2521e 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190830"; +my $version = "7.0NG.738 PS190831"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 97124d7f6d..2bd2a712d1 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190830"; +my $version = "7.0NG.738 PS190831"; # save program name for logging my $progname = basename($0); From aea8a6b3c7b96f94af3346efd0e84bafae10d99b Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 1 Sep 2019 00:01:07 +0200 Subject: [PATCH 235/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 2c1d796dd4..9414208896 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190831 +Version: 7.0NG.738-190901 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 1f1f209c4e..ba7528a43a 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190831" +pandora_version="7.0NG.738-190901" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 5055c13dab..ffa9a513aa 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190831'; +use constant AGENT_BUILD => '190901'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 05f4b300b1..facf49b31f 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190831 +%define release 190901 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index b7b1ddef2c..9e38bfc851 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190831 +%define release 190901 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 5047b41664..85781899c2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190831" +PI_BUILD="190901" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2ac8dbbf9a..b29fb6a7fb 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190831} +{190901} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 449537538f..2806cb774b 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190831)") +#define PANDORA_VERSION ("7.0NG.738(Build 190901)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a4a14a8a55..c9ba77728b 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190831))" + VALUE "ProductVersion", "(7.0NG.738(Build 190901))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 85863e45d1..70c3c9ad79 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190831 +Version: 7.0NG.738-190901 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index e0602d89ae..74956e8577 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190831" +pandora_version="7.0NG.738-190901" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 43f10b7c22..9afa5a7863 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190831'; +$build_version = 'PC190901'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 4d3045ef8e..d327653dfd 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 2efb4a48cd..10fd62bb25 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190831 +%define release 190901 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index e8b185c2c1..6344fa524e 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190831 +%define release 190901 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index db88e87259..4b8720f359 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190831" +PI_BUILD="190901" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 50b8d2521e..2a0966de6a 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190831"; +my $version = "7.0NG.738 PS190901"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 2bd2a712d1..f57503daaf 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190831"; +my $version = "7.0NG.738 PS190901"; # save program name for logging my $progname = basename($0); From d6b91e9fce05e9f203c357031aae235ad9f89663 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 2 Sep 2019 00:01:15 +0200 Subject: [PATCH 236/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9414208896..094d9b8eff 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190901 +Version: 7.0NG.738-190902 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index ba7528a43a..16f0f6e6eb 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190901" +pandora_version="7.0NG.738-190902" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index ffa9a513aa..850a9c6357 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190901'; +use constant AGENT_BUILD => '190902'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index facf49b31f..80ca8cbaf8 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190901 +%define release 190902 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 9e38bfc851..8ec45e3e80 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190901 +%define release 190902 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 85781899c2..941a5ea669 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190901" +PI_BUILD="190902" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b29fb6a7fb..dcd6413ca7 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190901} +{190902} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 2806cb774b..dcdcc68c2f 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190901)") +#define PANDORA_VERSION ("7.0NG.738(Build 190902)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c9ba77728b..86b6778726 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190901))" + VALUE "ProductVersion", "(7.0NG.738(Build 190902))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 70c3c9ad79..6d69c9ad7d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190901 +Version: 7.0NG.738-190902 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 74956e8577..ee480a6ff8 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190901" +pandora_version="7.0NG.738-190902" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9afa5a7863..00a29e68ca 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190901'; +$build_version = 'PC190902'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d327653dfd..fa25bab863 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 10fd62bb25..33187bc9d7 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190901 +%define release 190902 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 6344fa524e..5019c4fa5a 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190901 +%define release 190902 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 4b8720f359..dfede2093b 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190901" +PI_BUILD="190902" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 2a0966de6a..7cc4393741 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190901"; +my $version = "7.0NG.738 PS190902"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f57503daaf..c3695dcba0 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190901"; +my $version = "7.0NG.738 PS190902"; # save program name for logging my $progname = basename($0); From 6c51c4e1e9c29612160af18c79bd0ac047750478 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 2 Sep 2019 11:18:04 +0200 Subject: [PATCH 237/262] Fixed date limit in historical_data --- pandora_console/include/functions_reporting.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index f2ea630617..4abf5152c1 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3100,7 +3100,7 @@ function reporting_historical_data($report, $content) $return['type'] = 'historical_data'; $period = $content['period']; - $date_limit = (time() - $period); + $date_limit = ($report['datetime'] - $period); if (empty($content['name'])) { $content['name'] = __('Historical data'); } @@ -3169,7 +3169,7 @@ function reporting_historical_data($report, $content) FROM tagente_datos_string WHERE id_agente_modulo ='.$content['id_agent_module'].' AND utimestamp >'.$date_limit.' - AND utimestamp <='.time(), + AND utimestamp <='.$report['datetime'], true ); break; @@ -3180,7 +3180,7 @@ function reporting_historical_data($report, $content) FROM tagente_datos WHERE id_agente_modulo ='.$content['id_agent_module'].' AND utimestamp >'.$date_limit.' - AND utimestamp <='.time(), + AND utimestamp <='.$report['datetime'], true ); break; From 0abb2ae98768d6f7fd82ba3adc16249d38c0a72a Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 2 Sep 2019 15:24:21 +0200 Subject: [PATCH 238/262] Revert "Revert "Merge branch 'ent-4489-revision-comportamiento-pandora_server-e7' into 'develop'"" This reverts commit 74c9e604e8a68bf55565c724d8caa27142f9b1de. --- pandora_server/lib/PandoraFMS/DataServer.pm | 24 ++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index b0c7e2dcc8..b7beb919a3 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -58,6 +58,7 @@ my %Agents :shared; my $Sem :shared; my $TaskSem :shared; my $AgentSem :shared; +my $XMLinSem :shared; ######################################################################################## # Data Server class constructor. @@ -74,6 +75,7 @@ sub new ($$;$) { $Sem = Thread::Semaphore->new; $TaskSem = Thread::Semaphore->new (0); $AgentSem = Thread::Semaphore->new (1); + $XMLinSem = Thread::Semaphore->new (1); # Call the constructor of the parent class my $self = $class->SUPER::new($config, DATASERVER, \&PandoraFMS::DataServer::data_producer, \&PandoraFMS::DataServer::data_consumer, $dbh); @@ -175,6 +177,7 @@ sub data_consumer ($$) { my $agent_name = $1; my $file_name = $pa_config->{'incomingdir'}; my $xml_err; + my $error; # Fix path $file_name .= "/" unless (substr ($file_name, -1, 1) eq '/'); @@ -191,18 +194,37 @@ sub data_consumer ($$) { for (0..1) { eval { + local $SIG{__DIE__}; threads->yield; + # XML::SAX::ExpatXS is not thread safe. + if ($XML::Simple::PREFERRED_PARSER eq 'XML::SAX::ExpatXS') { + $XMLinSem->down(); + } $xml_data = XMLin ($file_name, forcearray => 'module'); + + if ($XML::Simple::PREFERRED_PARSER eq 'XML::SAX::ExpatXS') { + $XMLinSem->up(); + } }; # Invalid XML - if ($@ || ref($xml_data) ne 'HASH') { + if ($@) { + $error = 1; + if ($XML::Simple::PREFERRED_PARSER eq 'XML::SAX::ExpatXS') { + $XMLinSem->up(); + } + } + + if ($error || ref($xml_data) ne 'HASH') { + if ($@) { $xml_err = $@; } else { $xml_err = "Invalid XML format."; } + + logger($pa_config, "Failed to parse $file_name $xml_err", 3); sleep (2); next; } From fa39119264557e31a2351bf4c99f3431ace07d3a Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 3 Sep 2019 00:01:12 +0200 Subject: [PATCH 239/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 094d9b8eff..a2cc585f8a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190902 +Version: 7.0NG.738-190903 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 16f0f6e6eb..607f6a6bb1 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190902" +pandora_version="7.0NG.738-190903" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 850a9c6357..5e533dd017 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190902'; +use constant AGENT_BUILD => '190903'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 80ca8cbaf8..4b78005367 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190902 +%define release 190903 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 8ec45e3e80..33cef8dd77 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190902 +%define release 190903 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 941a5ea669..6961d3f870 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190902" +PI_BUILD="190903" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index dcd6413ca7..f138c3c363 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190902} +{190903} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index dcdcc68c2f..c33cc9cb8c 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190902)") +#define PANDORA_VERSION ("7.0NG.738(Build 190903)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 86b6778726..9b16e6891c 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190902))" + VALUE "ProductVersion", "(7.0NG.738(Build 190903))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 6d69c9ad7d..411ee40653 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190902 +Version: 7.0NG.738-190903 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index ee480a6ff8..7ed33edb97 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190902" +pandora_version="7.0NG.738-190903" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 00a29e68ca..9ac7c09f7c 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190902'; +$build_version = 'PC190903'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index fa25bab863..b3ec9db6c5 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 33187bc9d7..08ee4c6257 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190902 +%define release 190903 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 5019c4fa5a..aa846d1222 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190902 +%define release 190903 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index dfede2093b..a3d7ef0182 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190902" +PI_BUILD="190903" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 7cc4393741..4eb80c80e5 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190902"; +my $version = "7.0NG.738 PS190903"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index c3695dcba0..9bafa9bc20 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190902"; +my $version = "7.0NG.738 PS190903"; # save program name for logging my $progname = basename($0); From b60b41878cea35739a08203a06595ed33f9c669e Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 3 Sep 2019 11:14:33 +0200 Subject: [PATCH 240/262] Changed name for alias when identify an agent in SNMP statistics --- pandora_console/operation/snmpconsole/snmp_statistics.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/snmpconsole/snmp_statistics.php b/pandora_console/operation/snmpconsole/snmp_statistics.php index afe05be977..076ca806d7 100755 --- a/pandora_console/operation/snmpconsole/snmp_statistics.php +++ b/pandora_console/operation/snmpconsole/snmp_statistics.php @@ -155,7 +155,7 @@ foreach ($traps_generated_by_source as $trap) { $row['source'] = ''.$trap['source'].''; } else { $agent_id = $agent['id_agente']; - $agent_name = ui_print_truncate_text($agent['nombre'], 'agent_medium', true, true, true, '[…]', ''); + $agent_name = ui_print_truncate_text($agent['alias'], 'agent_medium', true, true, true, '[…]', ''); $row['source'] = "'; $row['source'] .= "$agent_name"; } From b8a3d46f3847bff56f0d7813bed655ee19156d5c Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Tue, 3 Sep 2019 12:56:51 +0200 Subject: [PATCH 241/262] Add module_application to module_logchannel. Ref. pandora_enterprise#3659 --- .../win32/modules/pandora_module_factory.cc | 3 ++- .../win32/modules/pandora_module_logchannel.cc | 11 +++++++++-- .../win32/modules/pandora_module_logchannel.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pandora_agents/win32/modules/pandora_module_factory.cc b/pandora_agents/win32/modules/pandora_module_factory.cc index a4d9553c20..4c84910ac5 100644 --- a/pandora_agents/win32/modules/pandora_module_factory.cc +++ b/pandora_agents/win32/modules/pandora_module_factory.cc @@ -1214,7 +1214,8 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) { module_source, module_eventtype, module_eventcode, - module_pattern); + module_pattern, + module_application); } else if (module_wmiquery != "") { module = new Pandora_Module_WMIQuery (module_name, module_wmiquery, module_wmicolumn); diff --git a/pandora_agents/win32/modules/pandora_module_logchannel.cc b/pandora_agents/win32/modules/pandora_module_logchannel.cc index 4ec72df63c..3c1c4666dd 100755 --- a/pandora_agents/win32/modules/pandora_module_logchannel.cc +++ b/pandora_agents/win32/modules/pandora_module_logchannel.cc @@ -53,7 +53,7 @@ static EvtUpdateBookmarkT EvtUpdateBookmarkF = NULL; * @param name Module name. * @param service_name Service internal name to check. */ -Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern) +Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern, string application) : Pandora_Module (name) { int i; vector query; @@ -93,6 +93,13 @@ Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source query.push_back(ss.str()); } + // Set the application + if (application != "") { + wstringstream ss; + ss << L"*[System/Provider[@Name='" << application.c_str() << L"']]"; + query.push_back(ss.str()); + } + // Fill the filter if (query.size() == 0) { this->filter = L"*"; @@ -579,4 +586,4 @@ Pandora_Module_Logchannel::GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEv } return pBuffer; -} \ No newline at end of file +} diff --git a/pandora_agents/win32/modules/pandora_module_logchannel.h b/pandora_agents/win32/modules/pandora_module_logchannel.h index 19cde78b93..c008c0aac1 100755 --- a/pandora_agents/win32/modules/pandora_module_logchannel.h +++ b/pandora_agents/win32/modules/pandora_module_logchannel.h @@ -75,7 +75,7 @@ namespace Pandora_Modules { LPWSTR GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEvent, EVT_FORMAT_MESSAGE_FLAGS FormatId); public: - Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern); + Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern, string application); void run (); }; } From 914ac2815125e0647ade5a3db83ef868f95ebca8 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 3 Sep 2019 12:59:24 +0200 Subject: [PATCH 242/262] Changed checkboxes for combo multiselect in File repository manager --- .../extensions/files_repo/files_repo_form.php | 16 ++++------------ .../files_repo/functions_files_repo.php | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/pandora_console/extensions/files_repo/files_repo_form.php b/pandora_console/extensions/files_repo/files_repo_form.php index 2035cfbd1a..b8e6a084b9 100644 --- a/pandora_console/extensions/files_repo/files_repo_form.php +++ b/pandora_console/extensions/files_repo/files_repo_form.php @@ -44,24 +44,16 @@ $groups = groups_get_all(); // Add the All group to the beginning to be always the first // Use this instead array_unshift to keep the array keys $groups = ([0 => __('All')] + $groups); -$html = ''; -$style = 'style="padding: 2px 10px; display: inline-block;"'; +$groups_selected = []; foreach ($groups as $id => $name) { - $checked = in_array($id, $file['groups']); - $all_checked = false; - if ($id === 0) { - $checkbox = html_print_checkbox_extended('groups[]', $id, $checked, false, '', 'class="chkb_all"', true); - $all_checked = $checked; - } else { - $checkbox = html_print_checkbox_extended('groups[]', $id, $checked, $all_checked, '', 'class="chkb_group"', true); + if (in_array($id, $file['groups'])) { + $groups_selected[] = $id; } - - $html .= "
    $name $checkbox
    "; } $row = []; $row[0] = __('Groups'); -$row[1] = $html; +$row[1] = html_print_select($groups, 'groups[]', $groups_selected, '', '', '', true, true, '', '', ''); $table->data[] = $row; $table->colspan[][1] = 3; diff --git a/pandora_console/extensions/files_repo/functions_files_repo.php b/pandora_console/extensions/files_repo/functions_files_repo.php index 3d9bdccd38..32ce4c216c 100644 --- a/pandora_console/extensions/files_repo/functions_files_repo.php +++ b/pandora_console/extensions/files_repo/functions_files_repo.php @@ -193,7 +193,7 @@ function files_repo_add_file($file_input_name='upfile', $description='', $groups global $config; $attachment_path = io_safe_output($config['attachment_store']); - $files_repo_path = $attachment_path.'/'.'files_repo'; + $files_repo_path = $attachment_path.'/files_repo'; $result = []; $result['status'] = false; From 61c75118f2f167816db3ff6d1dbbf294bed811c4 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 4 Sep 2019 00:01:10 +0200 Subject: [PATCH 243/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index a2cc585f8a..d9f8bfb577 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190903 +Version: 7.0NG.738-190904 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 607f6a6bb1..d193a74944 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190903" +pandora_version="7.0NG.738-190904" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 5e533dd017..26b68437a8 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190903'; +use constant AGENT_BUILD => '190904'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 4b78005367..3a7b5af8f2 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190903 +%define release 190904 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 33cef8dd77..a132020590 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190903 +%define release 190904 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 6961d3f870..018e589961 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190903" +PI_BUILD="190904" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f138c3c363..0dc35d27c7 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190903} +{190904} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index c33cc9cb8c..619d12e786 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190903)") +#define PANDORA_VERSION ("7.0NG.738(Build 190904)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9b16e6891c..d1ff60ef85 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190903))" + VALUE "ProductVersion", "(7.0NG.738(Build 190904))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 411ee40653..612869c2dd 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190903 +Version: 7.0NG.738-190904 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 7ed33edb97..6ebab4fdec 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190903" +pandora_version="7.0NG.738-190904" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9ac7c09f7c..97ddc9faa4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190903'; +$build_version = 'PC190904'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b3ec9db6c5..c0ddd4de13 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 08ee4c6257..57722cd276 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190903 +%define release 190904 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index aa846d1222..da8bdf0310 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190903 +%define release 190904 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index a3d7ef0182..fa0da065da 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190903" +PI_BUILD="190904" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 4eb80c80e5..becca334e0 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190903"; +my $version = "7.0NG.738 PS190904"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 9bafa9bc20..5b39a48499 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190903"; +my $version = "7.0NG.738 PS190904"; # save program name for logging my $progname = basename($0); From bb256793440fabef47fbd520c9ca24d595d9a113 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Wed, 4 Sep 2019 14:12:38 +0200 Subject: [PATCH 244/262] Added ui_get_full_url in all links --- .../include/class/ConsoleSupervisor.php | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 07cd4f492e..87a6f2dca0 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -727,7 +727,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.LICENSE.LIMITED', 'title' => __('Limited mode.'), 'message' => io_safe_output($config['limited_mode']), - 'url' => 'index.php?sec=gsetup&sec2=godmode/setup/license', + 'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/license'), ] ); } else { @@ -745,7 +745,7 @@ class ConsoleSupervisor 'Your license will expire in %d days. Please, contact our sales department.', $days_to_expiry ), - 'url' => 'index.php?sec=gsetup&sec2=godmode/setup/license', + 'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/license'), ] ); } else if ($days_to_expiry < 0) { @@ -755,7 +755,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.LICENSE.EXPIRATION', 'title' => __('Expired license'), 'message' => __('Your license has expired. Please, contact our sales department.'), - 'url' => 'index.php?sec=gsetup&sec2=godmode/setup/license', + 'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/license'), ] ); return false; @@ -832,7 +832,7 @@ class ConsoleSupervisor 'Directory %s is not writable. Please, configure corresponding permissions.', $config['attachment_store'] ), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=general', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=general'), ] ); return; @@ -854,7 +854,7 @@ class ConsoleSupervisor 'There are more than %d files in attachment, consider cleaning up attachment directory manually.', $config['num_files_attachment'] ), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=perf', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=perf'), ] ); } else { @@ -886,7 +886,7 @@ class ConsoleSupervisor 'Remote configuration directory %s is not readable. Please, adjust configuration.', $config['remote_config'] ), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=general', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=general'), ] ); return; @@ -905,7 +905,7 @@ class ConsoleSupervisor 'Remote configuration directory %s is not writable. Please, adjust configuration.', $config['remote_config'].'/conf' ), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=general', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=general'), ] ); } else { @@ -923,7 +923,7 @@ class ConsoleSupervisor 'Collections directory %s is not writable. Please, adjust configuration.', $config['remote_config'].'/collections' ), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=general', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=general'), ] ); } else { @@ -941,7 +941,7 @@ class ConsoleSupervisor 'MD5 directory %s is not writable. Please, adjust configuration.', $config['remote_config'].'/md5' ), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=general', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=general'), ] ); } else { @@ -972,7 +972,7 @@ class ConsoleSupervisor $MAX_FILES_DATA_IN, $config['remote_config'] ), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=perf', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=perf'), ] ); } else { @@ -995,7 +995,7 @@ class ConsoleSupervisor $MAX_BADXML_FILES_DATA_IN, $config['remote_config'] ), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=perf', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=perf'), ] ); } else { @@ -1081,7 +1081,7 @@ class ConsoleSupervisor $modules_queued, $queue['queued_modules'] ), - 'url' => 'index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=60', + 'url' => ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=60'), ] ); } else { @@ -1191,7 +1191,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.SERVER.STATUS.'.$server['id_server'], 'title' => $msg, 'message' => $description, - 'url' => 'index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=60', + 'url' => ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=60'), ] ); } @@ -1499,7 +1499,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.HISTORYDB', 'title' => __('Historical database not available'), 'message' => __('Historical database is enabled, though not accessible with the current configuration.'), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=hist_db', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=hist_db'), ] ); } else { @@ -1546,7 +1546,7 @@ class ConsoleSupervisor 'Your database hasn\'t been through maintenance for 48hrs. Please, check documentation on how to perform this maintenance process on %s and enable it as soon as possible.', io_safe_output(get_product_name()) ), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=perf', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=perf'), ] ); } else { @@ -1606,7 +1606,7 @@ class ConsoleSupervisor 'Historical database maintenance problem.' ), 'message' => __('Your historical database hasn\'t been through maintenance for 48hrs. Please, check documentation on how to perform this maintenance process on %s and enable it as soon as possible.', get_product_name()), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=perf', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=perf'), ] ); } else { @@ -1645,7 +1645,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.HISTORYDB.MR', 'title' => __('Historical database MR mismatch'), 'message' => __('Your historical database is not using the same schema as the main DB. This could produce anomalies while storing historical data.'), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=hist_db', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=hist_db'), ] ); } else { @@ -1687,7 +1687,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.EXT.ELASTICSEARCH', 'title' => __('Log collector cannot connect to ElasticSearch'), 'message' => __('ElasticSearch is not available using current configuration.'), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=log', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=log'), ] ); } else { @@ -1757,7 +1757,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.METACONSOLE.DB_CONNECTION', 'title' => __('Metaconsole DB is not available.'), 'message' => __('Cannot connect with Metaconsole DB using current configuration.'), - 'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=enterprise', + 'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=enterprise'), ] ); } @@ -1786,7 +1786,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.DOWNTIME', 'title' => __('Scheduled downtime running.'), 'message' => __('A scheduled downtime is running. Some monitoring data won\'t be available while downtime is taking place.'), - 'url' => 'index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list', + 'url' => ui_get_full_url('index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list'), ] ); return; @@ -1947,7 +1947,7 @@ class ConsoleSupervisor date('M j, G:i:s ', $next_downtime_begin), date('M j, G:i:s ', $next_downtime_end) ), - 'url' => 'index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list', + 'url' => ui_get_full_url('index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list'), ] ); return; @@ -2043,7 +2043,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.SECURITY.DEFAULT_PASSWORD', 'title' => __('Default password for "Admin" user has not been changed'), 'message' => __('Please, change the default password since it is a commonly reported vulnerability.'), - 'url' => 'index.php?sec=gusuarios&sec2=godmode/users/user_list', + 'url' => ui_get_full_url('index.php?sec=gusuarios&sec2=godmode/users/user_list'), ] ); } else { @@ -2069,7 +2069,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.MISC.FONTPATH', 'title' => __('Default font doesn\'t exist'), 'message' => __('Your defined font doesn\'t exist or is not defined. Please, check font parameters in your config'), - 'url' => 'index.php?sec=gsetup&sec2=godmode/setup/setup§ion=vis', + 'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=vis'), ] ); } else { @@ -2096,7 +2096,7 @@ class ConsoleSupervisor 'Your %s has the "develop_bypass" mode enabled. This is a developer mode and should be disabled in a production environment. This value is located in the main index.php file', get_product_name() ), - 'url' => 'index.php', + 'url' => ui_get_full_url('index.php'), ] ); } else { @@ -2119,7 +2119,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.MISC.EVENTSTORMPROTECTION', 'title' => __('Event storm protection is enabled.'), 'message' => __('Some events may get lost while this mode is enabled. The server must be restarted after altering this setting.'), - 'url' => 'index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general', + 'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general'), ] ); } else { @@ -2146,7 +2146,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.UPDATEMANAGER.OPENSETUP', 'title' => __('Failed to retrieve updates, please configure utility'), 'message' => $message, - 'url' => 'index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general', + 'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general'), ] ); } @@ -2165,8 +2165,8 @@ class ConsoleSupervisor 'New %s Console update', get_product_name() ), - 'message' => __('There is a new update available. Please go to Administration:Setup:Update Manager for more details.'), - 'url' => 'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online', + 'message' => __('There is a new update available. Please go to Administration:Setup:Update Manager for more details.'), + 'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online'), ] ); } else { @@ -2204,7 +2204,7 @@ class ConsoleSupervisor 'There is one or more minor releases available. .About minor release update.', $url ), - 'url' => 'index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=online', + 'url' => ui_get_full_url('index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=online'), ] ); } else { @@ -2253,7 +2253,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.CRON.CONFIGURED', 'title' => __('DiscoveryConsoleTasks is not configured.'), 'message' => __($message_conf_cron), - 'url' => 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist', + 'url' => ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist'), ] ); } else { From a4739e48911b3057f1e046160263ef8456dc0308 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 5 Sep 2019 00:01:07 +0200 Subject: [PATCH 245/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index d9f8bfb577..60178d6c50 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190904 +Version: 7.0NG.738-190905 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index d193a74944..e02ac99a67 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190904" +pandora_version="7.0NG.738-190905" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 26b68437a8..9b5a24d515 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190904'; +use constant AGENT_BUILD => '190905'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 3a7b5af8f2..a22caf27cc 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190904 +%define release 190905 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index a132020590..ee53894623 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190904 +%define release 190905 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 018e589961..b8234a70cd 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190904" +PI_BUILD="190905" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 0dc35d27c7..ebac265083 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190904} +{190905} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 619d12e786..5b5fb5fc5e 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190904)") +#define PANDORA_VERSION ("7.0NG.738(Build 190905)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d1ff60ef85..2d39c90e46 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190904))" + VALUE "ProductVersion", "(7.0NG.738(Build 190905))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 612869c2dd..d406b35c6e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190904 +Version: 7.0NG.738-190905 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 6ebab4fdec..7097063187 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190904" +pandora_version="7.0NG.738-190905" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 97ddc9faa4..fb51f94fe4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190904'; +$build_version = 'PC190905'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index c0ddd4de13..99fc5e653e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 57722cd276..ab274c7d02 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190904 +%define release 190905 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index da8bdf0310..49bd12b3b8 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190904 +%define release 190905 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index fa0da065da..ccecb6e6ed 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190904" +PI_BUILD="190905" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index becca334e0..9f9b0bd653 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190904"; +my $version = "7.0NG.738 PS190905"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 5b39a48499..ab01849bc5 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190904"; +my $version = "7.0NG.738 PS190905"; # save program name for logging my $progname = basename($0); From 42fad5acb134d5109cdf15853581a6acff68946a Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Thu, 5 Sep 2019 10:37:12 +0200 Subject: [PATCH 246/262] fix bug in events advanced filter: default option other than All --- pandora_console/operation/events/events.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 52eac8b77e..d525aaa535 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -1029,15 +1029,14 @@ $adv_inputs[] = $in; // Only alert events. $data = html_print_select( [ - '-1' => __('All'), - '0' => __('Filter alert events'), - '1' => __('Only alert events'), + '0' => __('Filter alert events'), + '1' => __('Only alert events'), ], 'filter_only_alert', $filter_only_alert, '', - '', - '', + __('All'), + -1, true ); $in = '
    '; From 86cf025317c6daa3a4566c9270a027d47d6750d4 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 5 Sep 2019 11:58:15 +0200 Subject: [PATCH 247/262] Fixed some errors in visual console --- pandora_console/include/functions_html.php | 2 +- .../include/functions_visual_map.php | 7 +--- .../visual_console/legacy_public_view.php | 36 ++++++++++++------- .../operation/visual_console/public_view.php | 9 ++++- 4 files changed, 34 insertions(+), 20 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index fc704e2d46..08d60dbb6e 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -2471,7 +2471,7 @@ function html_print_image( if (!is_readable($working_dir.'/enterprise/meta'.$src)) { if ($isExternalLink) { - $src = ui_get_full_url($src); + $src = ui_get_full_url($src, false, false, false); } else { $src = ui_get_full_url('../..'.$src); } diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 56620cda9a..1c6afb9eed 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -3278,12 +3278,7 @@ function visual_map_get_color_line_status($layoutData) */ function visual_map_get_image_status_element($layoutData, $status=false) { - $metaconsole_hack = ''; - if (is_metaconsole()) { - $metaconsole_hack = '../../'; - } - - $img = $metaconsole_hack.'images/console/icons/'.$layoutData['image']; + $img = 'images/console/icons/'.$layoutData['image']; if ($layoutData['type'] == 5) { // ICON ELEMENT diff --git a/pandora_console/operation/visual_console/legacy_public_view.php b/pandora_console/operation/visual_console/legacy_public_view.php index 18d8e2ca55..7bea2a22c9 100644 --- a/pandora_console/operation/visual_console/legacy_public_view.php +++ b/pandora_console/operation/visual_console/legacy_public_view.php @@ -40,6 +40,9 @@ ob_start('ui_process_page_head'); // Enterprise main enterprise_include('index.php'); +$url_css = ui_get_full_url('include/styles/visual_maps.css', false, false, false); +echo ''; + require_once 'include/functions_visual_map.php'; $hash = get_parameter('hash'); @@ -96,31 +99,40 @@ if ($layout) { echo '
    '; } -// Floating menu - Start +// Floating menu - Start. echo '
    '; echo ''; echo '
    '; -// Floating menu - End -// QR code dialog + +// QR code dialog. echo ''; -ui_require_jquery_file('countdown'); -ui_require_javascript_file('wz_jsgraphics'); -ui_require_javascript_file('pandora_visual_console'); +ui_require_jquery_file('countdown', 'include/javascript/', true); +ui_require_javascript_file('wz_jsgraphics', 'include/javascript/', true); +ui_require_javascript_file('pandora_visual_console', 'include/javascript/', true); $ignored_params['refr'] = ''; ?> diff --git a/pandora_console/operation/visual_console/public_view.php b/pandora_console/operation/visual_console/public_view.php index 029ef9eb25..e31d6f9ed5 100644 --- a/pandora_console/operation/visual_console/public_view.php +++ b/pandora_console/operation/visual_console/public_view.php @@ -42,6 +42,9 @@ ob_start('ui_process_page_head'); // Enterprise main. enterprise_include('index.php'); +$url_css = ui_get_full_url('include/styles/visual_maps.css', false, false, false); +echo ''; + require_once 'include/functions_visual_map.php'; $hash = (string) get_parameter('hash'); @@ -134,7 +137,7 @@ if (!users_can_manage_group_all('AR')) { } $ignored_params['refr'] = ''; -ui_require_javascript_file('pandora_visual_console'); +ui_require_javascript_file('pandora_visual_console', 'include/javascript/', true); include_javascript_d3(); visual_map_load_client_resources(); @@ -157,6 +160,10 @@ $visualConsoleItems = VisualConsole::getItemsFromDB( var props = ; var items = ; var baseUrl = ""; + + var controls = document.getElementById('vc-controls'); + autoHideElement(controls, 1000); + var handleUpdate = function (prevProps, newProps) { if (!newProps) return; From c12d672109f93ecc7d1cf9bf2b25b5cf34a19af7 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 5 Sep 2019 12:01:25 +0200 Subject: [PATCH 248/262] Add visual condition for JA and CH Lenguage --- pandora_console/godmode/agentes/modificar_agente.php | 2 +- pandora_console/operation/agentes/estado_agente.php | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 699efef940..a383de35c4 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -446,7 +446,7 @@ if ($agents !== false) { // Agent name size and description for Chinese and Japanese languages ​​are adjusted $agent_font_size = '7'; $description_font_size = '6.5'; - if ($config['language'] == 'ja' || $config['language'] == 'zh_CN') { + if ($config['language'] == 'ja' || $config['language'] == 'zh_CN' || $own_info['language'] == 'ja' || $own_info['language'] == 'zh_CN') { $agent_font_size = '15'; $description_font_size = '11'; } diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index bb9dc7cef7..df2c36a1cd 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -624,6 +624,13 @@ if (empty($agents)) { $agents = []; } +$agent_font_size = 'font-size: 7px'; +$description_font_size = 'font-size: 6.5px'; +if ($config['language'] == 'ja' || $config['language'] == 'zh_CN' || $own_info['language'] == 'ja' || $own_info['language'] == 'zh_CN') { + $agent_font_size = 'font-size: 15px'; + $description_font_size = 'font-size: 11px'; +} + // Urls to sort the table. $url_up_agente = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=name&sort=up'; $url_down_agente = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=name&sort=down'; @@ -739,7 +746,7 @@ foreach ($agents as $agent) { $data[0] = '
    '; $data[0] .= ''; - $data[0] .= ' '.$agent['alias'].''; + $data[0] .= ' '.$agent['alias'].''; $data[0] .= ''; if ($agent['quiet']) { @@ -772,7 +779,7 @@ foreach ($agents as $agent) { $data[0] .= '
    '; - $data[1] = ui_print_truncate_text($agent['description'], 'description', false, true, true, '[…]', 'font-size: 6.5pt'); + $data[1] = ui_print_truncate_text($agent['description'], 'description', false, true, true, '[…]', $description_font_size); $data[10] = ''; From ae474a27317ad259d7bf37c304540c751d5e5268 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 6 Sep 2019 00:01:10 +0200 Subject: [PATCH 249/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 60178d6c50..79ec8e1e38 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190905 +Version: 7.0NG.738-190906 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index e02ac99a67..a1152c73bb 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190905" +pandora_version="7.0NG.738-190906" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 9b5a24d515..80a2c23b12 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190905'; +use constant AGENT_BUILD => '190906'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index a22caf27cc..13cc96d73e 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190905 +%define release 190906 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index ee53894623..8b77150184 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190905 +%define release 190906 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index b8234a70cd..54858a1d3e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190905" +PI_BUILD="190906" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ebac265083..daa57b099d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190905} +{190906} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5b5fb5fc5e..9ef2d6ec82 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190905)") +#define PANDORA_VERSION ("7.0NG.738(Build 190906)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2d39c90e46..60ee89d3f1 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190905))" + VALUE "ProductVersion", "(7.0NG.738(Build 190906))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index d406b35c6e..305bc5d62d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190905 +Version: 7.0NG.738-190906 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 7097063187..b0d6e3e085 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190905" +pandora_version="7.0NG.738-190906" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index fb51f94fe4..9deb7fa7b7 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190905'; +$build_version = 'PC190906'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 99fc5e653e..c04064aaa2 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index ab274c7d02..c8d7c85652 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190905 +%define release 190906 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 49bd12b3b8..f368d394bf 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190905 +%define release 190906 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index ccecb6e6ed..ab51df1d95 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190905" +PI_BUILD="190906" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 9f9b0bd653..daa4f0d901 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190905"; +my $version = "7.0NG.738 PS190906"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ab01849bc5..0536aa058b 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190905"; +my $version = "7.0NG.738 PS190906"; # save program name for logging my $progname = basename($0); From 3680555bae64ceb0c3db4bf5cfecfb86c33f5f5c Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 7 Sep 2019 00:01:10 +0200 Subject: [PATCH 250/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 79ec8e1e38..5c8864cc71 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190906 +Version: 7.0NG.738-190907 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index a1152c73bb..3707fb91c4 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190906" +pandora_version="7.0NG.738-190907" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 80a2c23b12..c187c4e856 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190906'; +use constant AGENT_BUILD => '190907'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 13cc96d73e..818b0f78cb 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190906 +%define release 190907 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 8b77150184..dd59df95fe 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190906 +%define release 190907 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 54858a1d3e..5bb08bced2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190906" +PI_BUILD="190907" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index daa57b099d..218916199f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190906} +{190907} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 9ef2d6ec82..4884afb225 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190906)") +#define PANDORA_VERSION ("7.0NG.738(Build 190907)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 60ee89d3f1..2d2c67c296 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190906))" + VALUE "ProductVersion", "(7.0NG.738(Build 190907))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 305bc5d62d..44b13c8cac 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190906 +Version: 7.0NG.738-190907 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index b0d6e3e085..4bcf839517 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190906" +pandora_version="7.0NG.738-190907" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9deb7fa7b7..274d663c44 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190906'; +$build_version = 'PC190907'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index c04064aaa2..497d0d577f 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index c8d7c85652..d4ae517195 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190906 +%define release 190907 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f368d394bf..4518158ed0 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190906 +%define release 190907 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index ab51df1d95..be4e88b247 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190906" +PI_BUILD="190907" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index daa4f0d901..3192954b07 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190906"; +my $version = "7.0NG.738 PS190907"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 0536aa058b..c9740be5aa 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190906"; +my $version = "7.0NG.738 PS190907"; # save program name for logging my $progname = basename($0); From f088f4760563abdcfb676a94b48ce2659d90e43b Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 8 Sep 2019 00:01:06 +0200 Subject: [PATCH 251/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 5c8864cc71..fa2f8c1bd1 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190907 +Version: 7.0NG.738-190908 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 3707fb91c4..32935ec9a9 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190907" +pandora_version="7.0NG.738-190908" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index c187c4e856..5183db1b22 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190907'; +use constant AGENT_BUILD => '190908'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 818b0f78cb..64400b64ed 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190907 +%define release 190908 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index dd59df95fe..647505eef7 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190907 +%define release 190908 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 5bb08bced2..3e43fa9d7e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190907" +PI_BUILD="190908" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 218916199f..fa30af90be 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190907} +{190908} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 4884afb225..fd950e3566 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190907)") +#define PANDORA_VERSION ("7.0NG.738(Build 190908)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2d2c67c296..c46728cab1 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190907))" + VALUE "ProductVersion", "(7.0NG.738(Build 190908))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 44b13c8cac..7101e8b16c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190907 +Version: 7.0NG.738-190908 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 4bcf839517..b1d21f6a7e 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190907" +pandora_version="7.0NG.738-190908" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 274d663c44..49bdd2e1c3 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190907'; +$build_version = 'PC190908'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 497d0d577f..1c1e5260bd 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index d4ae517195..e3f3015df8 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190907 +%define release 190908 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 4518158ed0..65e18cf16f 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190907 +%define release 190908 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index be4e88b247..b15841dd6c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190907" +PI_BUILD="190908" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 3192954b07..8d205e91b1 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190907"; +my $version = "7.0NG.738 PS190908"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index c9740be5aa..044adcd5fc 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190907"; +my $version = "7.0NG.738 PS190908"; # save program name for logging my $progname = basename($0); From 5526bb49ed8bd43d50c80c623a2ff0264c9e152a Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 9 Sep 2019 00:01:07 +0200 Subject: [PATCH 252/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index fa2f8c1bd1..5d6aba65a6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190908 +Version: 7.0NG.738-190909 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 32935ec9a9..a4fd07cf63 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190908" +pandora_version="7.0NG.738-190909" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 5183db1b22..1c19f797bc 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190908'; +use constant AGENT_BUILD => '190909'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 64400b64ed..ea00c14413 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190908 +%define release 190909 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 647505eef7..c644bf1b1c 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190908 +%define release 190909 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 3e43fa9d7e..4ee6a8d596 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190908" +PI_BUILD="190909" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index fa30af90be..cba1df14f2 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190908} +{190909} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index fd950e3566..e798768f8f 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190908)") +#define PANDORA_VERSION ("7.0NG.738(Build 190909)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c46728cab1..3e2ae25a0c 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190908))" + VALUE "ProductVersion", "(7.0NG.738(Build 190909))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7101e8b16c..bb7b6fd134 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190908 +Version: 7.0NG.738-190909 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index b1d21f6a7e..7809ffbdad 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190908" +pandora_version="7.0NG.738-190909" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 49bdd2e1c3..0782527285 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190908'; +$build_version = 'PC190909'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1c1e5260bd..f97b8840fa 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e3f3015df8..9654edff1d 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190908 +%define release 190909 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 65e18cf16f..25d770f321 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190908 +%define release 190909 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index b15841dd6c..9e64c7809a 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190908" +PI_BUILD="190909" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 8d205e91b1..c8664cd5fd 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190908"; +my $version = "7.0NG.738 PS190909"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 044adcd5fc..6adcb5a86b 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190908"; +my $version = "7.0NG.738 PS190909"; # save program name for logging my $progname = basename($0); From 16912732d239ef49e63ae2552fd64bd2ceb25b91 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 10 Sep 2019 00:01:08 +0200 Subject: [PATCH 253/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 5d6aba65a6..255369ec50 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190909 +Version: 7.0NG.738-190910 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index a4fd07cf63..d8a9edb81f 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190909" +pandora_version="7.0NG.738-190910" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 1c19f797bc..b2aa44bf57 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190909'; +use constant AGENT_BUILD => '190910'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index ea00c14413..6cb9511740 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190909 +%define release 190910 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index c644bf1b1c..4d92dceec8 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190909 +%define release 190910 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 4ee6a8d596..fb2d0d497f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190909" +PI_BUILD="190910" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index cba1df14f2..41ca38cb18 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190909} +{190910} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e798768f8f..32a7a4e667 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190909)") +#define PANDORA_VERSION ("7.0NG.738(Build 190910)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3e2ae25a0c..0792a3830d 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190909))" + VALUE "ProductVersion", "(7.0NG.738(Build 190910))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index bb7b6fd134..492c6c2e8d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190909 +Version: 7.0NG.738-190910 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 7809ffbdad..061f4e26a8 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190909" +pandora_version="7.0NG.738-190910" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0782527285..40f90a23e8 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190909'; +$build_version = 'PC190910'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f97b8840fa..8db1605ace 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 9654edff1d..e9026587a6 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190909 +%define release 190910 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 25d770f321..adf070d130 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190909 +%define release 190910 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 9e64c7809a..167aa068fb 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190909" +PI_BUILD="190910" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index c8664cd5fd..bfb97460aa 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190909"; +my $version = "7.0NG.738 PS190910"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 6adcb5a86b..98cca10392 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190909"; +my $version = "7.0NG.738 PS190910"; # save program name for logging my $progname = basename($0); From fdef0b5188c1122b71e5e6fb99583de1c414a06c Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 11 Sep 2019 00:01:10 +0200 Subject: [PATCH 254/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 255369ec50..44d1bcd1db 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190910 +Version: 7.0NG.738-190911 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index d8a9edb81f..f307703547 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190910" +pandora_version="7.0NG.738-190911" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index b2aa44bf57..3bc7f95a14 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190910'; +use constant AGENT_BUILD => '190911'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 6cb9511740..962c581eb4 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190910 +%define release 190911 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 4d92dceec8..5e23b721d5 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190910 +%define release 190911 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index fb2d0d497f..23b842c33d 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190910" +PI_BUILD="190911" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 41ca38cb18..e258a3c759 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190910} +{190911} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 32a7a4e667..8f5fd6be91 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190910)") +#define PANDORA_VERSION ("7.0NG.738(Build 190911)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 0792a3830d..f19e26659f 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190910))" + VALUE "ProductVersion", "(7.0NG.738(Build 190911))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 492c6c2e8d..7d75b987dd 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190910 +Version: 7.0NG.738-190911 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 061f4e26a8..e1576a1f87 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190910" +pandora_version="7.0NG.738-190911" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 40f90a23e8..e7ccc00a4d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190910'; +$build_version = 'PC190911'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 8db1605ace..1d055f0087 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e9026587a6..b639e17a76 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190910 +%define release 190911 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index adf070d130..a137157567 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190910 +%define release 190911 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 167aa068fb..233e445841 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190910" +PI_BUILD="190911" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index bfb97460aa..de5e222084 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190910"; +my $version = "7.0NG.738 PS190911"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 98cca10392..fb5e640f2c 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190910"; +my $version = "7.0NG.738 PS190911"; # save program name for logging my $progname = basename($0); From d9dc03dd91cdf59c48e8e8cfb756abe9c0607361 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 11 Sep 2019 18:08:40 +0200 Subject: [PATCH 255/262] Fixed max,min,avg report --- .../include/functions_reporting.php | 374 ++++-------------- .../include/functions_reporting_html.php | 130 +++++- 2 files changed, 197 insertions(+), 307 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 4abf5152c1..536449c6bc 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -4785,12 +4785,10 @@ function reporting_value($report, $content, $type, $pdf=false) 'period' => $content['period'], 'width' => '600px', 'pure' => false, - // true 'date' => $report['datetime'], 'only_image' => $only_image, 'homeurl' => ui_get_full_url(false, false, false, false), 'ttl' => 1, - // 2 'type_graph' => $config['type_module_charts'], 'time_interval' => $content['lapse'], 'server_id' => $id_meta, @@ -4800,323 +4798,105 @@ function reporting_value($report, $content, $type, $pdf=false) switch ($type) { case 'max': - if ($content['lapse_calc'] == 0) { - $value = reporting_get_agentmodule_data_max( - $content['id_agent_module'], - $content['period'], - $report['datetime'] - ); - if (!$config['simple_module_value']) { - $formated_value = $value; - } else { - $formated_value = format_for_graph($value, $config['graph_precision']).' '.$unit; - } - } else { - $value = ' - - - - - - - - - -
    '; - if ($content['visual_format'] == 1 || $content['visual_format'] == 2 || $content['visual_format'] == 3) { - $value .= ' - - - - - - - - - - -
    - '.__('Agent').' - - '.__('Module').' - - '.__('Maximum').' -
    - '.$agent_name.' - - '.$module_name.' - - '.format_for_graph(reporting_get_agentmodule_data_max($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit.' -
    '; - } - - $value .= ' -
    - '; - - if ($content['visual_format'] == 2 || $content['visual_format'] == 3) { - $params['force_interval'] = 'max_only'; - $value .= grafico_modulo_sparse($params); - } - - $value .= ' - -
    '; - - if ($content['visual_format'] == 1 || $content['visual_format'] == 3) { - $value .= ' - - - - - - '; - $time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module'], true); - $date_reference = getdate(); - - for ($i = $date_reference[0]; $i > ($date_reference[0] - $content['period']); $i -= $content['lapse']) { - $value .= ''; - } else { - $value .= 'N/A'; - } - } - - $value .= '
    - '.__('Lapse').' - - '.__('Maximum').' -
    '.date('Y-m-d H:i:s', ($i - $content['lapse'] + 1)).' to '.date('Y-m-d H:i:s', $i).''; - - if ($i > $time_begin['utimestamp']) { - $value .= format_for_graph( - reporting_get_agentmodule_data_max( - $content['id_agent_module'], - $content['lapse'], - $i - ), - $config['graph_precision'] - ).' '.$unit.'
    '; - } - - $value .= ' -
    '; - - $formated_value = $value; - } - break; - case 'min': - if ($content['lapse_calc'] == 0) { - $value = reporting_get_agentmodule_data_min( - $content['id_agent_module'], - $content['period'], - $report['datetime'] - ); - - if (!$config['simple_module_value']) { - $formated_value = $value; - } else { - $formated_value = format_for_graph($value, $config['graph_precision']).' '.$unit; - } - } else { - $value = ' - - - - - - - - - -
    '; - - if ($content['visual_format'] == 1 || $content['visual_format'] == 2 || $content['visual_format'] == 3) { - $value .= ' - - - - - - - - - - -
    - '.__('Agent').' - - '.__('Module').' - - '.__('Minimum').' -
    - '.$agent_name.' - - '.$module_name.' - - '.format_for_graph(reporting_get_agentmodule_data_min($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit.' -
    '; - } - - $value .= ' -
    - '; - - if ($content['visual_format'] == 2 || $content['visual_format'] == 3) { - $params['force_interval'] = 'min_only'; - $value .= grafico_modulo_sparse($params); - } - - $value .= ' -
    '; - - if ($content['visual_format'] == 1 || $content['visual_format'] == 3) { - $value .= ' - - - - - - '; - $time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module']); - $date_reference = getdate(); - - for ($i = $date_reference[0]; $i > ($date_reference[0] - $content['period']); $i -= $content['lapse']) { - $value .= ''; - } else { - $value .= 'N/A'; - } - } - - $value .= '
    - '.__('Lapse').' - - '.__('Minimum').' -
    '.date('Y-m-d H:i:s', ($i - $content['lapse'] + 1)).' to '.date('Y-m-d H:i:s', $i).''; - - if ($i > $time_begin['utimestamp']) { - $value .= format_for_graph( - reporting_get_agentmodule_data_min( - $content['id_agent_module'], - $content['lapse'], - $i - ), - $config['graph_precision'] - ).' '.$unit.'
    '; - } - - $value .= ' - -
    '; - - $formated_value = $value; - } - break; - case 'avg': if ($content['lapse_calc'] == 0) { - $value = reporting_get_agentmodule_data_average( - $content['id_agent_module'], - $content['period'], - $report['datetime'] - ); + switch ($type) { + case 'max': + $value = reporting_get_agentmodule_data_max( + $content['id_agent_module'], + $content['period'], + $report['datetime'] + ); + break; + + case 'min': + $value = reporting_get_agentmodule_data_min( + $content['id_agent_module'], + $content['period'], + $report['datetime'] + ); + break; + + case 'avg': + $value = reporting_get_agentmodule_data_average( + $content['id_agent_module'], + $content['period'], + $report['datetime'] + ); + break; + } + if (!$config['simple_module_value']) { $formated_value = $value; } else { $formated_value = format_for_graph($value, $config['graph_precision']).' '.$unit; } } else { - $value = ' - - - - - - - - - -
    '; + $return['visual_format'] = $content['visual_format']; - if ($content['visual_format'] == 1 || $content['visual_format'] == 2 || $content['visual_format'] == 3) { - $value .= ' - - - - - - - - - - -
    - '.__('Agent').' - - '.__('Module').' - - '.__('Average').' -
    - '.$agent_name.' - - '.$module_name.' - - '.format_for_graph(reporting_get_agentmodule_data_average($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit.' -
    '; + switch ($type) { + case 'max': + $params['force_interval'] = 'max_only'; + $value = format_for_graph(reporting_get_agentmodule_data_max($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit; + break; + + case 'min': + $params['force_interval'] = 'min_only'; + $value = format_for_graph(reporting_get_agentmodule_data_min($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit; + break; + + case 'avg': + $params['force_interval'] = 'avg_only'; + $value = format_for_graph(reporting_get_agentmodule_data_average($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit; + break; } - $value .= ' -
    - '; - if ($content['visual_format'] == 2 || $content['visual_format'] == 3) { - $params['force_interval'] = 'avg_only'; - $value .= grafico_modulo_sparse($params); + $return['data'][] = [ + __('Agent') => $agent_name, + __('Module') => $module_name, + __('Maximun') => $value, + ]; + + if ($content['visual_format'] != 1) { + $graph = grafico_modulo_sparse($params); + $return['data'][] = ['value' => $graph]; } - $value .= ' - -
    '; - - if ($content['visual_format'] == 1 || $content['visual_format'] == 3) { - $value .= ' - - - - - - '; - $time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module']); + if ($content['visual_format'] != 2) { + $time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module'], true); $date_reference = getdate(); - for ($i = $date_reference[0]; $i > ($date_reference[0] - $content['period']); $i -= $content['lapse']) { - $value .= ''; - } else { - $value .= 'N/A'; - } - } + switch ($type) { + case 'max': + $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_max($content['id_agent_module'], $content['lapse'], $i), $config['graph_precision']).' '.$unit; + break; - $value .= '
    - '.__('Lapse').' - - '.__('Average').' -
    '.date('Y-m-d H:i:s', ($i - $content['lapse'] + 1)).' to '.date('Y-m-d H:i:s', $i).''; + $row = []; + $row[__('Lapse')] = date('Y-m-d H:i:s', ($i - $content['lapse'] + 1)).' to '.date('Y-m-d H:i:s', $i); if ($i > $time_begin['utimestamp']) { - $value .= format_for_graph( - reporting_get_agentmodule_data_average( - $content['id_agent_module'], - $content['lapse'], - $i - ), - $config['graph_precision'] - ).' '.$unit.'
    '; + case 'min': + $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_min($content['id_agent_module'], $content['lapse'], $i), $config['graph_precision']).' '.$unit; + break; + + case 'avg': + $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_average($content['id_agent_module'], $content['lapse'], $i), $config['graph_precision']).' '.$unit; + break; + } + } else { + $row[__('Maximun')] = 'N/A'; + } + + $return['data'][] = $row; + } } - $value .= ' - -
    '; + if ($config['metaconsole']) { + metaconsole_restore_db(); + } - $formated_value = $value; + return reporting_check_structure_content($return); } break; diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 6a7d60c620..c2ace5699e 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -2784,20 +2784,130 @@ function reporting_html_value(&$table, $item, $mini, $only_value=false, $check_e $font_size = '3'; } - $table->colspan['data']['cell'] = 3; - $table->cellstyle['data']['cell'] = 'text-align: left;'; + if (isset($item['visual_format']) && $item['visual_format'] != 0 + && ($item['type'] == 'max_value' || $item['type'] == 'min_value' || $item['type'] == 'avg_value') + ) { + $table2 = new stdClass(); + $table2->width = '100%'; + switch ($item['type']) { + case 'max_value': + $table2->head = [ + __('Agent'), + __('Module'), + __('Maximun'), + ]; + break; - $table->data['data']['cell'] = '

    '; + case 'min_value': + $table2->head = [ + __('Agent'), + __('Module'), + __('Minimun'), + ]; + break; - if ($check_empty && empty($item['data']['value'])) { - $table->data['data']['cell'] .= __('Unknown'); - } else if ($only_value) { - $table->data['data']['cell'] .= $item['data']['value']; + case 'avg_value': + $table2->head = [ + __('Agent'), + __('Module'), + __('Average'), + ]; + break; + } + + $table2->data = []; + + $data = $item['data'][0]; + + $row = [ + $data[__('Agent')], + $data[__('Module')], + $data[__('Maximun')], + ]; + + $table2->data[] = $row; + + $table2->title = $item['title']; + $table2->titleclass = 'title_table_pdf'; + $table2->titlestyle = 'text-align:left;'; + $table->colspan[1][0] = 3; + $table->colspan[2][0] = 3; + $table->colspan[3][0] = 3; + + array_push($table->data, html_print_table($table2, true)); + unset($item['data'][0]); + + if ($item['visual_format'] != 1) { + $value = $item['data'][1]['value']; + array_push($table->data, $value); + unset($item['data'][1]); + } + + if ($item['visual_format'] != 2) { + $table1 = new stdClass(); + $table1->width = '100%'; + switch ($item['type']) { + case 'max_value': + $table1->head = [ + __('Lapse'), + __('Maximun'), + ]; + break; + + case 'min_value': + $table1->head = [ + __('Lapse'), + __('Minimun'), + ]; + break; + + case 'avg_value': + $table1->head = [ + __('Lapse'), + __('Average'), + ]; + break; + } + + $table1->data = []; + foreach ($item['data'] as $data) { + if (!is_numeric($data[__('Maximun')])) { + $row = [ + $data[__('Lapse')], + $data[__('Maximun')], + ]; + } else { + $row = [ + $data[__('Lapse')], + remove_right_zeros(number_format($data[__('Maximun')], $config['graph_precision'])), + ]; + } + + $table1->data[] = $row; + } + + $table1->title = $item['title']; + $table1->titleclass = 'title_table_pdf'; + $table1->titlestyle = 'text-align:left;'; + + array_push($table->data, html_print_table($table1, true)); + } } else { - $table->data['data']['cell'] .= $item['data']['formated_value']; - } + $table->colspan['data']['cell'] = 3; + $table->cellstyle['data']['cell'] = 'text-align: left;'; - $table->data['data']['cell'] .= '

    '; + $table->data['data']['cell'] = '

    '; + + if ($check_empty && empty($item['data']['value'])) { + $table->data['data']['cell'] .= __('Unknown'); + } else if ($only_value) { + $table->data['data']['cell'] .= $item['data']['value']; + } else { + $table->data['data']['cell'] .= $item['data']['formated_value']; + } + + $table->data['data']['cell'] .= '

    '; + } } From 602c9ccb5eab20f6f0725ec6dce1413cb0d16073 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 12 Sep 2019 00:01:26 +0200 Subject: [PATCH 256/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 44d1bcd1db..5480607cec 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190911 +Version: 7.0NG.738-190912 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index f307703547..b7dc8d9876 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190911" +pandora_version="7.0NG.738-190912" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 3bc7f95a14..e1f08acc1c 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190911'; +use constant AGENT_BUILD => '190912'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 962c581eb4..185e5e26f7 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190911 +%define release 190912 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 5e23b721d5..8be1f7daa4 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190911 +%define release 190912 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 23b842c33d..dff6af01fa 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190911" +PI_BUILD="190912" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index e258a3c759..44e1b88f2e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190911} +{190912} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8f5fd6be91..068df33b71 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190911)") +#define PANDORA_VERSION ("7.0NG.738(Build 190912)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f19e26659f..296ba8e550 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190911))" + VALUE "ProductVersion", "(7.0NG.738(Build 190912))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7d75b987dd..7e7ccb472e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190911 +Version: 7.0NG.738-190912 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index e1576a1f87..669f032651 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190911" +pandora_version="7.0NG.738-190912" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e7ccc00a4d..60ae8204a7 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190911'; +$build_version = 'PC190912'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1d055f0087..085bc511ca 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index b639e17a76..a472f9273f 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190911 +%define release 190912 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index a137157567..492cc2b958 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190911 +%define release 190912 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 233e445841..76eca733a7 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190911" +PI_BUILD="190912" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 62985fffea..f42c1e7898 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190911"; +my $version = "7.0NG.738 PS190912"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index fb5e640f2c..1d058f810f 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190911"; +my $version = "7.0NG.738 PS190912"; # save program name for logging my $progname = basename($0); From 3d8486659e505c9200857695a22fe5411a1c1d1b Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 12 Sep 2019 12:52:40 +0200 Subject: [PATCH 257/262] Fixed period in template --- pandora_console/include/functions_reporting.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 536449c6bc..3494eed389 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -4865,8 +4865,7 @@ function reporting_value($report, $content, $type, $pdf=false) if ($content['visual_format'] != 2) { $time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module'], true); - $date_reference = getdate(); - for ($i = $date_reference[0]; $i > ($date_reference[0] - $content['period']); $i -= $content['lapse']) { + for ($i = $report['datetime']; $i > ($report['datetime'] - $content['period']); $i -= $content['lapse']) { $row = []; $row[__('Lapse')] = date('Y-m-d H:i:s', ($i - $content['lapse'] + 1)).' to '.date('Y-m-d H:i:s', $i); From 2f45d3d6ecd6a1e0d565955df0e2d2b8800a796e Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 13 Sep 2019 00:01:11 +0200 Subject: [PATCH 258/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 5480607cec..00e5de0dc5 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190912 +Version: 7.0NG.738-190913 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index b7dc8d9876..4035bca720 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190912" +pandora_version="7.0NG.738-190913" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index e1f08acc1c..35a86a656b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190912'; +use constant AGENT_BUILD => '190913'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 185e5e26f7..965a1aa0d1 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190912 +%define release 190913 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 8be1f7daa4..55bda1c48a 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190912 +%define release 190913 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index dff6af01fa..f9eaab41c0 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190912" +PI_BUILD="190913" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 44e1b88f2e..5b62310d00 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190912} +{190913} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 068df33b71..22d0d1eff5 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190912)") +#define PANDORA_VERSION ("7.0NG.738(Build 190913)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 296ba8e550..eb4e892c56 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190912))" + VALUE "ProductVersion", "(7.0NG.738(Build 190913))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7e7ccb472e..a9e7857cc1 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190912 +Version: 7.0NG.738-190913 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 669f032651..4b12f61d10 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190912" +pandora_version="7.0NG.738-190913" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 60ae8204a7..b85e6ce713 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190912'; +$build_version = 'PC190913'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 085bc511ca..bcf623db56 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a472f9273f..547ef9e026 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190912 +%define release 190913 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 492cc2b958..68b47d82b0 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190912 +%define release 190913 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 76eca733a7..0197261987 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190912" +PI_BUILD="190913" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f42c1e7898..374b742a1c 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190912"; +my $version = "7.0NG.738 PS190913"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 1d058f810f..53b18b8cd9 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190912"; +my $version = "7.0NG.738 PS190913"; # save program name for logging my $progname = basename($0); From a4a84c154f04c49283499880cc4d27cd1ce60e9f Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 13 Sep 2019 12:04:30 +0200 Subject: [PATCH 259/262] Fixed refresh --- .../operation/visual_console/legacy_public_view.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/visual_console/legacy_public_view.php b/pandora_console/operation/visual_console/legacy_public_view.php index 7bea2a22c9..ab6def4f70 100644 --- a/pandora_console/operation/visual_console/legacy_public_view.php +++ b/pandora_console/operation/visual_console/legacy_public_view.php @@ -115,6 +115,7 @@ echo ''; // Countdown. echo '
  • '; echo '
    '; +echo '
    '; echo '
    '; echo __('Refresh').':'; echo html_print_select( @@ -187,7 +188,7 @@ $ignored_params['refr'] = ''; var controls = document.getElementById('vc-controls'); autoHideElement(controls, 1000); - $('select#refr').change(function (event) { + $('#vc-controls').change(function (event) { refr = Number.parseInt(event.target.value, 10); startCountDown(refr, false); }); From bc36ed132d3284b4251ee9ebb27063da0e57dd61 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 14 Sep 2019 00:01:23 +0200 Subject: [PATCH 260/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 00e5de0dc5..38fb753f1e 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190913 +Version: 7.0NG.738-190914 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 4035bca720..c6aafdbf19 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190913" +pandora_version="7.0NG.738-190914" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 35a86a656b..f363f42366 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190913'; +use constant AGENT_BUILD => '190914'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 965a1aa0d1..3b91350cd8 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190913 +%define release 190914 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 55bda1c48a..38f814395f 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190913 +%define release 190914 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index f9eaab41c0..21cdaf8e72 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190913" +PI_BUILD="190914" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5b62310d00..bf810ad5b6 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190913} +{190914} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 22d0d1eff5..1e1036f069 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190913)") +#define PANDORA_VERSION ("7.0NG.738(Build 190914)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index eb4e892c56..a98b893eab 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190913))" + VALUE "ProductVersion", "(7.0NG.738(Build 190914))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a9e7857cc1..e0d41216ad 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190913 +Version: 7.0NG.738-190914 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 4b12f61d10..6ab8fde37b 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190913" +pandora_version="7.0NG.738-190914" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index b85e6ce713..cfe4e4063d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190913'; +$build_version = 'PC190914'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index bcf623db56..127bd589ea 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 547ef9e026..695ea38cda 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190913 +%define release 190914 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 68b47d82b0..48156ccb9d 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190913 +%define release 190914 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 0197261987..9985baa24e 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190913" +PI_BUILD="190914" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 374b742a1c..60d09cabcd 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190913"; +my $version = "7.0NG.738 PS190914"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 53b18b8cd9..980036a448 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190913"; +my $version = "7.0NG.738 PS190914"; # save program name for logging my $progname = basename($0); From 05eeb6f3d2c02e7efc8c0437bc35c8d84f814d00 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 15 Sep 2019 00:01:08 +0200 Subject: [PATCH 261/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 38fb753f1e..577fe45e78 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190914 +Version: 7.0NG.738-190915 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index c6aafdbf19..6d85610008 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190914" +pandora_version="7.0NG.738-190915" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index f363f42366..cc44f924b1 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190914'; +use constant AGENT_BUILD => '190915'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 3b91350cd8..8b14a01bf2 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190914 +%define release 190915 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 38f814395f..c7b5f8babe 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190914 +%define release 190915 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 21cdaf8e72..cddfccdb0a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190914" +PI_BUILD="190915" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index bf810ad5b6..794960a6b5 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190914} +{190915} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 1e1036f069..6dec9ff4f6 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190914)") +#define PANDORA_VERSION ("7.0NG.738(Build 190915)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a98b893eab..d9aacc7db2 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190914))" + VALUE "ProductVersion", "(7.0NG.738(Build 190915))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e0d41216ad..514162ac90 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190914 +Version: 7.0NG.738-190915 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 6ab8fde37b..da342d2b91 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190914" +pandora_version="7.0NG.738-190915" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index cfe4e4063d..2b33a7df96 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190914'; +$build_version = 'PC190915'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 127bd589ea..ef90cd4bf0 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 695ea38cda..b523ca4c62 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190914 +%define release 190915 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 48156ccb9d..ed6c88b01b 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190914 +%define release 190915 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 9985baa24e..90e64b0eff 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190914" +PI_BUILD="190915" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 60d09cabcd..a667e34dc8 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190914"; +my $version = "7.0NG.738 PS190915"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 980036a448..f0ca781da1 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190914"; +my $version = "7.0NG.738 PS190915"; # save program name for logging my $progname = basename($0); From 2e121e2cc5b3a2f9fdf5b18d13c81e2293c78945 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 16 Sep 2019 00:01:08 +0200 Subject: [PATCH 262/262] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 577fe45e78..1a4e8a2121 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190915 +Version: 7.0NG.738-190916 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 6d85610008..5ebc768ca9 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190915" +pandora_version="7.0NG.738-190916" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index cc44f924b1..42a6fb38d8 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190915'; +use constant AGENT_BUILD => '190916'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 8b14a01bf2..8cf4666656 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190915 +%define release 190916 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index c7b5f8babe..6af72cc966 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190915 +%define release 190916 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index cddfccdb0a..e51d9cb3d1 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190915" +PI_BUILD="190916" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 794960a6b5..e01ce765e0 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190915} +{190916} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 6dec9ff4f6..88a69124af 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190915)") +#define PANDORA_VERSION ("7.0NG.738(Build 190916)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d9aacc7db2..f67a031fae 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190915))" + VALUE "ProductVersion", "(7.0NG.738(Build 190916))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 514162ac90..c6757cd683 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190915 +Version: 7.0NG.738-190916 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index da342d2b91..8bd5474f4e 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190915" +pandora_version="7.0NG.738-190916" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 2b33a7df96..fde2c962c9 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190915'; +$build_version = 'PC190916'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ef90cd4bf0..f5dab45f3c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index b523ca4c62..49646f1c6a 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190915 +%define release 190916 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index ed6c88b01b..d5e6b4bc70 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190915 +%define release 190916 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 90e64b0eff..c79790daca 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190915" +PI_BUILD="190916" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a667e34dc8..70a1628e97 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190915"; +my $version = "7.0NG.738 PS190916"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f0ca781da1..04b3ab222c 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190915"; +my $version = "7.0NG.738 PS190916"; # save program name for logging my $progname = basename($0);