From 8898340b780023bd83a85ecdbce166c3630d37b5 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 25 May 2020 18:49:28 +0200 Subject: [PATCH 01/18] Comparison values max_execution_time --- pandora_console/include/class/ConsoleSupervisor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 77a6388df2..5964a6c9f9 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -1349,7 +1349,7 @@ class ConsoleSupervisor $this->cleanNotifications('NOTIF.PHP.INPUT_TIME'); } - if ($PHPmax_execution_time !== '0') { + if ((int) $PHPmax_execution_time !== 0) { $url = 'http://php.net/manual/en/info.configuration.php#ini.max-execution-time'; if ($config['language'] == 'es') { $url = 'http://php.net/manual/es/info.configuration.php#ini.max-execution-time'; From 8abd447af1ed4bfdf3115b730a1cfcb78ae1dc57 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Wed, 27 May 2020 16:11:48 +0200 Subject: [PATCH 02/18] minor fix in snmp browser --- .../include/javascript/pandora_snmp_browser.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pandora_console/include/javascript/pandora_snmp_browser.js b/pandora_console/include/javascript/pandora_snmp_browser.js index ef746aa5f4..38864e2bf4 100644 --- a/pandora_console/include/javascript/pandora_snmp_browser.js +++ b/pandora_console/include/javascript/pandora_snmp_browser.js @@ -625,6 +625,20 @@ function snmp_browser_create_modules(module_target, return_post = true) { ); $("input[name=create_modules_" + module_target + "]").addClass("sub spinn"); + $("#dialog_error").on("dialogclose", function(event) { + $("input[name=create_modules_" + module_target + "]").removeClass( + "sub spinn" + ); + $("input[name=create_modules_" + module_target + "]").addClass("sub add"); + }); + + $("#dialog_success").on("dialogclose", function(event) { + $("input[name=create_modules_" + module_target + "]").removeClass( + "sub spinn" + ); + $("input[name=create_modules_" + module_target + "]").addClass("sub add"); + }); + $.ajax({ method: "post", url: "ajax.php", From 6ba1a272745ad4e5e9a9b3d2d99f69ab3d2e0a0d Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Wed, 27 May 2020 18:51:25 +0200 Subject: [PATCH 03/18] added error to dialog submission when no agents or policies have been selected --- .../include/ajax/snmp_browser.ajax.php | 16 +++++++ .../operation/snmpconsole/snmp_browser.php | 45 +++++++++++++------ 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/pandora_console/include/ajax/snmp_browser.ajax.php b/pandora_console/include/ajax/snmp_browser.ajax.php index 5eaa01d659..3ef830fe09 100644 --- a/pandora_console/include/ajax/snmp_browser.ajax.php +++ b/pandora_console/include/ajax/snmp_browser.ajax.php @@ -112,6 +112,17 @@ if (is_ajax()) { $output .= ''; $output .= ''; + // Dialog no agent selected. + $output .= ''; + echo $output; } @@ -158,6 +169,11 @@ if (is_ajax()) { $id_target = explode(',', $id_items[0]); } + if (empty($id_items[0])) { + echo json_encode([0 => -1]); + exit; + } + $snmp_extradata = get_parameter('snmp_extradata', ''); if (!is_array($snmp_extradata)) { diff --git a/pandora_console/operation/snmpconsole/snmp_browser.php b/pandora_console/operation/snmpconsole/snmp_browser.php index 8db508da27..5b7dc97a63 100644 --- a/pandora_console/operation/snmpconsole/snmp_browser.php +++ b/pandora_console/operation/snmpconsole/snmp_browser.php @@ -241,20 +241,37 @@ function snmp_show_result_message(data) { if (dato.length !== 0) { $("#error_text").text(""); - dato.forEach(function (valor, indice, array) { - $("#error_text").append("
" + valor); - }); - $("#dialog_error").dialog({ - resizable: true, - draggable: true, - modal: true, - height: 300, - width: 500, - overlay: { - opacity: 0.5, - background: "black" - } - }); + if (dato[0] ===- 1) { + $("#dialog_no_agents_selected").dialog({ + resizable: true, + draggable: true, + modal: true, + height: 300, + width: 500, + overlay: { + opacity: 0.5, + background: "black" + } + }); + } else { + $("#error_text").text(""); + + dato.forEach(function (valor, indice, array) { + $("#error_text").append("
" + valor); + }); + $("#dialog_error").dialog({ + resizable: true, + draggable: true, + modal: true, + height: 300, + width: 500, + overlay: { + opacity: 0.5, + background: "black" + } + }); + } + } else { $("#dialog_success").dialog({ resizable: true, From 6157030cff2c336aeaf29979c00940315f70df9a Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Wed, 27 May 2020 18:52:50 +0200 Subject: [PATCH 04/18] added error to dialog submission when no agents or policies have been selected --- pandora_console/operation/snmpconsole/snmp_browser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/snmpconsole/snmp_browser.php b/pandora_console/operation/snmpconsole/snmp_browser.php index 5b7dc97a63..0a5e2266e7 100644 --- a/pandora_console/operation/snmpconsole/snmp_browser.php +++ b/pandora_console/operation/snmpconsole/snmp_browser.php @@ -241,7 +241,7 @@ function snmp_show_result_message(data) { if (dato.length !== 0) { $("#error_text").text(""); - if (dato[0] ===- 1) { + if (dato[0] === -1) { $("#dialog_no_agents_selected").dialog({ resizable: true, draggable: true, From 476ebe70a70cf5af7427b7a8f2f5c4484d0ec0d6 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Thu, 28 May 2020 14:47:36 +0200 Subject: [PATCH 05/18] fixes in reports front page default setup --- .../godmode/setup/setup_visuals.php | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 58e31d7edd..733e2f666e 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1093,7 +1093,7 @@ $row++; } } - // Logo + // Logo. $table_report->data['custom_report_front-logo'][0] = __('Custom report front').' - '.__('Custom logo').ui_print_help_tip( __("The dir of custom logos is in your www Console in 'images/custom_logo'. You can upload more files (ONLY JPEG AND PNG) in upload tool in console."), true @@ -1107,7 +1107,7 @@ $row++; '', true ); - // Preview + // Preview. $table_report->data['custom_report_front-preview'][0] = __('Custom report front').' - '.'Preview'; if (empty($config['custom_report_front_logo'])) { $config['custom_report_front_logo'] = 'images/pandora_logo_white.jpg'; @@ -1115,23 +1115,32 @@ $row++; $table_report->data['custom_report_front-preview'][1] = ''.html_print_image($config['custom_report_front_logo'], true).''; - // Header + // Header. $table_report->data['custom_report_front-header'][0] = __('Custom report front').' - '.__('Header'); + + // Do not remove io_safe_output in textarea. TinyMCE avoids XSS injection. $table_report->data['custom_report_front-header'][1] = html_print_textarea( 'custom_report_front_header', 5, 15, - $config['custom_report_front_header'], + io_safe_output($config['custom_report_front_header']), 'style="width: 38em;"', true ); - // First page + // First page. + // Do not remove io_safe_output in textarea. TinyMCE avoids XSS injection. + if ($config['custom_report_front']) { + $firstpage_content = $config['custom_report_front_firstpage']; + } else { + $firstpage_content = io_safe_output($config['custom_report_front_firstpage']); + } + $table_report->data['custom_report_front-first_page'][0] = __('Custom report front').' - '.__('First page'); $custom_report_front_firstpage = str_replace( '(_URLIMAGE_)', ui_get_full_url(false, true, false, false), - $config['custom_report_front_firstpage'] + io_safe_output($firstpage_content) ); $table_report->data['custom_report_front-first_page'][1] = html_print_textarea( 'custom_report_front_firstpage', @@ -1142,13 +1151,15 @@ $row++; true ); - // Footer + // Footer. $table_report->data['custom_report_front-footer'][0] = __('Custom report front').' - '.__('Footer'); + + // Do not remove io_safe_output in textarea. TinyMCE avoids XSS injection. $table_report->data['custom_report_front-footer'][1] = html_print_textarea( 'custom_report_front_footer', 5, 15, - $config['custom_report_front_footer'], + io_safe_output($config['custom_report_front_footer']), 'style="width: 38em;"', true ); From 09672921cea6a87ac073e66fdb67265e04224ea8 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Thu, 28 May 2020 16:47:27 +0200 Subject: [PATCH 06/18] removed overflow property --- .../operation/visual_console/legacy_public_view.php | 1 - pandora_console/operation/visual_console/legacy_view.php | 1 - pandora_console/operation/visual_console/view.php | 7 ++++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/visual_console/legacy_public_view.php b/pandora_console/operation/visual_console/legacy_public_view.php index 4a316eee60..0d678e8970 100644 --- a/pandora_console/operation/visual_console/legacy_public_view.php +++ b/pandora_console/operation/visual_console/legacy_public_view.php @@ -196,7 +196,6 @@ $ignored_params['refr'] = ''; $('body').css('background-color',''); $('body').css('margin','0'); - $('body').css('overflow','hidden'); $(".module_graph .menu_graph").css('display','none'); $(".parent_graph").each(function(){ diff --git a/pandora_console/operation/visual_console/legacy_view.php b/pandora_console/operation/visual_console/legacy_view.php index d81f9b0f6e..f0928e15e3 100644 --- a/pandora_console/operation/visual_console/legacy_view.php +++ b/pandora_console/operation/visual_console/legacy_view.php @@ -250,7 +250,6 @@ if ($config['pure']) { body.pure { min-height: 100px; margin: 0px; - overflow: hidden; height: 100%; ; } @@ -500,6 +499,12 @@ ui_require_css_file('form'); return item; }); +console.log(container); +console.log(props, true); +console.log(items, true); +console.log(baseUrl, true); +console.log(handleUpdate); + var visualConsoleManager = createVisualConsole( container, props, From f9b2d8ed40062a35e6ffdc0590030e53c4fb9601 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Thu, 28 May 2020 16:48:46 +0200 Subject: [PATCH 07/18] removed overflow property --- pandora_console/operation/visual_console/view.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pandora_console/operation/visual_console/view.php b/pandora_console/operation/visual_console/view.php index 6556bf9c4d..312b100391 100644 --- a/pandora_console/operation/visual_console/view.php +++ b/pandora_console/operation/visual_console/view.php @@ -499,12 +499,6 @@ ui_require_css_file('form'); return item; }); -console.log(container); -console.log(props, true); -console.log(items, true); -console.log(baseUrl, true); -console.log(handleUpdate); - var visualConsoleManager = createVisualConsole( container, props, From aa0a78311246a9e75ad7af849dd6cfe7fdfcad33 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Thu, 28 May 2020 17:03:10 +0200 Subject: [PATCH 08/18] Remove visual console mobile --- pandora_console/mobile/index.php | 10 ---------- pandora_console/mobile/operation/home.php | 14 +------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index 28a934369f..71b6db82ac 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -349,16 +349,6 @@ switch ($action) { $agent = new Agent(); $agent->show(); break; - - case 'visualmaps': - $visualmaps = new Visualmaps(); - $visualmaps->show(); - break; - - case 'visualmap': - $visualmap = new Visualmap(); - $visualmap->show(); - break; } break; } diff --git a/pandora_console/mobile/operation/home.php b/pandora_console/mobile/operation/home.php index 11213e88eb..b172d16021 100644 --- a/pandora_console/mobile/operation/home.php +++ b/pandora_console/mobile/operation/home.php @@ -80,14 +80,8 @@ class Home 'menu_item' => true, 'icon' => 'modules', ]; - $items['visualmaps'] = [ - 'name' => __('Visual consoles'), - 'filename' => 'visualmaps.php', - 'menu_item' => true, - 'icon' => 'visual_console', - ]; - // Not in home + // Not in home. $items['agent'] = [ 'name' => __('Agent'), 'filename' => 'agent.php', @@ -100,12 +94,6 @@ class Home 'menu_item' => false, 'icon' => '', ]; - $items['visualmap'] = [ - 'name' => __('Visualmap'), - 'filename' => 'visualmap.php', - 'menu_item' => false, - 'icon' => '', - ]; } $this->pagesItems = $items; From 720a2dcfc931f98c1d4a992610a165b56fb3892b Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 29 May 2020 12:27:32 +0200 Subject: [PATCH 09/18] Fixed warning_alert status --- .../include/functions_visual_map.php | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 2cddd5d8c0..bcb5f1ce60 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -3220,13 +3220,9 @@ function visual_map_get_image_status_element($layoutData, $status=false) switch ($status) { case 1: - // Critical (BAD). - $img .= '_bad.png'; - break; - case 4: - // Critical (ALERT). - $img = '4'.$img.'_bad.png'; + // Critical or critical alert (BAD). + $img .= '_bad.png'; break; case 0: @@ -3235,13 +3231,9 @@ function visual_map_get_image_status_element($layoutData, $status=false) break; case 2: - // Warning. - $img .= '_warning.png'; - break; - case 10: - // Warning (ALERT). - $img = '4'.$img.'_warning.png'; + // Warning or warning alert. + $img .= '_warning.png'; break; case 3: @@ -4079,6 +4071,7 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0) case 'default': $num_items_critical_alert = $num_elements_by_status[VISUAL_MAP_STATUS_CRITICAL_ALERT]; $num_items_critical = $num_elements_by_status[VISUAL_MAP_STATUS_CRITICAL_BAD]; + $num_items_warning_alert = $num_elements_by_status[VISUAL_MAP_STATUS_WARNING_ALERT]; $num_items_warning = $num_elements_by_status[VISUAL_MAP_STATUS_WARNING]; $num_items_unknown = $num_elements_by_status[VISUAL_MAP_STATUS_UNKNOWN]; @@ -4086,6 +4079,8 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0) return VISUAL_MAP_STATUS_CRITICAL_ALERT; } else if ($num_items_critical > 0) { return VISUAL_MAP_STATUS_CRITICAL_BAD; + } else if ($num_items_warning_alert > 0) { + return VISUAL_MAP_STATUS_WARNING_ALERT; } else if ($num_items_warning > 0) { return VISUAL_MAP_STATUS_WARNING; } else if ($num_items_unknown > 0) { @@ -4099,17 +4094,18 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0) $num_items = count($valid_layout_items); $num_items_critical_alert = $num_elements_by_status[VISUAL_MAP_STATUS_CRITICAL_ALERT]; $num_items_critical = $num_elements_by_status[VISUAL_MAP_STATUS_CRITICAL_BAD]; + $num_items_warning_alert = $num_elements_by_status[VISUAL_MAP_STATUS_WARNING_ALERT]; $num_items_warning = $num_elements_by_status[VISUAL_MAP_STATUS_WARNING]; $num_items_unknown = $num_elements_by_status[VISUAL_MAP_STATUS_UNKNOWN]; - if ($num_items_critical > 0 + if (($num_items_critical > 0 || $num_items_critical_alert > 0) && ((($num_items_critical_alert + $num_items_critical) * 100) / $num_items) >= $weight ) { return ($num_items_critical_alert > 0) ? VISUAL_MAP_STATUS_CRITICAL_ALERT : VISUAL_MAP_STATUS_CRITICAL_BAD; - } else if ($num_items_warning > 0 - && (($num_items_warning * 100) / $num_items) >= $weight + } else if (($num_items_warning > 0 || $num_items_warning_alert > 0) + && (($num_items_warning_alert + $num_items_warning * 100) / $num_items) >= $weight ) { - return VISUAL_MAP_STATUS_WARNING; + return ($num_items_warning_alert > 0) ? VISUAL_MAP_STATUS_WARNING_ALERT : VISUAL_MAP_STATUS_WARNING; } else if ($num_items_unknown > 0 && (($num_items_unknown * 100) / $num_items) >= $weight ) { @@ -4123,9 +4119,12 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0) $num_items_critical = ($num_elements_by_status[VISUAL_MAP_STATUS_CRITICAL_BAD] + $num_elements_by_status[VISUAL_MAP_STATUS_CRITICAL_ALERT]); $critical_percentage = (($num_items_critical * 100) / count($valid_layout_items)); - if ($critical_percentage >= $status_data['linked_layout_status_as_service_critical']) { + $num_items_warning = ($num_elements_by_status[VISUAL_MAP_STATUS_WARNING] + $num_elements_by_status[VISUAL_MAP_STATUS_WARNING_ALERT]); + $warning_percentage = (($num_items_warning * 100) / count($valid_layout_items)); + + if ($critical_percentage >= $status_data['linked_layout_status_as_service_critical'] && $critical_percentage !== 0) { return VISUAL_MAP_STATUS_CRITICAL_BAD; - } else if ($critical_percentage >= $status_data['linked_layout_status_as_service_warning']) { + } else if ($critical_percentage >= $status_data['linked_layout_status_as_service_warning'] && $warning_percentage !== 0) { return VISUAL_MAP_STATUS_WARNING; } else { return VISUAL_MAP_STATUS_NORMAL; From 0a6f16a40ebc3f272b50946bf52f4137e5ca535d Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 3 Jun 2020 14:01:08 +0200 Subject: [PATCH 10/18] Improved coment --- pandora_console/include/functions_io.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_io.php b/pandora_console/include/functions_io.php index f0e2037cf2..6390f78f96 100755 --- a/pandora_console/include/functions_io.php +++ b/pandora_console/include/functions_io.php @@ -217,8 +217,8 @@ function io_safe_output_array(&$item, $key=false, $utf8=true) * plain ascii file, to render to console, or to put in any kind of data field * who doesn't make the HTML render by itself. * - * @param mixed String or array of strings to be cleaned. - * @param boolean $utf8 Flag, set the output encoding in utf8, by default true. + * @param string|array $value String or array of strings to be cleaned. + * @param boolean $utf8 Flag, set the output encoding in utf8, by default true. * * @return unknown_type */ From e7424176eae3703e6742f5ee61034855f19878fa Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Fri, 19 Jun 2020 12:01:20 +0200 Subject: [PATCH 11/18] fix clippy help in meta --- pandora_console/include/functions_clippy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_clippy.php b/pandora_console/include/functions_clippy.php index 67999a75e0..27e3e4cd80 100644 --- a/pandora_console/include/functions_clippy.php +++ b/pandora_console/include/functions_clippy.php @@ -285,7 +285,7 @@ function clippy_context_help($help=null) $return = ''; - include_once 'include/help/clippy/'.$help.'.php'; + include_once $config['homedir'].'/include/help/clippy/'.$help.'.php'; ob_start(); $function = 'clippy_'.$help; From ff8a41ae683b7702f7ce985cd5a342c225ceb38c Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 22 Jun 2020 17:33:21 +0200 Subject: [PATCH 12/18] Fixed data compaction in proc modules --- pandora_server/util/pandora_db.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f9b38d0925..a94f8bb358 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -478,7 +478,7 @@ sub pandora_compactdb ($$) { $limit_utime = $conf->{'_last_compact'}; } - if ($start_utime <= $limit_utime) { + if ($start_utime <= $limit_utime || ( defined ($conf->{'_last_compact'}) && (($conf->{'_last_compact'} + 24 * 60 * 60) > $start_utime))) { log_message ('COMPACT', "Data already compacted."); return; } @@ -512,7 +512,7 @@ sub pandora_compactdb ($$) { next unless defined ($module_type); # Mark proc modules. - if ($module_type == 2 || $module_type == 6 || $module_type == 9 || $module_type == 18 || $module_type == 21 || $module_type == 31) { + if ($module_type == 2 || $module_type == 6 || $module_type == 9 || $module_type == 18 || $module_type == 21 || $module_type == 31 || $module_type == 35 || $module_type == 100) { $module_proc_hash{$id_module} = 1; } else { @@ -537,7 +537,9 @@ sub pandora_compactdb ($$) { } # Delete interval from the database - db_do ($dbh, 'DELETE FROM tagente_datos WHERE utimestamp < ? AND utimestamp >= ?', $start_utime, $stop_utime); + db_do ($dbh, 'DELETE ad FROM tagente_datos ad + INNER JOIN tagente_modulo am ON ad.id_agente_modulo = am.id_agente_modulo AND am.id_tipo_modulo NOT IN (2,6,9,18,21,31,35,100) + WHERE ad.utimestamp < ? AND ad.utimestamp >= ?', $start_utime, $stop_utime); # Insert interval average value foreach my $key (keys(%value_hash)) { From 682f4eebf93f2949fff218046223eb4f67189ce4 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 23 Jun 2020 01:00:17 +0200 Subject: [PATCH 13/18] 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 03fcbf0332..2ac59fc8d8 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.746-200622 +Version: 7.0NG.746-200623 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 5a75da21c7..50bca46312 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.746-200622" +pandora_version="7.0NG.746-200623" 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 8c70c57e85..7488696c43 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.746'; -use constant AGENT_BUILD => '200622'; +use constant AGENT_BUILD => '200623'; # 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 e11d39b7e1..b08bc3d1fb 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.746 -%define release 200622 +%define release 200623 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 229c3fd536..1659722628 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.746 -%define release 200622 +%define release 200623 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 f02cf024c8..41c8150c9b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.746" -PI_BUILD="200622" +PI_BUILD="200623" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 00951f4a96..b7ba3ced8d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200622} +{200623} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index c5fbd46d26..99bda65375 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.746(Build 200622)") +#define PANDORA_VERSION ("7.0NG.746(Build 200623)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 075fbd56e3..2e2b2cfbf8 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.746(Build 200622))" + VALUE "ProductVersion", "(7.0NG.746(Build 200623))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index ec9fc3a9ae..9653ced84e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.746-200622 +Version: 7.0NG.746-200623 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 913609eed8..2f571587ef 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.746-200622" +pandora_version="7.0NG.746-200623" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 3add69b07d..abbb243e67 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 = 'PC200622'; +$build_version = 'PC200623'; $pandora_version = 'v7.0NG.746'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ddab2437cd..b0da156f8b 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 5f4f8581a9..4837306594 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.746 -%define release 200622 +%define release 200623 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 90f0795a8f..0e3654e56c 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.746 -%define release 200622 +%define release 200623 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index d4e0e92eff..f1c38723bf 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.746" -PI_BUILD="200622" +PI_BUILD="200623" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f9b38d0925..8e0063d845 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.746 PS200622"; +my $version = "7.0NG.746 PS200623"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 92af030bbd..09a9c82507 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.746 PS200622"; +my $version = "7.0NG.746 PS200623"; # save program name for logging my $progname = basename($0); From 584b19cc850f639d2c2069b1b11baf9dca041bdc Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Tue, 23 Jun 2020 14:23:14 +0200 Subject: [PATCH 14/18] fix load spinner on close --- pandora_console/operation/snmpconsole/snmp_browser.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/operation/snmpconsole/snmp_browser.php b/pandora_console/operation/snmpconsole/snmp_browser.php index 0a5e2266e7..fd0067f24f 100644 --- a/pandora_console/operation/snmpconsole/snmp_browser.php +++ b/pandora_console/operation/snmpconsole/snmp_browser.php @@ -248,6 +248,10 @@ function snmp_show_result_message(data) { modal: true, height: 300, width: 500, + close: function(e, ui) { + $("input[name=create_modules_network_component]").removeClass("sub spinn"); + $("input[name=create_modules_network_component]").addClass("sub add"); + }, overlay: { opacity: 0.5, background: "black" From 549a17a4287f8e940a4b85d4047ac8bd2505ef0a Mon Sep 17 00:00:00 2001 From: Manuel Montes Date: Tue, 23 Jun 2020 14:45:04 +0200 Subject: [PATCH 15/18] Ent 5470 se duplican los sistemas operativos --- pandora_console/godmode/setup/os.list.php | 4 +- pandora_console/godmode/setup/os.php | 72 ++++++++++++++++++++--- 2 files changed, 67 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/setup/os.list.php b/pandora_console/godmode/setup/os.list.php index 07365edc6c..ebd368a82a 100644 --- a/pandora_console/godmode/setup/os.list.php +++ b/pandora_console/godmode/setup/os.list.php @@ -83,9 +83,9 @@ foreach ($osList as $os) { } if (isset($data)) { - ui_pagination($count_osList, false, $offset); + ui_pagination($count_osList, ui_get_url_refresh(['message' => false]), $offset); html_print_table($table); - ui_pagination($count_osList, false, $offset, 0, false, 'offset', true, 'pagination-bottom'); + ui_pagination($count_osList, ui_get_url_refresh(['message' => false]), $offset, 0, false, 'offset', true, 'pagination-bottom'); } else { ui_print_info_message(['no_close' => true, 'message' => __('There are no defined operating systems') ]); } diff --git a/pandora_console/godmode/setup/os.php b/pandora_console/godmode/setup/os.php index aa0bd2dd13..1f8694aa32 100644 --- a/pandora_console/godmode/setup/os.php +++ b/pandora_console/godmode/setup/os.php @@ -24,6 +24,7 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user $action = get_parameter('action', 'new'); $idOS = get_parameter('id_os', 0); +$id_message = get_parameter('message', 0); if (is_metaconsole()) { $tab = get_parameter('tab2', 'list'); } else { @@ -50,6 +51,7 @@ switch ($action) { $textButton = __('Create'); $classButton = 'class="sub next"'; break; + case 'edit': $actionHidden = 'update'; $textButton = __('Update'); @@ -71,15 +73,22 @@ switch ($action) { } if ($resultOrId === false) { - $message = ui_print_error_message(__('Fail creating OS'), '', true); + $message = 2; $tab = 'builder'; $actionHidden = 'save'; $textButton = __('Create'); $classButton = 'class="sub next"'; } else { - $message = ui_print_success_message(__('Success creating OS'), '', true); $tab = 'list'; + $message = 1; } + + if (is_metaconsole()) { + header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2='.$tab.'&message='.$message); + } else { + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); + } + break; case 'update': @@ -100,10 +109,11 @@ switch ($action) { $result = db_process_sql_update('tconfig_os', $values, ['id_os' => $idOS]); } - $message = ui_print_result_message($result, __('Success updatng OS'), __('Error updating OS'), '', true); if ($result !== false) { + $message = 3; $tab = 'list'; } else { + $message = 4; $tab = 'builder'; $os = db_get_row_filter('tconfig_os', ['id_os' => $idOS]); $name = $os['name']; @@ -112,6 +122,11 @@ switch ($action) { $actionHidden = 'update'; $textButton = __('Update'); $classButton = 'class="sub upd"'; + if (is_metaconsole()) { + header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2='.$tab.'&message='.$message); + } else { + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); + } break; case 'delete': @@ -120,11 +135,20 @@ switch ($action) { $count = $count[0]['count']; if ($count > 0) { - $message = ui_print_error_message(__('There are agents with this OS.'), '', true); + $message = 5; } else { $result = (bool) db_process_sql_delete('tconfig_os', ['id_os' => $idOS]); + if ($result) { + $message = 6; + } else { + $message = 7; + } + } - $message = ui_print_result_message($result, __('Success deleting'), __('Error deleting'), '', true); + if (is_metaconsole()) { + header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2='.$tab.'&message='.$message); + } else { + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); } break; } @@ -143,11 +167,45 @@ $buttons = [ $buttons[$tab]['active'] = true; if (!is_metaconsole()) { - // Header + // Header. ui_print_page_header(__('Edit OS'), '', false, '', true, $buttons); } -echo $message; +if (!empty($id_message)) { + switch ($id_message) { + case 1: + echo ui_print_success_message(__('Success creating OS'), '', true); + break; + + case 2: + echo ui_print_error_message(__('Fail creating OS'), '', true); + break; + + case 3: + echo ui_print_success_message(__('Success updating OS'), '', true); + break; + + case 4: + echo ui_print_error_message(__('Error updating OS'), '', true); + break; + + case 5: + echo ui_print_error_message(__('There are agents with this OS.'), '', true); + break; + + case 6: + echo ui_print_success_message(__('Success deleting'), '', true); + break; + + case 7: + echo ui_print_error_message(__('Error deleting'), '', true); + break; + + default: + // Default. + break; + } +} switch ($tab) { case 'list': From b40b98fc545e555c33ad671d4b289b4aa5377a83 Mon Sep 17 00:00:00 2001 From: Luis Date: Tue, 23 Jun 2020 14:46:22 +0200 Subject: [PATCH 16/18] Added type to SNMP browser module creation --- .../include/ajax/snmp_browser.ajax.php | 1 + pandora_console/include/functions_snmp.php | 58 +++++++++++++++++++ .../include/functions_snmp_browser.php | 15 ++++- 3 files changed, 71 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/ajax/snmp_browser.ajax.php b/pandora_console/include/ajax/snmp_browser.ajax.php index 5eaa01d659..858875c624 100644 --- a/pandora_console/include/ajax/snmp_browser.ajax.php +++ b/pandora_console/include/ajax/snmp_browser.ajax.php @@ -13,6 +13,7 @@ // GNU General Public License for more details. require_once $config['homedir'].'/include/functions_config.php'; require_once $config['homedir'].'/include/functions_snmp_browser.php'; +require_once $config['homedir'].'/include/functions_snmp.php'; require_once $config['homedir'].'/include/functions_network_components.php'; diff --git a/pandora_console/include/functions_snmp.php b/pandora_console/include/functions_snmp.php index 274deed82a..40dfc2764a 100644 --- a/pandora_console/include/functions_snmp.php +++ b/pandora_console/include/functions_snmp.php @@ -455,3 +455,61 @@ function print_snmp_tags_active_filters($filter_resume=[]) ui_print_tags_view($title, $tags_set); } } + + +/** + * Retunr module type for snmp data type + * + * @param [type] $snmp_data_type + * @return void + */ +function snmp_module_get_type(string $snmp_data_type) +{ + if (preg_match('/INTEGER/i', $snmp_data_type)) { + $type = 'remote_snmp'; + } else if (preg_match('/Integer32/i', $snmp_data_type)) { + $type = 'remote_snmp'; + } else if (preg_match('/octect string/i', $snmp_data_type)) { + $type = 'remote_snmp'; + } else if (preg_match('/bits/i', $snmp_data_type)) { + $type = 'remote_snmp'; + } else if (preg_match('/object identifier/i', $snmp_data_type)) { + $type = 'remote_snmp_string'; + } else if (preg_match('/IpAddress/i', $snmp_data_type)) { + $type = 'remote_snmp_string'; + } else if (preg_match('/Counter/i', $snmp_data_type)) { + $type = 'remote_snmp_inc'; + } else if (preg_match('/Counter32/i', $snmp_data_type)) { + $type = 'remote_snmp_inc'; + } else if (preg_match('/Gauge/i', $snmp_data_type)) { + $type = 'remote_snmp'; + } else if (preg_match('/Gauge32/i', $snmp_data_type)) { + $type = 'remote_snmp'; + } else if (preg_match('/Gauge64/i', $snmp_data_type)) { + $type = 'remote_snmp'; + } else if (preg_match('/Unsigned32/i', $snmp_data_type)) { + $type = 'remote_snmp_inc'; + } else if (preg_match('/TimeTicks/i', $snmp_data_type)) { + $type = 'remote_snmp'; + } else if (preg_match('/Opaque/i', $snmp_data_type)) { + $type = 'remote_snmp_string'; + } else if (preg_match('/Counter64/i', $snmp_data_type)) { + $type = 'remote_snmp_inc'; + } else if (preg_match('/UInteger32/i', $snmp_data_type)) { + $type = 'remote_snmp'; + } else if (preg_match('/BIT STRING/i', $snmp_data_type)) { + $type = 'remote_snmp_string'; + } else if (preg_match('/STRING/i', $snmp_data_type)) { + $type = 'remote_snmp_string'; + } else { + $type = 'remote_snmp_string'; + } + + if (!$type) { + $type = 'remote_snmp'; + } + + $type_id = modules_get_type_id($type); + + return $type_id; +} diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index 35e56e27b8..512cafbeb5 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -945,6 +945,12 @@ function snmp_browser_create_modules_snmp(string $module_target, array $snmp_val $description = io_safe_input(preg_replace('/\s+/', ' ', $oid['description'])); } + if (!empty($oid['type'])) { + $module_type = snmp_module_get_type($oid['type']); + } else { + $module_type = 17; + } + if ($module_target == 'network_component') { $name_check = db_get_value( 'name', @@ -956,7 +962,7 @@ function snmp_browser_create_modules_snmp(string $module_target, array $snmp_val if (!$name_check) { $id = network_components_create_network_component( $oid['oid'], - 17, + $module_type, 1, [ 'description' => $description, @@ -1009,12 +1015,13 @@ function snmp_browser_create_modules_snmp(string $module_target, array $snmp_val 'min_ff_event_critical' => 0, 'ff_type' => 0, 'each_ff' => 0, + 'history_data' => 1, ] ); } } else if ($module_target == 'agent') { $values = [ - 'id_tipo_modulo' => 17, + 'id_tipo_modulo' => $module_type, 'descripcion' => $description, 'module_interval' => 300, 'max' => 0, @@ -1065,6 +1072,7 @@ function snmp_browser_create_modules_snmp(string $module_target, array $snmp_val 'ff_type' => 0, 'each_ff' => 0, 'ip_target' => $target_ip, + 'history_data' => 1, ]; foreach ($id_target as $agent) { $ids[] = modules_create_agent_module($agent, $oid['oid'], $values); @@ -1073,7 +1081,7 @@ function snmp_browser_create_modules_snmp(string $module_target, array $snmp_val // Policies only in enterprise version. if (enterprise_installed()) { $values = [ - 'id_tipo_modulo' => 17, + 'id_tipo_modulo' => $module_type, 'description' => $description, 'module_interval' => 300, 'max' => 0, @@ -1123,6 +1131,7 @@ function snmp_browser_create_modules_snmp(string $module_target, array $snmp_val 'each_ff' => 0, 'ip_target' => $target_ip, 'configuration_data' => '', + 'history_data' => 1, ]; enterprise_include_once('include/functions_policies.php'); From 8748bd9e7292d921ddf428a4964b576e0913c05e Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 24 Jun 2020 01:00:18 +0200 Subject: [PATCH 17/18] 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 2ac59fc8d8..7c02643280 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.746-200623 +Version: 7.0NG.746-200624 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 50bca46312..aa139a38dd 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.746-200623" +pandora_version="7.0NG.746-200624" 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 7488696c43..606464c8ed 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.746'; -use constant AGENT_BUILD => '200623'; +use constant AGENT_BUILD => '200624'; # 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 b08bc3d1fb..1ce819c76a 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.746 -%define release 200623 +%define release 200624 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 1659722628..282f8a8b26 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.746 -%define release 200623 +%define release 200624 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 41c8150c9b..57b5f32c3e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.746" -PI_BUILD="200623" +PI_BUILD="200624" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b7ba3ced8d..95cdfcad96 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200623} +{200624} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 99bda65375..48b6f8d86c 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.746(Build 200623)") +#define PANDORA_VERSION ("7.0NG.746(Build 200624)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2e2b2cfbf8..81ae1f5b41 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.746(Build 200623))" + VALUE "ProductVersion", "(7.0NG.746(Build 200624))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9653ced84e..a81fe2204e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.746-200623 +Version: 7.0NG.746-200624 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 2f571587ef..6e132326a8 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.746-200623" +pandora_version="7.0NG.746-200624" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index abbb243e67..4831f7935a 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 = 'PC200623'; +$build_version = 'PC200624'; $pandora_version = 'v7.0NG.746'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b0da156f8b..5d07472866 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 4837306594..22eb4fe83b 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.746 -%define release 200623 +%define release 200624 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 0e3654e56c..27ae9cdd32 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.746 -%define release 200623 +%define release 200624 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index f1c38723bf..fb4009883d 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.746" -PI_BUILD="200623" +PI_BUILD="200624" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 8e0063d845..818ecf2550 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.746 PS200623"; +my $version = "7.0NG.746 PS200624"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 09a9c82507..b8f6db53c7 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.746 PS200623"; +my $version = "7.0NG.746 PS200624"; # save program name for logging my $progname = basename($0); From 8735c8a95020a04a158500fa093a844e7bf2e446 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 25 Jun 2020 01:00:18 +0200 Subject: [PATCH 18/18] 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 7c02643280..950257315f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.746-200624 +Version: 7.0NG.746-200625 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 aa139a38dd..0c0153345c 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.746-200624" +pandora_version="7.0NG.746-200625" 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 606464c8ed..66ca581ff2 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.746'; -use constant AGENT_BUILD => '200624'; +use constant AGENT_BUILD => '200625'; # 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 1ce819c76a..74f1a5bd5f 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.746 -%define release 200624 +%define release 200625 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 282f8a8b26..b9a1401e04 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.746 -%define release 200624 +%define release 200625 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 57b5f32c3e..9243f4081e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.746" -PI_BUILD="200624" +PI_BUILD="200625" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 95cdfcad96..2641fccddd 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200624} +{200625} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 48b6f8d86c..b1aa8ff9e4 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.746(Build 200624)") +#define PANDORA_VERSION ("7.0NG.746(Build 200625)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 81ae1f5b41..3dfc3e821d 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.746(Build 200624))" + VALUE "ProductVersion", "(7.0NG.746(Build 200625))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a81fe2204e..5dc0d8d679 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.746-200624 +Version: 7.0NG.746-200625 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 6e132326a8..6803880d34 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.746-200624" +pandora_version="7.0NG.746-200625" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4831f7935a..4cb2130136 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 = 'PC200624'; +$build_version = 'PC200625'; $pandora_version = 'v7.0NG.746'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 5d07472866..8abef3359f 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 22eb4fe83b..53c4613959 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.746 -%define release 200624 +%define release 200625 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 27ae9cdd32..1f251f715e 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.746 -%define release 200624 +%define release 200625 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index fb4009883d..1e84f8fad6 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.746" -PI_BUILD="200624" +PI_BUILD="200625" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 25e2823279..48fb16258e 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.746 PS200624"; +my $version = "7.0NG.746 PS200625"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index b8f6db53c7..4db079457f 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.746 PS200624"; +my $version = "7.0NG.746 PS200625"; # save program name for logging my $progname = basename($0);