From 6632efb068c7825c5ca8b312ea5f9d1f8c36200a Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 31 Jul 2019 16:19:59 +0200 Subject: [PATCH 01/67] se queda el boton de editar en la misma liniea y la i no queda por debajo de la linea intervalo --- pandora_console/include/styles/agent_manager.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/styles/agent_manager.css b/pandora_console/include/styles/agent_manager.css index 8b3e0db4f7..534fc14bb7 100644 --- a/pandora_console/include/styles/agent_manager.css +++ b/pandora_console/include/styles/agent_manager.css @@ -26,7 +26,7 @@ } .agent_options_column_left { - padding-right: 50px; + padding-right: 60px; } .agent_qr { @@ -61,7 +61,7 @@ a#qr_code_agent_view { .first_row .agent_options_column_right select, .first_row .agent_options_column_right input, .first_row .agent_options_column_left select#grupo { - width: 95%; + width: 93%; box-sizing: border-box; } From b7009657f506f824a3d9ada9eb53073dc4b0d433 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 7 Aug 2019 10:32:00 +0200 Subject: [PATCH 02/67] fixed visual ID agent error --- pandora_console/godmode/agentes/agent_manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index c24478eeb6..383b81e9af 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -208,7 +208,7 @@ if (!$new_agent && $alias != '') { $table_agent_name = '

'.__('Agent name').': '.ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true).'

'; $table_agent_name .= '
'; $table_agent_name .= '
'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'
'; - $table_agent_name .= '
'; + $table_agent_name .= '
'; if ($id_agente) { $table_agent_name .= ''; From 313733d071f99700c5f569c5063a7c5cdc39b04b Mon Sep 17 00:00:00 2001 From: manuel Date: Fri, 25 Oct 2019 09:49:55 +0200 Subject: [PATCH 03/67] Fixed bug in CSV export --- pandora_console/include/functions_reporting.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 1d0355cf97..f4dd6bed69 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -4221,14 +4221,7 @@ function reporting_sql_graph( case 'data': $data = []; - foreach ($modules as $key => $value) { - $data[$value] = modules_get_agentmodule_data( - $value, - $content['period'], - $report['datetime'] - ); - } - + $data = db_get_all_rows_sql($content['external_source']); $return['chart'] = $data; break; } From a0f767ccc77f9a576f004f7bfd8164e36431f9af Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 18 Nov 2019 15:28:34 +0100 Subject: [PATCH 04/67] fixed module cron minute selectors --- pandora_console/include/functions_html.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index ab3aad9c7a..6a5d261e7d 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1178,8 +1178,13 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*', } // Minutes - for ($i = 0; $i < 60; $i += 5) { + for ($i = 0; $i < 60; $i++) { $minutes[$i] = $i; + + // If minute is not a multiple of 5, then add style to option in order to hide it from minute select but still is a valid value that input can adopt. We want this in case a value that is not a multiple of 5 is entered in module's data configuration. + if (($i % 5) != 0) { + $minutes_hidden_options[$i] = 'display: none;'; + } } // Month days @@ -1216,13 +1221,13 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*', if ($to) { $table->data[0][0] = html_print_select($hours, 'hour_to', $hour, '', __('Any'), '*', true, false, false, '', $disabled); - $table->data[0][1] = html_print_select($minutes, 'minute_to', $minute, '', __('Any'), '*', true, false, false, '', $disabled); + $table->data[0][1] = html_print_select($minutes, 'minute_to', $minute, '', __('Any'), '*', true, false, false, '', $disabled, false, $minutes_hidden_options); $table->data[0][2] = html_print_select($mdays, 'mday_to', $mday, '', __('Any'), '*', true, false, false, '', $disabled); $table->data[0][3] = html_print_select($months, 'month_to', $month, '', __('Any'), '*', true, false, false, '', $disabled); $table->data[0][4] = html_print_select($wdays, 'wday_to', $wday, '', __('Any'), '*', true, false, false, '', $disabled); } else { $table->data[0][0] = html_print_select($hours, 'hour_from', $hour, '', __('Any'), '*', true, false, false, '', $disabled); - $table->data[0][1] = html_print_select($minutes, 'minute_from', $minute, '', __('Any'), '*', true, false, false, '', $disabled); + $table->data[0][1] = html_print_select($minutes, 'minute_from', $minute, '', __('Any'), '*', true, false, false, '', $disabled, false, $minutes_hidden_options); $table->data[0][2] = html_print_select($mdays, 'mday_from', $mday, '', __('Any'), '*', true, false, false, '', $disabled); $table->data[0][3] = html_print_select($months, 'month_from', $month, '', __('Any'), '*', true, false, false, '', $disabled); $table->data[0][4] = html_print_select($wdays, 'wday_from', $wday, '', __('Any'), '*', true, false, false, '', $disabled); From 1640c03fc31bf1e012f32f00f10fd97cda8ca7fb Mon Sep 17 00:00:00 2001 From: marcos Date: Thu, 21 Nov 2019 16:42:39 +0100 Subject: [PATCH 05/67] first changes pandora.js to pandora_ui.js --- pandora_console/include/chart_generator.php | 2 + pandora_console/include/functions_ui.php | 8 +- pandora_console/include/javascript/pandora.js | 369 ---------------- .../include/javascript/pandora_ui.js | 417 ++++++++++++++++++ pandora_console/mobile/include/ui.class.php | 1 + .../operation/agentes/realtime_win.php | 1 + .../operation/agentes/stat_win.php | 1 + 7 files changed, 429 insertions(+), 370 deletions(-) create mode 100644 pandora_console/include/javascript/pandora_ui.js diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php index 0d1d138ae6..a8933b4e34 100644 --- a/pandora_console/include/chart_generator.php +++ b/pandora_console/include/chart_generator.php @@ -83,6 +83,7 @@ if (check_login(false) === false) { + @@ -140,6 +141,7 @@ if (file_exists('languages/'.$user_language.'.mo') === true) { + diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index a430f02fdc..bbde87d1f4 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1880,7 +1880,13 @@ function ui_process_page_head($string, $bitfield) } // Pandora specific JavaScript should go first. - $config['js'] = array_merge(['pandora' => 'include/javascript/pandora.js'], $config['js']); + $config['js'] = array_merge( + [ + 'pandora' => 'include/javascript/pandora.js', + 'pandora_ui' => 'include/javascript/pandora_ui.js', + ], + $config['js'] + ); // Load base64 javascript library. $config['js']['base64'] = 'include/javascript/encode_decode_base64.js'; // Load webchat javascript library. diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index c3ed855213..f01daf00b0 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1825,375 +1825,6 @@ function ellipsize(str, max, ellipse) { return str.trim().length > max ? str.substr(0, max).trim() + ellipse : str; } -/** - * Display a dialog with an image - * - * @param {string} icon_name The name of the icon you will display - * @param {string} icon_path The path to the icon - * @param {Object} incoming_options All options - * grayed: {bool} True to display the background black - * title {string} 'Logo preview' by default - */ -function logo_preview(icon_name, icon_path, incoming_options) { - // Get the options - options = { - grayed: false, - title: "Logo preview" - }; - $.extend(options, incoming_options); - - if (icon_name == "") return; - - $dialog = $("
"); - $image = $(''); - $image.css("max-width", "500px").css("max-height", "500px"); - - try { - $dialog - .hide() - .html($image) - .dialog({ - title: options.title, - resizable: true, - draggable: true, - modal: true, - dialogClass: options.grayed ? "dialog-grayed" : "", - overlay: { - opacity: 0.5, - background: "black" - }, - minHeight: 1, - width: $image.width, - close: function() { - $dialog.empty().remove(); - } - }) - .show(); - } catch (err) { - // console.log(err); - } -} - -// Advanced Form control. -function load_modal(settings) { - var AJAX_RUNNING = 0; - var data = new FormData(); - if (settings.extradata) { - settings.extradata.forEach(function(item) { - if (item.value != undefined) data.append(item.name, item.value); - }); - } - data.append("page", settings.onshow.page); - data.append("method", settings.onshow.method); - - var width = 630; - if (settings.onshow.width) { - width = settings.onshow.width; - } - - settings.target.html("Loading modal..."); - settings.target - .dialog({ - title: "Loading", - close: false, - width: 200, - buttons: [] - }) - .show(); - var required_buttons = []; - if (settings.modal.cancel != undefined) { - //The variable contains a function - // that is responsible for executing the method it receives from settings - // which confirms the closure of a modal - var cancelModal = function() { - settings.target.dialog("close"); - if (AJAX_RUNNING) return; - AJAX_RUNNING = 1; - var formdata = new FormData(); - - formdata.append("page", settings.oncancel.page); - formdata.append("method", settings.oncancel.method); - - $.ajax({ - method: "post", - url: settings.url, - processData: false, - contentType: false, - data: formdata, - success: function(data) { - if (typeof settings.oncancel.callback == "function") { - settings.oncancel.callback(data); - settings.target.dialog("close"); - } - AJAX_RUNNING = 0; - }, - error: function(data) { - // console.log(data); - AJAX_RUNNING = 0; - } - }); - }; - - required_buttons.push({ - class: - "ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel", - text: settings.modal.cancel, - click: function() { - if (settings.oncancel != undefined) { - if (typeof settings.oncancel.confirm == "function") { - //receive function - settings.oncancel.confirm(cancelModal); - } else if (settings.oncancel != undefined) { - cancelModal(); - } - } else { - $(this).dialog("close"); - } - } - }); - } - - if (settings.modal.ok != undefined) { - required_buttons.push({ - class: - "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", - text: settings.modal.ok, - click: function() { - if (AJAX_RUNNING) return; - - if (settings.onsubmit != undefined) { - if (settings.onsubmit.preaction != undefined) { - settings.onsubmit.preaction(); - } - AJAX_RUNNING = 1; - if (settings.onsubmit.dataType == undefined) { - settings.onsubmit.dataType = "html"; - } - - var formdata = new FormData(); - if (settings.extradata) { - settings.extradata.forEach(function(item) { - if (item.value != undefined) - formdata.append(item.name, item.value); - }); - } - formdata.append("page", settings.onsubmit.page); - formdata.append("method", settings.onsubmit.method); - - var flagError = false; - - $("#" + settings.form + " :input").each(function() { - if (this.checkValidity() === false) { - $(this).attr("title", this.validationMessage); - $(this).tooltip({ - tooltipClass: "uitooltip", - position: { - my: "right bottom", - at: "right top", - using: function(position, feedback) { - $(this).css(position); - $("
") - .addClass("arrow") - .addClass(feedback.vertical) - .addClass(feedback.horizontal) - .appendTo(this); - } - } - }); - $(this).tooltip("open"); - - var element = $(this); - setTimeout( - function(element) { - element.tooltip("destroy"); - element.removeAttr("title"); - }, - 3000, - element - ); - - flagError = true; - } - - if (this.type == "file") { - if ($(this).prop("files")[0]) { - formdata.append(this.name, $(this).prop("files")[0]); - } - } else { - if ($(this).attr("type") == "checkbox") { - if (this.checked) { - formdata.append(this.name, "on"); - } - } else { - formdata.append(this.name, $(this).val()); - } - } - }); - - if (flagError === false) { - $.ajax({ - method: "post", - url: settings.url, - processData: false, - contentType: false, - data: formdata, - dataType: settings.onsubmit.dataType, - success: function(data) { - if (settings.ajax_callback != undefined) { - if (settings.idMsgCallback != undefined) { - settings.ajax_callback(data, settings.idMsgCallback); - } else { - settings.ajax_callback(data); - } - } - AJAX_RUNNING = 0; - } - }); - } else { - AJAX_RUNNING = 0; - } - } else { - // No onsumbit configured. Directly close. - $(this).dialog("close"); - } - }, - error: function(data) { - // console.log(data); - AJAX_RUNNING = 0; - } - }); - } - - $.ajax({ - method: "post", - url: settings.url, - processData: false, - contentType: false, - data: data, - success: function(data) { - settings.target.html(data); - if (settings.onload != undefined) { - settings.onload(data); - } - settings.target.dialog({ - resizable: true, - draggable: true, - modal: true, - title: settings.modal.title, - width: width, - overlay: { - opacity: 0.5, - background: "black" - }, - buttons: required_buttons, - closeOnEscape: false, - open: function() { - $(".ui-dialog-titlebar-close").hide(); - } - }); - }, - error: function(data) { - // console.log(data); - } - }); -} - -//Function that shows a dialog box to confirm closures of generic manners. The modal id is random -function confirmDialog(settings) { - var randomStr = - Math.random() - .toString(36) - .substring(2, 15) + - Math.random() - .toString(36) - .substring(2, 15); - - $("body").append( - '
' + settings.message + "
" - ); - $("#confirm_" + randomStr); - $("#confirm_" + randomStr) - .dialog({ - title: settings.title, - close: false, - width: 350, - modal: true, - buttons: [ - { - text: "Cancel", - class: - "ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel", - click: function() { - $(this).dialog("close"); - if (typeof settings.onDeny == "function") settings.onDeny(); - } - }, - { - text: "Ok", - class: - "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", - click: function() { - $(this).dialog("close"); - if (typeof settings.onAccept == "function") settings.onAccept(); - } - } - ] - }) - .show(); -} - -/** - * Function to show modal with message Validation. - * - * @param {json} data Json example: - * $return = [ - * 'error' => 0 or 1, - * 'title' => [ - * Failed, - * Success, - * ], - * 'text' => [ - * Failed, - * Success, - * ], - *]; - * @param {string} idMsg ID div charge modal. - * - * @return {void} - */ -function generalShowMsg(data, idMsg) { - var title = data.title[data.error]; - var text = data.text[data.error]; - var failed = !data.error; - - $("#" + idMsg).empty(); - $("#" + idMsg).html(text); - $("#" + idMsg).dialog({ - width: 450, - position: { - my: "center", - at: "center", - of: window, - collision: "fit" - }, - title: title, - buttons: [ - { - class: - "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", - text: "OK", - click: function(e) { - if (!failed) { - $(".ui-dialog-content").dialog("close"); - } else { - $(this).dialog("close"); - } - } - } - ] - }); -} - /** * Function for AJAX request. * diff --git a/pandora_console/include/javascript/pandora_ui.js b/pandora_console/include/javascript/pandora_ui.js new file mode 100644 index 0000000000..426659bec4 --- /dev/null +++ b/pandora_console/include/javascript/pandora_ui.js @@ -0,0 +1,417 @@ +/* global $ */ +/* exported load_modal */ + +var ENTERPRISE_DIR = "enterprise"; + +/** + * Display a confirm dialog box + * + * @param string Text to display + * @param string Ok button text + * @param string Cancel button text + * @param function Callback to action when ok button is pressed + */ +function display_confirm_dialog(message, ok_text, cancel_text, ok_function) { + // Clean function to close the dialog + var clean_function = function() { + $("#pandora_confirm_dialog_text").hide(); + $("#pandora_confirm_dialog_text").remove(); + }; + + // Modify the ok function to close the dialog too + var ok_function_clean = function() { + ok_function(); + clean_function(); + }; + + var buttons_obj = {}; + buttons_obj[cancel_text] = clean_function; + buttons_obj[ok_text] = ok_function_clean; + + // Display the dialog + $("body").append( + '

' + message + "

" + ); + $("#pandora_confirm_dialog_text").dialog({ + resizable: false, + draggable: true, + modal: true, + dialogClass: "pandora_confirm_dialog", + overlay: { + opacity: 0.5, + background: "black" + }, + closeOnEscape: true, + modal: true, + buttons: buttons_obj + }); +} + +// Advanced Form control. +function load_modal(settings) { + var AJAX_RUNNING = 0; + var data = new FormData(); + if (settings.extradata) { + settings.extradata.forEach(function(item) { + if (item.value != undefined) data.append(item.name, item.value); + }); + } + data.append("page", settings.onshow.page); + data.append("method", settings.onshow.method); + + var width = 630; + if (settings.onshow.width) { + width = settings.onshow.width; + } + + settings.target.html("Loading modal..."); + settings.target + .dialog({ + title: "Loading", + close: false, + width: 200, + buttons: [] + }) + .show(); + var required_buttons = []; + if (settings.modal.cancel != undefined) { + //The variable contains a function + // that is responsible for executing the method it receives from settings + // which confirms the closure of a modal + var cancelModal = function() { + settings.target.dialog("close"); + if (AJAX_RUNNING) return; + AJAX_RUNNING = 1; + var formdata = new FormData(); + + formdata.append("page", settings.oncancel.page); + formdata.append("method", settings.oncancel.method); + + $.ajax({ + method: "post", + url: settings.url, + processData: false, + contentType: false, + data: formdata, + success: function(data) { + if (typeof settings.oncancel.callback == "function") { + settings.oncancel.callback(data); + settings.target.dialog("close"); + } + AJAX_RUNNING = 0; + }, + error: function(data) { + // console.log(data); + AJAX_RUNNING = 0; + } + }); + }; + + required_buttons.push({ + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel", + text: settings.modal.cancel, + click: function() { + if (settings.oncancel != undefined) { + if (typeof settings.oncancel.confirm == "function") { + //receive function + settings.oncancel.confirm(cancelModal); + } else if (settings.oncancel != undefined) { + cancelModal(); + } + } else { + $(this).dialog("close"); + } + } + }); + } + + if (settings.modal.ok != undefined) { + required_buttons.push({ + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", + text: settings.modal.ok, + click: function() { + if (AJAX_RUNNING) return; + + if (settings.onsubmit != undefined) { + if (settings.onsubmit.preaction != undefined) { + settings.onsubmit.preaction(); + } + AJAX_RUNNING = 1; + if (settings.onsubmit.dataType == undefined) { + settings.onsubmit.dataType = "html"; + } + + var formdata = new FormData(); + if (settings.extradata) { + settings.extradata.forEach(function(item) { + if (item.value != undefined) + formdata.append(item.name, item.value); + }); + } + formdata.append("page", settings.onsubmit.page); + formdata.append("method", settings.onsubmit.method); + + var flagError = false; + + $("#" + settings.form + " :input").each(function() { + if (this.checkValidity() === false) { + $(this).attr("title", this.validationMessage); + $(this).tooltip({ + tooltipClass: "uitooltip", + position: { + my: "right bottom", + at: "right top", + using: function(position, feedback) { + $(this).css(position); + $("
") + .addClass("arrow") + .addClass(feedback.vertical) + .addClass(feedback.horizontal) + .appendTo(this); + } + } + }); + $(this).tooltip("open"); + + var element = $(this); + setTimeout( + function(element) { + element.tooltip("destroy"); + element.removeAttr("title"); + }, + 3000, + element + ); + + flagError = true; + } + + if (this.type == "file") { + if ($(this).prop("files")[0]) { + formdata.append(this.name, $(this).prop("files")[0]); + } + } else { + if ($(this).attr("type") == "checkbox") { + if (this.checked) { + formdata.append(this.name, "on"); + } + } else { + formdata.append(this.name, $(this).val()); + } + } + }); + + if (flagError === false) { + $.ajax({ + method: "post", + url: settings.url, + processData: false, + contentType: false, + data: formdata, + dataType: settings.onsubmit.dataType, + success: function(data) { + if (settings.ajax_callback != undefined) { + if (settings.idMsgCallback != undefined) { + settings.ajax_callback(data, settings.idMsgCallback); + } else { + settings.ajax_callback(data); + } + } + AJAX_RUNNING = 0; + } + }); + } else { + AJAX_RUNNING = 0; + } + } else { + // No onsumbit configured. Directly close. + $(this).dialog("close"); + } + }, + error: function(data) { + // console.log(data); + AJAX_RUNNING = 0; + } + }); + } + + $.ajax({ + method: "post", + url: settings.url, + processData: false, + contentType: false, + data: data, + success: function(data) { + settings.target.html(data); + if (settings.onload != undefined) { + settings.onload(data); + } + settings.target.dialog({ + resizable: true, + draggable: true, + modal: true, + title: settings.modal.title, + width: width, + overlay: { + opacity: 0.5, + background: "black" + }, + buttons: required_buttons, + closeOnEscape: false, + open: function() { + $(".ui-dialog-titlebar-close").hide(); + } + }); + }, + error: function(data) { + // console.log(data); + } + }); +} + +//Function that shows a dialog box to confirm closures of generic manners. The modal id is random +function confirmDialog(settings) { + var randomStr = + Math.random() + .toString(36) + .substring(2, 15) + + Math.random() + .toString(36) + .substring(2, 15); + + $("body").append( + '
' + settings.message + "
" + ); + $("#confirm_" + randomStr); + $("#confirm_" + randomStr) + .dialog({ + title: settings.title, + close: false, + width: 350, + modal: true, + buttons: [ + { + text: "Cancel", + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel", + click: function() { + $(this).dialog("close"); + if (typeof settings.onDeny == "function") settings.onDeny(); + } + }, + { + text: "Ok", + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", + click: function() { + $(this).dialog("close"); + if (typeof settings.onAccept == "function") settings.onAccept(); + } + } + ] + }) + .show(); +} + +/** + * Function to show modal with message Validation. + * + * @param {json} data Json example: + * $return = [ + * 'error' => 0 or 1, + * 'title' => [ + * Failed, + * Success, + * ], + * 'text' => [ + * Failed, + * Success, + * ], + *]; + * @param {string} idMsg ID div charge modal. + * + * @return {void} + */ +function generalShowMsg(data, idMsg) { + var title = data.title[data.error]; + var text = data.text[data.error]; + var failed = !data.error; + + $("#" + idMsg).empty(); + $("#" + idMsg).html(text); + $("#" + idMsg).dialog({ + width: 450, + position: { + my: "center", + at: "center", + of: window, + collision: "fit" + }, + title: title, + buttons: [ + { + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", + text: "OK", + click: function(e) { + if (!failed) { + $(".ui-dialog-content").dialog("close"); + } else { + $(this).dialog("close"); + } + } + } + ] + }); +} + +/** + * Display a dialog with an image + * + * @param {string} icon_name The name of the icon you will display + * @param {string} icon_path The path to the icon + * @param {Object} incoming_options All options + * grayed: {bool} True to display the background black + * title {string} 'Logo preview' by default + */ +function logo_preview(icon_name, icon_path, incoming_options) { + // Get the options + options = { + grayed: false, + title: "Logo preview" + }; + $.extend(options, incoming_options); + + if (icon_name == "") return; + + $dialog = $("
"); + $image = $(''); + $image.css("max-width", "500px").css("max-height", "500px"); + + try { + $dialog + .hide() + .html($image) + .dialog({ + title: options.title, + resizable: true, + draggable: true, + modal: true, + dialogClass: options.grayed ? "dialog-grayed" : "", + overlay: { + opacity: 0.5, + background: "black" + }, + minHeight: 1, + width: $image.width, + close: function() { + $dialog.empty().remove(); + } + }) + .show(); + } catch (err) { + // console.log(err); + } +} diff --git a/pandora_console/mobile/include/ui.class.php b/pandora_console/mobile/include/ui.class.php index ff411a86e0..87954cf96e 100755 --- a/pandora_console/mobile/include/ui.class.php +++ b/pandora_console/mobile/include/ui.class.php @@ -775,6 +775,7 @@ class Ui echo " \n"; echo " \n"; echo " \n"; + echo " \n"; echo " \n"; echo " \n"; diff --git a/pandora_console/operation/agentes/realtime_win.php b/pandora_console/operation/agentes/realtime_win.php index 5223a4bb2e..93c8c85ea2 100644 --- a/pandora_console/operation/agentes/realtime_win.php +++ b/pandora_console/operation/agentes/realtime_win.php @@ -65,6 +65,7 @@ echo ' + diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 18f2fea040..ed683cf052 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -74,6 +74,7 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent); + From e84610120b82dbb799ab9d8eab44b9251a7b9539 Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 27 Nov 2019 11:43:50 +0100 Subject: [PATCH 06/67] Add coments in pandora_ui.js --- pandora_console/include/javascript/pandora_ui.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_console/include/javascript/pandora_ui.js b/pandora_console/include/javascript/pandora_ui.js index 426659bec4..d31bcb1546 100644 --- a/pandora_console/include/javascript/pandora_ui.js +++ b/pandora_console/include/javascript/pandora_ui.js @@ -1,5 +1,12 @@ /* global $ */ /* exported load_modal */ +/*JS to Show user modals : + - Confirm dialogs. + - Display dialogs. + - Load modal windows. + - Logo Previews. + - General show messages. +*/ var ENTERPRISE_DIR = "enterprise"; From d910c53b734735b55a1eec92a2c97055736a849f Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 27 Nov 2019 15:06:16 +0100 Subject: [PATCH 07/67] add coments From a67b0a9978756839cf74aebc2c2a59a1961db1a5 Mon Sep 17 00:00:00 2001 From: marcos Date: Thu, 28 Nov 2019 18:27:05 +0100 Subject: [PATCH 08/67] update pandora.js pandora_ui.js --- pandora_console/include/javascript/pandora.js | 12 ++ .../include/javascript/pandora_ui.js | 165 ++++++++---------- 2 files changed, 82 insertions(+), 95 deletions(-) diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index f01daf00b0..c85ed5a608 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1825,6 +1825,18 @@ function ellipsize(str, max, ellipse) { return str.trim().length > max ? str.substr(0, max).trim() + ellipse : str; } +function uniqId() { + var randomStr = + Math.random() + .toString(36) + .substring(2, 15) + + Math.random() + .toString(36) + .substring(2, 15); + + return randomStr; +} + /** * Function for AJAX request. * diff --git a/pandora_console/include/javascript/pandora_ui.js b/pandora_console/include/javascript/pandora_ui.js index d31bcb1546..37f91e7950 100644 --- a/pandora_console/include/javascript/pandora_ui.js +++ b/pandora_console/include/javascript/pandora_ui.js @@ -11,47 +11,52 @@ var ENTERPRISE_DIR = "enterprise"; /** - * Display a confirm dialog box + * Display a dialog with an image * - * @param string Text to display - * @param string Ok button text - * @param string Cancel button text - * @param function Callback to action when ok button is pressed + * @param {string} icon_name The name of the icon you will display + * @param {string} icon_path The path to the icon + * @param {Object} incoming_options All options + * grayed: {bool} True to display the background black + * title {string} 'Logo preview' by default */ -function display_confirm_dialog(message, ok_text, cancel_text, ok_function) { - // Clean function to close the dialog - var clean_function = function() { - $("#pandora_confirm_dialog_text").hide(); - $("#pandora_confirm_dialog_text").remove(); +function logo_preview(icon_name, icon_path, incoming_options) { + // Get the options + options = { + grayed: false, + title: "Logo preview" }; + $.extend(options, incoming_options); - // Modify the ok function to close the dialog too - var ok_function_clean = function() { - ok_function(); - clean_function(); - }; + if (icon_name == "") return; - var buttons_obj = {}; - buttons_obj[cancel_text] = clean_function; - buttons_obj[ok_text] = ok_function_clean; + $dialog = $("
"); + $image = $(''); + $image.css("max-width", "500px").css("max-height", "500px"); - // Display the dialog - $("body").append( - '

' + message + "

" - ); - $("#pandora_confirm_dialog_text").dialog({ - resizable: false, - draggable: true, - modal: true, - dialogClass: "pandora_confirm_dialog", - overlay: { - opacity: 0.5, - background: "black" - }, - closeOnEscape: true, - modal: true, - buttons: buttons_obj - }); + try { + $dialog + .hide() + .html($image) + .dialog({ + title: options.title, + resizable: true, + draggable: true, + modal: true, + dialogClass: options.grayed ? "dialog-grayed" : "", + overlay: { + opacity: 0.5, + background: "black" + }, + minHeight: 1, + width: $image.width, + close: function() { + $dialog.empty().remove(); + } + }) + .show(); + } catch (err) { + // console.log(err); + } } // Advanced Form control. @@ -65,12 +70,35 @@ function load_modal(settings) { } data.append("page", settings.onshow.page); data.append("method", settings.onshow.method); + if (settings.onshow.extradata != undefined) { + data.append("extradata", JSON.stringify(settings.onshow.extradata)); + } + + if (settings.target == undefined) { + var uniq = uniqId(); + var div = document.createElement("div"); + div.id = "div-modal-" + uniq; + div.style.display = "none"; + + document.getElementById("main").append(div); + + var id_modal_target = "#div-modal-" + uniq; + + settings.target = $(id_modal_target); + } var width = 630; if (settings.onshow.width) { width = settings.onshow.width; } + if (settings.modal.overlay == undefined) { + settings.modal.overlay = { + opacity: 0.5, + background: "black" + }; + } + settings.target.html("Loading modal..."); settings.target .dialog({ @@ -261,14 +289,16 @@ function load_modal(settings) { modal: true, title: settings.modal.title, width: width, - overlay: { - opacity: 0.5, - background: "black" - }, + overlay: settings.modal.overlay, buttons: required_buttons, closeOnEscape: false, open: function() { $(".ui-dialog-titlebar-close").hide(); + }, + close: function() { + if (id_modal_target != undefined) { + $(id_modal_target).remove(); + } } }); }, @@ -280,13 +310,7 @@ function load_modal(settings) { //Function that shows a dialog box to confirm closures of generic manners. The modal id is random function confirmDialog(settings) { - var randomStr = - Math.random() - .toString(36) - .substring(2, 15) + - Math.random() - .toString(36) - .substring(2, 15); + var randomStr = uniqId(); $("body").append( '
' + settings.message + "
" @@ -373,52 +397,3 @@ function generalShowMsg(data, idMsg) { ] }); } - -/** - * Display a dialog with an image - * - * @param {string} icon_name The name of the icon you will display - * @param {string} icon_path The path to the icon - * @param {Object} incoming_options All options - * grayed: {bool} True to display the background black - * title {string} 'Logo preview' by default - */ -function logo_preview(icon_name, icon_path, incoming_options) { - // Get the options - options = { - grayed: false, - title: "Logo preview" - }; - $.extend(options, incoming_options); - - if (icon_name == "") return; - - $dialog = $("
"); - $image = $(''); - $image.css("max-width", "500px").css("max-height", "500px"); - - try { - $dialog - .hide() - .html($image) - .dialog({ - title: options.title, - resizable: true, - draggable: true, - modal: true, - dialogClass: options.grayed ? "dialog-grayed" : "", - overlay: { - opacity: 0.5, - background: "black" - }, - minHeight: 1, - width: $image.width, - close: function() { - $dialog.empty().remove(); - } - }) - .show(); - } catch (err) { - // console.log(err); - } -} From e412516a64e6e1ab9cee370e2a3aa0574dc4f6af Mon Sep 17 00:00:00 2001 From: marcos Date: Mon, 2 Dec 2019 11:20:25 +0100 Subject: [PATCH 09/67] add historical data fialure message --- pandora_console/general/mysqlerr.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_console/general/mysqlerr.php b/pandora_console/general/mysqlerr.php index 4f28f42c84..1330e9055d 100644 --- a/pandora_console/general/mysqlerr.php +++ b/pandora_console/general/mysqlerr.php @@ -95,7 +95,12 @@ background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%; /images/mysqlerr.png'>
@@ -134,4 +139,4 @@ background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%;
- \ No newline at end of file + From 5880bec88abff6bc15b8d0485c677434605d9c87 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Thu, 5 Dec 2019 17:41:44 +0100 Subject: [PATCH 10/67] changes in module data formatting when printed across the application and new setup options --- pandora_console/extras/mr/35.sql | 5 + .../godmode/setup/setup_visuals.php | 95 +++++++++++---- .../ajax/visual_console_builder.ajax.php | 14 +-- pandora_console/include/class/Tree.class.php | 5 +- pandora_console/include/functions.php | 110 ++++++++++++++++++ pandora_console/include/functions_config.php | 30 +++++ pandora_console/include/functions_graph.php | 10 +- pandora_console/include/functions_html.php | 4 + .../include/functions_reporting.php | 49 +++++--- .../include/graphs/flot/pandora.flot.js | 68 ++++++----- pandora_console/pandoradb_data.sql | 3 +- 11 files changed, 308 insertions(+), 85 deletions(-) create mode 100644 pandora_console/extras/mr/35.sql diff --git a/pandora_console/extras/mr/35.sql b/pandora_console/extras/mr/35.sql new file mode 100644 index 0000000000..dd3911a1f6 --- /dev/null +++ b/pandora_console/extras/mr/35.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_module_units', '{"bytes":"bytes","entries":"entries","files":"files","hits":"hits","sessions":"sessions","users":"users","ºC":"ºC","ºF":"ºF"}'); + +COMMIT; \ No newline at end of file diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index fab43724b5..afc959e3af 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1003,6 +1003,10 @@ $row++; $table_other->class = 'databox filters'; $table_other->style[0] = 'font-weight: bold;'; $table_other->size[0] = '50%'; + $table_other->size[1] = '26%'; + $table_other->size[2] = '12%'; + $table_other->size[3] = '12%'; + $table_other->data = []; // Enrique (27/01/2017) New feature: Show report info on top of reports @@ -1134,7 +1138,7 @@ $row++; 'graphviz_bin_dir', $config['graphviz_bin_dir'], '', - 50, + 25, 255, true ); @@ -1192,16 +1196,15 @@ $row++; // CUSTOM VALUES POST PROCESS // ---------------------------------------------------------------------- $table_other->data[$row][0] = __('Custom values post process'); - $table_other->data[$row][1] = ''; - $table_other->data[$row][1] .= __('Value').': '.html_print_input_text('custom_value', '', '', 25, 50, true); - $table_other->data[$row][1] .= ' '.__('Text').': '.html_print_input_text('custom_text', '', '', 25, 50, true); - $table_other->data[$row][1] .= ' '; - $table_other->data[$row][1] .= html_print_input_hidden( + $table_other->data[$row][1] = __('Value').': '.html_print_input_text('custom_value', '', '', 25, 50, true); + $table_other->data[$row][2] = __('Text').': '.html_print_input_text('custom_text', '', '', 15, 50, true); + $table_other->data[$row][2] .= ' '; + $table_other->data[$row][2] .= html_print_input_hidden( 'custom_value_add', '', true ); - $table_other->data[$row][1] .= html_print_button( + $table_other->data[$row][3] = html_print_button( __('Add'), 'custom_value_add_btn', false, @@ -1210,10 +1213,11 @@ $row++; true ); - $table_other->data[$row][1] .= '

'; + $row++; - $table_other->data[$row][1] .= __('Delete custom values').': '; - $table_other->data[$row][1] .= html_print_select( + $table_other->data[$row][0] = ''; + $table_other->data[$row][1] = __('Delete custom values').': '; + $table_other->data[$row][2] = html_print_select( post_process_get_custom_values(), 'custom_values', '', @@ -1223,7 +1227,7 @@ $row++; true ); $count_custom_postprocess = post_process_get_custom_values(); - $table_other->data[$row][1] .= html_print_button( + $table_other->data[$row][3] = html_print_button( __('Delete'), 'custom_values_del_btn', empty($count_custom_postprocess), @@ -1237,7 +1241,8 @@ $row++; '', true ); - $table_other->data[$row][1] .= '
'; + $table_other->data[$row][3] .= '

'; + // ---------------------------------------------------------------------- // ---------------------------------------------------------------------- // CUSTOM INTERVAL VALUES @@ -1252,22 +1257,51 @@ $row++; SECONDS_1MONTH => __('months'), SECONDS_1YEAR => __('years'), ]; - $table_other->data[$row][1] = __('Add new custom value to intervals').': '; + $table_other->data[$row][1] = __('Value').': '; $table_other->data[$row][1] .= html_print_input_text('interval_value', '', '', 5, 5, true); - $table_other->data[$row][1] .= html_print_select($units, 'interval_unit', 1, '', '', '', true, false, false); - $table_other->data[$row][1] .= html_print_button(__('Add'), 'interval_add_btn', false, '', 'class="sub next"', true); - $table_other->data[$row][1] .= '

'; + $table_other->data[$row][2] = html_print_select($units, 'interval_unit', 1, '', '', '', true, false, false); + $table_other->data[$row][3] = html_print_button(__('Add'), 'interval_add_btn', false, '', 'class="sub next"', true); - $table_other->data[$row][1] .= __('Delete interval').': '; - $table_other->data[$row][1] .= html_print_select(get_periods(false, false), 'intervals', '', '', '', '', true); - $table_other->data[$row][1] .= html_print_button(__('Delete'), 'interval_del_btn', empty($config['interval_values']), '', 'class="sub cancel"', true); + $row++; + + $table_other->data[$row][0] = ''; + $table_other->data[$row][1] = __('Delete interval').': '; + $table_other->data[$row][2] = html_print_select(get_periods(false, false), 'intervals', '', '', '', '', true); + $table_other->data[$row][3] = html_print_button(__('Delete'), 'interval_del_btn', empty($config['interval_values']), '', 'class="sub cancel"', true); $table_other->data[$row][1] .= html_print_input_hidden('interval_values', $config['interval_values'], true); // This hidden field will be filled from jQuery before submit $table_other->data[$row][1] .= html_print_input_hidden('interval_to_delete', '', true); + $table_other->data[$row][3] .= '

'; // ---------------------------------------------------------------------- $row++; + $table_other->data[$row][0] = __('Module units'); + $table_other->data[$row][1] = __('Value').': '; + $table_other->data[$row][1] .= html_print_input_text('custom_module_unit', '', '', 15, 50, true); + $table_other->data[$row][2] = ''; + $table_other->data[$row][3] = html_print_button(__('Add'), 'module_unit_add_btn', false, '', 'class="sub next"', true); + + $row++; + $table_other->data[$row][0] = ''; + $table_other->data[$row][1] = __('Delete custom values').': '; + $table_other->data[$row][2] = html_print_select(get_custom_module_units(), 'module_units', '', '', '', '', true, false, true, 'w100p'); + $table_other->data[$row][3] = html_print_button( + __('Delete'), + 'custom_module_unit_del_btn', + empty($count_custom_postprocess), + '', + 'class="sub cancel"', + true + ); + $table_other->data[$row][3] .= html_print_input_hidden( + 'custom_module_unit_to_delete', + '', + true + ); + + $row++; + $common_dividers = [ ';' => ';', ',' => ',', @@ -1284,6 +1318,14 @@ $row++; $row++; + $table_other->data[$row][0] = __('Data multiplier to use in graphs/data'); + $options_data_multiplier = []; + $options_data_multiplier[0] = __('Use 1024 when module unit are bytes'); + $options_data_multiplier[1] = __('Use always 1000'); + $options_data_multiplier[2] = __('Use always 1024'); + + $table_other->data[$row][1] = html_print_select($options_data_multiplier, 'use_data_multiplier', $config['use_data_multiplier'], '', '', 0, true, false, false); + echo '
'; echo ''.__('Other configuration').' '.ui_print_help_icon('other_conf_tab', true).''; @@ -1500,7 +1542,20 @@ $(document).ready (function () { }); //------------------------------------------------------------------ - + //------------------------------------------------------------------ + // CUSTOM MODULE UNITS + //------------------------------------------------------------------ + $("#button-custom_module_unit_del_btn").click( function() { + var unit_selected = $('#module_units option:selected').val(); + $('#hidden-custom_module_unit_to_delete').val(unit_selected); + $('#submit-update_button').trigger('click'); + }); + + $("#button-module_unit_add_btn").click( function() { + $('#submit-update_button').trigger('click'); + }); + //------------------------------------------------------------------ + // Juanma (06/05/2014) New feature: Custom front page for reports var custom_report = $('#checkbox-custom_report_front') .prop('checked'); diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 2d37092078..5833a18584 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -438,20 +438,16 @@ switch ($action) { || ($layoutData['type'] == PERCENTILE_BUBBLE) ) { if ($value_show == 'value') { - $returnValue = format_for_graph($returnValue, 2); - $unit_text_db = db_get_sql( 'SELECT unit - FROM tagente_modulo - WHERE id_agente_modulo = '.$layoutData['id_agente_modulo'] + FROM tagente_modulo + WHERE id_agente_modulo = '.$layoutData['id_agente_modulo'] ); $unit_text_db = trim(io_safe_output($unit_text_db)); - if ($value_show == 'value') { - // Set empty string unit at the moment - // and change for old false value - $unit_text = ''; - } + $divisor = get_data_multiplier($unit_text_db); + + $returnValue = format_for_graph($returnValue, 2, '.', ',', $divisor); if (!empty($unit_text_db)) { $unit_text = $unit_text_db; diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 5c6434c8bd..d1ea7aa3ce 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -616,7 +616,8 @@ class Tree && $statusType !== STATUS_MODULE_NO_DATA_BALL ) { if (is_numeric($module['value'])) { - $statusTitle .= ' : '.format_for_graph($module['value']); + $divisor = get_data_multiplier($module['unit']); + $statusTitle .= ' : '.format_for_graph($module['value'], 1, '.', ',', $divisor); } else { $statusTitle .= ' : '.substr(io_safe_output($module['value']), 0, 42); } @@ -1062,7 +1063,7 @@ class Tree $columns = 'DISTINCT(tam.id_agente_modulo) AS id, tam.nombre AS name, tam.id_tipo_modulo, tam.id_modulo, tae.estado, tae.datos, - tam.parent_module_id AS parent, tatm.id AS alerts'; + tam.parent_module_id AS parent, tatm.id AS alerts, tam.unit'; $sql = "SELECT $columns FROM tagente_modulo tam diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 720caefc58..96512ad4b4 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -262,6 +262,11 @@ function format_for_graph( $divider=1000, $sufix='' ) { + // Exception to exclude modules whose unit is already formatted as KB (satellite modules) + if (!empty($sufix) && $sufix == 'KB') { + return; + } + $shorts = [ '', 'K', @@ -5483,3 +5488,108 @@ if (!function_exists('getallheaders')) { } + + +/** + * Update config token that contains custom module units. + * + * @param string Name of new module unit. + * @return boolean Success or failure. + */ +function add_custom_module_unit($value) +{ + global $config; + + $custom_module_units = get_custom_module_units(); + + $custom_module_units[$value] = $value; + + $new_conf = json_encode($custom_module_units); + + $return = config_update_value( + 'custom_module_units', + $new_conf + ); + + if ($return) { + $config['custom_module_units'] = $new_conf; + return true; + } else { + return false; + } +} + + +function get_custom_module_units() +{ + global $config; + + if (!isset($config['custom_module_units'])) { + $custom_module_units = []; + } else { + $custom_module_units = json_decode( + io_safe_output($config['custom_module_units']), + true + ); + } + + return $custom_module_units; +} + + +function delete_custom_module_unit($value) +{ + global $config; + + $custom_units = get_custom_module_units(); + + unset($custom_units[$value]); + + $new_conf = json_encode($custom_units); + $return = config_update_value( + 'custom_module_units', + $new_conf + ); + + if ($return) { + $config['custom_module_units'] = $new_conf; + + return true; + } else { + return false; + } +} + + +/** + * Get multiplier to be applied on module data in order to represent it properly. Based on setup configuration and module's unit, either 1000 or 1024 will be returned. + * + * @param string Module's unit. + * + * @return integer Multiplier. + */ +function get_data_multiplier($unit) +{ + global $config; + + switch ($config['use_data_multiplier']) { + case 0: + if (strpos($unit, 'yte') !== false) { + $multiplier = 1024; + } else { + $multiplier = 1000; + } + break; + + case 2: + $multiplier = 1024; + break; + + case 1: + default: + $multiplier = 1000; + break; + } + + return $multiplier; +} diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 4ee9e682b8..a748ef0fae 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1279,6 +1279,28 @@ function config_update_config() $error_update[] = __('Delete interval'); } + // -------------------------------------------------- + // -------------------------------------------------- + // MODULE CUSTOM UNITS + // -------------------------------------------------- + $custom_unit = get_parameter('custom_module_unit'); + $custom_unit_to_delete = get_parameter('custom_module_unit_to_delete', ''); + + if (!empty($custom_unit)) { + if (!add_custom_module_unit( + $custom_unit + ) + ) { + $error_update[] = __('Add custom module unit'); + } + } + + if (!empty($custom_unit_to_delete)) { + if (!delete_custom_module_unit($custom_unit_to_delete)) { + $error_update[] = __('Delete custom module unit'); + } + } + // -------------------------------------------------- if (!config_update_value('custom_report_info', get_parameter('custom_report_info'))) { $error_update[] = __('Custom report info'); @@ -1316,6 +1338,10 @@ function config_update_config() if (!config_update_value('csv_divider', (string) get_parameter('csv_divider', ';'))) { $error_update[] = __('CSV divider'); } + + if (!config_update_value('use_data_multiplier', get_parameter('use_data_multiplier', ';'))) { + $error_update[] = __('Use data multiplier'); + } break; case 'net': @@ -2804,6 +2830,10 @@ function config_process_config() config_update_value('csv_divider', ';'); } + if (!isset($config['use_data_multiplier'])) { + config_update_value('use_data_multiplier', ';'); + } + if (!isset($config['command_snapshot'])) { config_update_value('command_snapshot', 1); } diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index cddd447673..634d092a50 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -572,7 +572,7 @@ function grafico_modulo_sparse_data( /** - * Functions tu create graphs. + * Functions to create graphs. * * @param array $params Details builds graphs. For example: * 'agent_module_id' => $agent_module_id, @@ -856,6 +856,10 @@ function grafico_modulo_sparse($params) } } + if (empty($params['divisor'])) { + $params['divisor'] = get_data_multiplier($params['unit']); + } + if (!$params['array_data_create']) { if ($params['baseline']) { $array_data = get_baseline_data( @@ -1467,6 +1471,10 @@ function graphic_combined_module( $data_module_graph['module_id'] = $agent_module_id; $data_module_graph['unit'] = $module_data['unit']; + $params['unit'] = $module_data['unit']; + + $params['divisor'] = get_data_multiplier($params['unit']); + // Stract data. $array_data_module = grafico_modulo_sparse_data( $agent_module_id, diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index e329af6013..4c1c32dd6e 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -798,6 +798,10 @@ function html_print_extended_select_for_unit( $fields['_timeticks_'] = 'Timeticks'; $fields['none'] = __('none'); + $default_module_custom_units = get_custom_module_units(); + + $fields = array_merge($fields, $default_module_custom_units); + if ($no_change != 0) { $fields[-1] = __('No change'); } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index a5e76eabf3..1b5d61b4c0 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1557,7 +1557,10 @@ function reporting_event_top_n( $data['module'] = $module_name[$i]; $data['value'] = $dt; - $data['formated_value'] = format_for_graph($dt, 2).' '.$units[$i]; + + $divisor = get_data_multiplier($units[$i]); + + $data['formated_value'] = format_for_graph($dt, 2, '.', ',', $divisor, $units[$i]); $data_return[] = $data; } @@ -1610,12 +1613,15 @@ function reporting_event_top_n( $data_pie_graph[$item_name] = $data_top[$i]; $data_hbar[$item_name]['g'] = $data_top[$i]; + + $divisor = get_data_multiplier($units[$i]); + if ($show_graph == 0 || $show_graph == 1) { $data = []; $data['agent'] = $an; $data['module'] = $module_name[$i]; $data['value'] = $data_top[$i]; - $data['formated_value'] = format_for_graph($data_top[$i], 2).' '.$units[$i]; + $data['formated_value'] = format_for_graph($data_top[$i], 2, '.', ',', $divisor, $units[$i]); $data_return[] = $data; } @@ -1691,14 +1697,15 @@ function reporting_event_top_n( $i++; } + $unit = $data_top_values['units'][0]; $avg = ($avg / $i); $return['resume']['min']['value'] = $min; - $return['resume']['min']['formated_value'] = format_for_graph($min, 2); + $return['resume']['min']['formated_value'] = format_for_graph($min, 2, '.', ',', $divisor, $unit); $return['resume']['avg']['value'] = $avg; - $return['resume']['avg']['formated_value'] = format_for_graph($avg, 2); + $return['resume']['avg']['formated_value'] = format_for_graph($avg, 2, '.', ',', $divisor, $unit); $return['resume']['max']['value'] = $max; - $return['resume']['max']['formated_value'] = format_for_graph($max, 2); + $return['resume']['max']['formated_value'] = format_for_graph($max, 2, '.', ',', $divisor, $unit); } $return['data'] = $data_return; @@ -4787,6 +4794,8 @@ function reporting_value($report, $content, $type, $pdf=false) case 'max': case 'min': case 'avg': + $divisor = get_data_multiplier($unit); + if ($content['lapse_calc'] == 0) { switch ($type) { case 'max': @@ -4817,7 +4826,7 @@ function reporting_value($report, $content, $type, $pdf=false) if (!$config['simple_module_value']) { $formated_value = $value; } else { - $formated_value = format_for_graph($value, $config['graph_precision']).' '.$unit; + $formated_value = format_for_graph($value, $config['graph_precision'], '.', ',', $divisor, $unit); } } else { $return['visual_format'] = $content['visual_format']; @@ -4825,17 +4834,17 @@ function reporting_value($report, $content, $type, $pdf=false) 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; + $value = format_for_graph(reporting_get_agentmodule_data_max($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision'], '.', ',', $divisor, $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; + $value = format_for_graph(reporting_get_agentmodule_data_min($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision'], '.', ',', $divisor, $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; + $value = format_for_graph(reporting_get_agentmodule_data_average($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision'], '.', ',', $divisor, $unit); break; } @@ -4860,15 +4869,15 @@ function reporting_value($report, $content, $type, $pdf=false) if ($i > $time_begin['utimestamp']) { switch ($type) { case 'max': - $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_max($content['id_agent_module'], $content['lapse'], ($i + $content['lapse'])), $config['graph_precision']).' '.$unit; + $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_max($content['id_agent_module'], $content['lapse'], ($i + $content['lapse'])), $config['graph_precision'], '.', ',', $divisor, $unit); break; case 'min': - $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_min($content['id_agent_module'], $content['lapse'], ($i + $content['lapse'])), $config['graph_precision']).' '.$unit; + $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_min($content['id_agent_module'], $content['lapse'], ($i + $content['lapse'])), $config['graph_precision'], '.', ',', $divisor, $unit); break; case 'avg': - $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_average($content['id_agent_module'], $content['lapse'], ($i + $content['lapse'])), $config['graph_precision']).' '.$unit; + $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_average($content['id_agent_module'], $content['lapse'], ($i + $content['lapse'])), $config['graph_precision'], '.', ',', $divisor, $unit); break; } } else { @@ -4897,7 +4906,9 @@ function reporting_value($report, $content, $type, $pdf=false) if (!$config['simple_module_value']) { $formated_value = $value; } else { - $formated_value = format_for_graph($value, $config['graph_precision']).' '.$unit; + $divisor = get_data_multiplier($unit); + + $formated_value = format_for_graph($value, $config['graph_precision'], '.', ',', $divisor, $unit); } break; } @@ -7211,6 +7222,8 @@ function reporting_general($report, $content) } } + $divisor = get_data_multiplier($unit); + switch ($content['group_by_agent']) { case REPORT_GENERAL_NOT_GROUP_BY_AGENT: $id_agent_module[$index] = $row['id_agent_module']; @@ -7241,7 +7254,7 @@ function reporting_general($report, $content) if (!is_numeric($data_res[$index])) { $return['data'][$name_agent][$mod_name] = $data_res[$index]; } else { - $return['data'][$name_agent][$mod_name] = format_for_graph($data_res[$index], 2).' '.$unit; + $return['data'][$name_agent][$mod_name] = format_for_graph($data_res[$index], 2, '.', ',', $divisor, $unit); } } break; @@ -7260,7 +7273,7 @@ function reporting_general($report, $content) if ($change_min) { $return['min']['value'] = $data_res[$index]; - $return['min']['formated_value'] = format_for_graph($data_res[$index], 2).' '.$unit; + $return['min']['formated_value'] = format_for_graph($data_res[$index], 2, '.', ',', $divisor, $unit); $return['min']['agent'] = $ag_name; $return['min']['module'] = $mod_name; } @@ -7276,7 +7289,7 @@ function reporting_general($report, $content) if ($change_max) { $return['max']['value'] = $data_res[$index]; - $return['max']['formated_value'] = format_for_graph($data_res[$index], 2).' '.$unit; + $return['max']['formated_value'] = format_for_graph($data_res[$index], 2, '.', ',', $divisor, $unit); $return['max']['agent'] = $ag_name; $return['max']['module'] = $mod_name; } @@ -7394,13 +7407,15 @@ function reporting_general($report, $content) break; } + $divisor = get_data_multiplier($units[$i]); + if (!is_numeric($d) || $is_string[$i]) { $data['value'] = $d; // to see the chains on the table $data['formated_value'] = $d; } else { $data['value'] = $d; - $data['formated_value'] = format_for_graph($d, 2).' '.$units[$i]; + $data['formated_value'] = format_for_graph($d, 2, '.', ',', $divisor, $units[$i]); } } diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 6387bf5442..7e5e335082 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1052,6 +1052,11 @@ function pandoraFlotArea( var update_legend = {}; var force_integer = 0; var title = params.title; + var divisor = params.divisor; + + if (typeof divisor === "undefined") { + divisor = 1000; + } if (typeof type === "undefined" || type == "") { type = params.type_graph; @@ -2458,11 +2463,6 @@ function pandoraFlotArea( } } - var y_array = format_unit_yaxes(y); - - y = y_array["y"]; - var how_bigger = y_array["unit"]; - var data_legend = []; // The graphs of points type and unknown graphs will dont be updated @@ -2480,10 +2480,7 @@ function pandoraFlotArea( .html( label_aux + " value = " + - (short_data - ? number_format(y, 0, "", short_data) - : parseFloat(y)) + - how_bigger + + number_format(y, 0, "", short_data, divisor) + " " + unit ); @@ -2531,20 +2528,11 @@ function pandoraFlotArea( data_legend[index] = " Min: " + - (short_data - ? number_format(min_y, 0, "", short_data) - : parseFloat(min_y)) + - min_bigger + + number_format(value[x].min, 0, unit, short_data, divisor) + " Max: " + - (short_data - ? number_format(max_y, 0, "", short_data) - : parseFloat(max_y)) + - max_bigger + + number_format(value[x].max, 0, unit, short_data, divisor) + " Avg: " + - (short_data - ? number_format(avg_y, 0, "", short_data) - : parseFloat(avg_y)) + - avg_bigger; + number_format(value[x].avg, 0, unit, short_data, divisor); }); label_aux = @@ -2749,12 +2737,13 @@ function pandoraFlotArea( function yFormatter(v) { var formatted = v; + if (short_data) { - formatted = number_format(v, force_integer, "", short_data); + formatted = number_format(v, force_integer, unit, short_data, divisor); } else { // It is an integer. if (v - Math.floor(v) == 0) { - formatted = number_format(v, force_integer, "", 2); + formatted = number_format(v, force_integer, unit, 2, divisor); } } @@ -3082,7 +3071,18 @@ function check_adaptions(graph_id) { }); } -function number_format(number, force_integer, unit, short_data) { +function number_format(number, force_integer, unit, short_data, divisor) { + divisor = typeof divisor !== "undefined" ? divisor : 1000; + + if (unit == "KB") { + return number + unit; + } + + // Set maximum decimal precision to 99 in case short_data is not set. + if (!short_data) { + short_data = 99; + } + if (force_integer) { if (Math.round(number) != number) { return ""; @@ -3095,17 +3095,15 @@ function number_format(number, force_integer, unit, short_data) { var shorts = ["", "K", "M", "G", "T", "P", "E", "Z", "Y"]; var pos = 0; - while (1) { - if (number >= 1000) { - //as long as the number can be divided by 1000 - pos++; //Position in array starting with 0 - number = number / 1000; - } else if (number <= -1000) { - pos++; - number = number / 1000; - } else { - break; - } + + while (number >= divisor) { + // As long as the number can be divided by 1000 or 1024. + pos++; + number = number / divisor; + } + + if (divisor) { + number = Math.round(number * decimals) / decimals; } return number + " " + shorts[pos] + unit; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index f5f48bda69..283de5914b 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -140,7 +140,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_title', ''), ('cr_incident_content', ''), ('sample_agent', '0'), -('gotty', '/usr/bin/gotty'); +('gotty', '/usr/bin/gotty'), +('custom_module_units', '{"bytes":"bytes","entries":"entries","files":"files","hits":"hits","sessions":"sessions","users":"users","ºC":"ºC","ºF":"ºF"}'); UNLOCK TABLES; -- From b2b2cdbede782f26b6bb683c26e83174cdfcdb35 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 11 Dec 2019 12:05:57 +0100 Subject: [PATCH 11/67] Fixed public_console height --- .../operation/visual_console/legacy_public_view.php | 5 ++--- 1 file changed, 2 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 ab6def4f70..4a316eee60 100644 --- a/pandora_console/operation/visual_console/legacy_public_view.php +++ b/pandora_console/operation/visual_console/legacy_public_view.php @@ -87,8 +87,8 @@ if ($layout) { $id_layout, true, true, - $width, - $height, + $bwidth, + $bheight, '../../', true, true, @@ -196,7 +196,6 @@ $ignored_params['refr'] = ''; $('body').css('background-color',''); $('body').css('margin','0'); - $('body').css('height','100%'); $('body').css('overflow','hidden'); $(".module_graph .menu_graph").css('display','none'); From 22eb76b56b4df08a8ef71248a0a8f38acafa2844 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Wed, 18 Dec 2019 19:00:34 +0100 Subject: [PATCH 12/67] Fixed meta regex agent matching ids --- pandora_console/include/functions_agents.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 5bda3bac1a..98063e3437 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -3512,13 +3512,18 @@ function agents_get_status_animation($up=true) function agents_get_agent_id_by_alias_regex($alias_regex, $flag='i', $limit=0) { $agents_id = []; - $all_agents = agents_get_agents(false, ['id_agente', 'alias']); + if (is_metaconsole()) { + $all_agents = agents_meta_get_agents('AR', '|'); + } else { + $all_agents = agents_get_group_agents(0, true, 'lower', false, false, true, '|'); + } + $agent_match = '/'.$alias_regex.'/'.$flag; - foreach ($all_agents as $agent) { - $result_agent_match = preg_match($agent_match, $agent['alias']); + foreach ($all_agents as $agent_id => $agent_alias) { + $result_agent_match = preg_match($agent_match, $agent_alias); if ($result_agent_match) { - $agents_id[] = $agent['id_agente']; + $agents_id[] = $agent_id; $i++; if ($i === $limit) { break; From b245b3b4a8946652d68e026616bfe029d091f761 Mon Sep 17 00:00:00 2001 From: Junichi Satoh Date: Fri, 20 Dec 2019 11:25:01 +0900 Subject: [PATCH 13/67] Added support for MySQL 8.0. --- pandora_console/include/functions_servers.php | 6 ++++-- pandora_console/install.php | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_servers.php b/pandora_console/include/functions_servers.php index 4049df62c9..a3649994fc 100644 --- a/pandora_console/include/functions_servers.php +++ b/pandora_console/include/functions_servers.php @@ -919,9 +919,10 @@ function servers_get_info($id_server=-1) // Remote servers LAG Calculation (server_type != 0). if ($server['server_type'] != 0) { + // MySQL 8.0 has function lag(). So, lag must be enclosed in quotations. $result = db_get_row_sql( 'SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, - AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag + AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS "lag" FROM tagente_estado, tagente_modulo, tagente WHERE utimestamp > 0 AND tagente.disabled = 0 @@ -935,9 +936,10 @@ function servers_get_info($id_server=-1) ); } else { // Local/Dataserver server LAG calculation. + // MySQL 8.0 has function lag(). So, lag must be enclosed in quotations. $result = db_get_row_sql( 'SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, - AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag + AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS "lag" FROM tagente_estado, tagente_modulo, tagente WHERE utimestamp > 0 AND tagente.disabled = 0 diff --git a/pandora_console/install.php b/pandora_console/install.php index 01dd3aba64..c891e8f385 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -965,9 +965,12 @@ function install_step4() $step5 = mysqli_query( $connection, - "GRANT ALL PRIVILEGES ON `$dbname`.* to pandora@$host - IDENTIFIED BY '".$random_password."'" + "CREATE USER pandora@$host IDENTIFIED BY '".$random_password."'" ); + $step5 |= mysqli_query( + $connection, + "GRANT ALL PRIVILEGES ON `$dbname`.* to pandora@$host" + ); mysqli_query($connection, 'FLUSH PRIVILEGES'); check_generic($step5, "Established privileges for user pandora. A new random password has been generated: $random_password
Please write it down, you will need to setup your Pandora FMS server, editing the /etc/pandora/pandora_server.conf file
"); From 0f34528f6f977573c2c722a70bde382f5dade905 Mon Sep 17 00:00:00 2001 From: Kike Date: Mon, 23 Dec 2019 17:28:40 +0100 Subject: [PATCH 14/67] Set default rcmd_timeout=10 and new rcmd_timeout_bin token --- pandora_server/conf/pandora_server.conf.new | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index fa9491ce14..11fed7ccee 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -164,7 +164,7 @@ network_timeout 4 # Network timeout (in seconds) for timeout in remote execution commands (PANDORA FMS ENTERPRISE ONLY). -rcmd_timeout 30 +rcmd_timeout 10 # Server keepalive (in seconds) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 6b9d63b935..e743a5f4ba 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -275,7 +275,8 @@ sub pandora_load_config { $pa_config->{"alert_recovery"} = 0; # Introduced on 1.3.1 $pa_config->{"snmp_checks"} = 1; # Introduced on 1.3.1 $pa_config->{"snmp_timeout"} = 8; # Introduced on 1.3.1 - $pa_config->{"rcmd_timeout"} = 30; # Introduced on 7.0.740 + $pa_config->{"rcmd_timeout"} = 10; # Introduced on 7.0.740 + $pa_config->{"rcmd_timeout_bin"} = '/usr/bin/timeout'; # Introduced on 7.0.743 $pa_config->{"snmp_trapd"} = '/usr/sbin/snmptrapd'; # 3.0 $pa_config->{"tcp_checks"} = 1; # Introduced on 1.3.1 $pa_config->{"tcp_timeout"} = 20; # Introduced on 1.3.1 @@ -803,6 +804,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^rcmd_timeout\s+([0-9]*)/i) { $pa_config->{"rcmd_timeout"} = clean_blank($1); } + elsif ($parametro =~ m/^rcmd_timeout_bin\s(.*)/i) { + $pa_config->{"rcmd_timeout_bin"} = clean_blank($1); + } elsif ($parametro =~ m/^tcp_checks\s+([0-9]*)/i) { $pa_config->{"tcp_checks"} = clean_blank($1); } From 3f09d13941d4e565862fd68585a3603164d51d09 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 24 Dec 2019 10:25:32 +0100 Subject: [PATCH 15/67] Fixed visual bug in grouped report item --- .../godmode/reporting/reporting_builder.item_editor.php | 2 +- 1 file changed, 1 insertion(+), 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 98ee756b7b..3e216679d6 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -3318,7 +3318,7 @@ function print_General_list($width, $action, $idItem=null, $type='general') case 'new': ?> - + From 79d3cd613f668b7902bca44ee43fcb409e271441 Mon Sep 17 00:00:00 2001 From: Kike Date: Tue, 24 Dec 2019 10:43:08 +0100 Subject: [PATCH 16/67] Added rcmd_timeout_bin token in pandora_server.conf by default --- pandora_server/conf/pandora_server.conf.new | 4 ++++ pandora_server/conf/pandora_server.conf.windows | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index 11fed7ccee..7d8efd1674 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -166,6 +166,10 @@ network_timeout 4 rcmd_timeout 10 +# Pandora FMS remote execution commands timeout tool filepath (by default at /usr/bin) + +rcmd_timeout_bin /usr/bin/timeout + # Server keepalive (in seconds) server_keepalive 45 diff --git a/pandora_server/conf/pandora_server.conf.windows b/pandora_server/conf/pandora_server.conf.windows index a7232e459c..44a36abad9 100644 --- a/pandora_server/conf/pandora_server.conf.windows +++ b/pandora_server/conf/pandora_server.conf.windows @@ -148,6 +148,14 @@ wmiserver 0 network_timeout 5 +# Network timeout (in seconds) for timeout in remote execution commands (PANDORA FMS ENTERPRISE ONLY). + +rcmd_timeout 10 + +# Pandora FMS remote execution commands timeout tool filepath (by default at /usr/bin) + +rcmd_timeout_bin C:\PandoraFMS\Pandora_Server\bin\pandora_exec.exe + # Server keepalive (in seconds) server_keepalive 45 From c79a4b2c0181761488c648b46e6a82b7103ca378 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 31 Dec 2019 11:24:54 +0100 Subject: [PATCH 17/67] fixed file vulnerability --- pandora_console/include/functions_filemanager.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index b3aa490edf..2c8ed90ee4 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -106,12 +106,8 @@ if (!function_exists('mime_content_type')) { finfo_close($finfo); return $mimetype; } else { - $temp = exec('file '.$filename); - if (isset($temp) && $temp != '') { - return $temp; - } else { - return 'application/octet-stream'; - } + error_log('Warning: Cannot find finfo_open function. Fileinfo extension is not enabled. Please add "extension=fileinfo.so" or "extension=fileinfo.dll" in your php.ini'); + return 'unknown'; } } From a3fdf4007d16ffdc38be604704a8f24eb25b0dc1 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 2 Jan 2020 10:04:41 +0100 Subject: [PATCH 18/67] Fixed method calls in Base.pm --- pandora_server/lib/PandoraFMS/Recon/Base.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 056495238c..ce6048a6f9 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1447,7 +1447,7 @@ sub cloud_scan($) { } else { # Unrecognized task type. - call('message', 'Unrecognized task type', 1); + $self->call('message', 'Unrecognized task type', 1); $self->call('update_progress', -1); return; } @@ -1469,7 +1469,7 @@ sub cloud_scan($) { if (!$cloudObj) { # Failed to initialize, check Cloud credentials or anything. - call('message', 'Unable to initialize PandoraFMS::Recon::Cloud::'.$type, 3); + $self->call('message', 'Unable to initialize PandoraFMS::Recon::Cloud::'.$type, 3); } else { # Let Cloud object manage scan. @@ -1581,7 +1581,7 @@ sub app_scan($) { $type = 'SAP'; } else { # Unrecognized task type. - call('message', 'Unrecognized task type', 1); + $self->call('message', 'Unrecognized task type', 1); $self->call('update_progress', -1); return; } @@ -1607,7 +1607,7 @@ sub app_scan($) { $self->{'c_network_percent'} = 0; # Send message - call('message', 'Checking target ' . $target, 10); + $self->call('message', 'Checking target ' . $target, 10); # Force target acquirement. $self->{'task_data'}->{'dbhost'} = $target; @@ -1633,7 +1633,7 @@ sub app_scan($) { # Verify if object is connected. If cannot connect to current target # return with module. if (!$obj->is_connected()) { - call('message', 'Cannot connect to target ' . $target, 3); + $self->call('message', 'Cannot connect to target ' . $target, 3); $global_percent += $global_step; $self->{'c_network_percent'} = 90; @@ -1739,7 +1739,7 @@ sub deploy_scan($) { if (!$deployer) { # Failed to initialize, check Cloud credentials or anything. - call('message', 'Unable to initialize PandoraFMS::Recon::Deployer', 3); + $self->call('message', 'Unable to initialize PandoraFMS::Recon::Deployer', 3); } else { # Let deployer object manage scan. From c1f026fea16f3d30be4406a35dc9590f260d5299 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 2 Jan 2020 11:05:48 +0100 Subject: [PATCH 19/67] restored pandora_server.spec classic --- pandora_server/pandora_server.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 10840ce046..b5acd25c09 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -18,8 +18,7 @@ Packager: Sancho Lerena Prefix: /usr/share BuildRoot: %{_tmppath}/%{name}-buildroot BuildArch: noarch -# PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd -Requires(pre,preun):/usr/bin/sed /usr/bin/grep /usr/sbin/useradd +PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd AutoReq: 0 Provides: %{name}-%{version} Requires: perl-DBI perl-DBD-mysql perl-libwww-perl @@ -44,10 +43,9 @@ A few examples of common resources monitored by Pandora FMS could be processor l %prep rm -rf $RPM_BUILD_ROOT -%setup -n pandora_server +%setup -q -n pandora_server %build -ls -latR %install From 7c952eaaa8af387cbf3b5e3e2ba0df22565473aa Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Tue, 7 Jan 2020 10:56:37 +0100 Subject: [PATCH 20/67] changes visual setup --- .../godmode/setup/setup_visuals.php | 153 +++++++++++------- 1 file changed, 95 insertions(+), 58 deletions(-) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index afc959e3af..1a87ba9e74 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -632,8 +632,24 @@ $row++; $table_font->size[0] = '50%'; $table_font->data = []; - $table_font->data[$row][0] = __('Font path'); - $fonts = load_fonts(); + $table_font->data[$row][0] = __('Graphs font family'); + + // Load font families. + $fonts = []; + $dirFonts = scandir(_MPDF_TTFONTPATH); + foreach ($dirFonts as $entryDir) { + if (strstr($entryDir, '.ttf') !== false) { + $explode = explode('-', $entryDir); + if (count($explode) === 1) { + $fonts[$entryDir] = substr($entryDir, 0, (strlen($entryDir) - 4)); + } + + if ($explode[1] === 'Regular.ttf') { + $fonts[$explode[0].'.ttf'] = $explode[0]; + } + } + } + $table_font->data[$row][1] = html_print_select( $fonts, 'fontpath', @@ -646,7 +662,7 @@ $row++; $row++; - $table_font->data[$row][0] = __('Font size'); + $table_font->data[$row][0] = __('Graphs font size'); $font_size_array = [ 1 => 1, @@ -882,14 +898,6 @@ $row++; $table_chars->data[$row][1] = html_print_select($options_zoom_graphs, 'zoom_graph', $config['zoom_graph'], '', '', 0, true, false, false); $row++; - $table_chars->data[$row][0] = __('Graph image height'); - $table_chars->data[$row][0] .= ui_print_help_tip( - __('This is the height in pixels of the module graph or custom graph in the reports (both: HTML and PDF)'), - true - ); - $table_chars->data[$row][1] = html_print_input_text('graph_image_height', $config['graph_image_height'], '', 20, 20, true); - $row++; - /* $table_font->data[$row][0] = __('Font path'); $fonts = load_fonts(); @@ -996,25 +1004,21 @@ $row++; echo '
'; // ---------------------------------------------------------------------- - // OTHER CONFIGURATION + // Reports // ---------------------------------------------------------------------- - $table_other = new stdClass(); - $table_other->width = '100%'; - $table_other->class = 'databox filters'; - $table_other->style[0] = 'font-weight: bold;'; - $table_other->size[0] = '50%'; - $table_other->size[1] = '26%'; - $table_other->size[2] = '12%'; - $table_other->size[3] = '12%'; + $table_report = new stdClass(); + $table_report->width = '100%'; + $table_report->class = 'databox filters'; + $table_report->style[0] = 'font-weight: bold;'; + $table_report->size[0] = '50%'; - $table_other->data = []; + $table_report->data = []; - // Enrique (27/01/2017) New feature: Show report info on top of reports - $table_other->data[$row][0] = __('Show report info with description').ui_print_help_tip( + $table_report->data[$row][0] = __('Show report info with description').ui_print_help_tip( __('Custom report description info. It will be applied to all reports and templates by default.'), true ); - $table_other->data[$row][1] = html_print_checkbox_switch( + $table_report->data[$row][1] = html_print_checkbox_switch( 'custom_report_info', 1, $config['custom_report_info'], @@ -1022,13 +1026,11 @@ $row++; ); $row++; - // ---------------------------------------------------------------------- - // Juanma (07/05/2014) New feature: Table for custom front page for reports - $table_other->data[$row][0] = __('Custom report front page').ui_print_help_tip( + $table_report->data[$row][0] = __('Custom report front page').ui_print_help_tip( __('Custom report front page. It will be applied to all reports and templates by default.'), true ); - $table_other->data[$row][1] = html_print_checkbox_switch( + $table_report->data[$row][1] = html_print_checkbox_switch( 'custom_report_front', 1, $config['custom_report_front'], @@ -1037,8 +1039,29 @@ $row++; $row++; - $table_other->data[$row][0] = __('Font size for items reports'); - $table_other->data[$row][1] = ""; + $table_report->data[$row][0] = __('PDF font size'); + $table_report->data[$row][1] = ""; + + $row++; + + $table_report->data[$row][0] = __('Graph image height for HTML reports'); + $table_report->data[$row][0] .= ui_print_help_tip( + __('This is the height in pixels of the module graph or custom graph in the reports (only: HTML)'), + true + ); + $table_report->data[$row][1] = html_print_input_text('graph_image_height', $config['graph_image_height'], '', 20, 20, true); + $row++; + + $interval_description = [ + 'large' => 'Long', + 'tiny' => 'Short', + ]; + $table_report->data[$row][0] = __('Interval description'); + $table_report->data[$row][0] .= ui_print_help_tip( + __('A long interval description is for example 10 hours, 20 minutes 33 seconds”, a short one is 10h 20m 33s'), + true + ); + $table_report->data[$row][1] = html_print_select($interval_description, 'interval_description', $config['interval_description'], '', '', '', true, false, false); $row++; @@ -1050,18 +1073,10 @@ $row++; } } - $_fonts = []; - $dirFonts = scandir(_MPDF_TTFONTPATH); - foreach ($dirFonts as $entryDir) { - if (strstr($entryDir, '.ttf') !== false) { - $_fonts[$entryDir] = $entryDir; - } - } - // Font - $table_other->data['custom_report_front-font'][0] = __('Custom report front').' - '.__('Font family'); - $table_other->data['custom_report_front-font'][1] = html_print_select( - $_fonts, + $table_report->data['custom_report_front-font'][0] = __('Custom report front').' - '.__('Font family'); + $table_report->data['custom_report_front-font'][1] = html_print_select( + $fonts, 'custom_report_front_font', $config['custom_report_front_font'], false, @@ -1071,11 +1086,11 @@ $row++; ); // Logo - $table_other->data['custom_report_front-logo'][0] = __('Custom report front').' - '.__('Custom logo').ui_print_help_tip( + $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 ); - $table_other->data['custom_report_front-logo'][1] = html_print_select( + $table_report->data['custom_report_front-logo'][1] = html_print_select( $customLogos, 'custom_report_front_logo', io_safe_output($config['custom_report_front_logo']), @@ -1085,16 +1100,16 @@ $row++; true ); // Preview - $table_other->data['custom_report_front-preview'][0] = __('Custom report front').' - '.'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'; } - $table_other->data['custom_report_front-preview'][1] = ''.html_print_image($config['custom_report_front_logo'], true).''; + $table_report->data['custom_report_front-preview'][1] = ''.html_print_image($config['custom_report_front_logo'], true).''; // Header - $table_other->data['custom_report_front-header'][0] = __('Custom report front').' - '.__('Header'); - $table_other->data['custom_report_front-header'][1] = html_print_textarea( + $table_report->data['custom_report_front-header'][0] = __('Custom report front').' - '.__('Header'); + $table_report->data['custom_report_front-header'][1] = html_print_textarea( 'custom_report_front_header', 5, 15, @@ -1104,13 +1119,13 @@ $row++; ); // First page - $table_other->data['custom_report_front-first_page'][0] = __('Custom report front').' - '.__('First page'); + $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'] ); - $table_other->data['custom_report_front-first_page'][1] = html_print_textarea( + $table_report->data['custom_report_front-first_page'][1] = html_print_textarea( 'custom_report_front_firstpage', 15, 15, @@ -1120,8 +1135,8 @@ $row++; ); // Footer - $table_other->data['custom_report_front-footer'][0] = __('Custom report front').' - '.__('Footer'); - $table_other->data['custom_report_front-footer'][1] = html_print_textarea( + $table_report->data['custom_report_front-footer'][0] = __('Custom report front').' - '.__('Footer'); + $table_report->data['custom_report_front-footer'][1] = html_print_textarea( 'custom_report_front_footer', 5, 15, @@ -1130,8 +1145,24 @@ $row++; true ); + echo '
'; + echo ''.__('Reports configuration').''; + html_print_table($table_report); + echo '
'; + // ---------------------------------------------------------------------- + // OTHER CONFIGURATION + // ---------------------------------------------------------------------- + $table_other = new stdClass(); + $table_other->width = '100%'; + $table_other->class = 'databox filters'; + $table_other->style[0] = 'font-weight: bold;'; + $table_other->size[0] = '50%'; + $table_other->size[1] = '26%'; + $table_other->size[2] = '12%'; + $table_other->size[3] = '12%'; + $table_other->data = []; $table_other->data[$row][0] = __('Custom graphviz directory').ui_print_help_tip(__('Custom directory where the graphviz binaries are stored.'), true); $table_other->data[$row][1] = html_print_input_text( @@ -1156,8 +1187,6 @@ $row++; ); $row++; - - $table_other->data[$row][0] = __('Show only the group name'); $table_other->data[$row][0] .= ui_print_help_tip( __('Show the group name instead the group icon.'), @@ -1179,16 +1208,23 @@ $row++; if ($config['prominent_time'] == 'comparation') { $timestamp = false; $comparation = true; + $compact = false; } else if ($config['prominent_time'] == 'timestamp') { $timestamp = true; $comparation = false; + $compact = false; + } else if ($config['prominent_time'] == 'compact') { + $timestamp = false; + $comparation = false; + $compact = true; } - $table_other->data[$row][0] = __('Timestamp or time comparation'); - $table_other->data[$row][1] = __('Comparation in rollover').' '; - $table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'comparation', '', $comparation, true); - $table_other->data[$row][1] .= '
'.__('Timestamp in rollover').' '; - $table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'timestamp', '', $timestamp, true); + $table_other->data[$row][0] = __('Timestamp, time comparison, or compact mode'); + $table_other->data[$row][1] = '
'; + $table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'comparation', __('Comparation in rollover'), $comparation, true); + $table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'timestamp', __('Timestamp in rollover'), $timestamp, true); + $table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'compact', __('Compact mode'), $compact, true); + $table_other->data[$row][1] .= '
'; $row++; @@ -1294,6 +1330,7 @@ $row++; 'class="sub cancel"', true ); + $table_other->data[$row][3] .= html_print_input_hidden( 'custom_module_unit_to_delete', '', From f6163f4f80b54f9972a9cb57cb35c3f6ef08b34d Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 7 Jan 2020 17:31:14 +0100 Subject: [PATCH 21/67] Secured get_file script for unauthorized file download --- .../extensions/files_repo/files_repo_list.php | 8 ++-- .../include/functions_filemanager.php | 10 +++-- pandora_console/include/get_file.php | 41 ++++++++++++------- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/pandora_console/extensions/files_repo/files_repo_list.php b/pandora_console/extensions/files_repo/files_repo_list.php index 80de4563ae..e0ca07366d 100644 --- a/pandora_console/extensions/files_repo/files_repo_list.php +++ b/pandora_console/extensions/files_repo/files_repo_list.php @@ -64,9 +64,11 @@ if (!empty($files)) { $document_root = str_replace('\\', '/', io_safe_output($_SERVER['DOCUMENT_ROOT'])); $file['location'] = str_replace('\\', '/', io_safe_output($file['location'])); $relative_path = str_replace($document_root, '', $file['location']); - $file_path = base64_encode($relative_path); - $hash = md5($relative_path.$config['dbpass']); - $url = ui_get_full_url("include/get_file.php?file=$file_path&hash=$hash"); + $file_name = explode('/', $file['location']); + $file_decoded = $file_name[(count($file_name) - 1)]; + $file_path = base64_encode($file_decoded); + $hash = md5($file_path.$config['dbpass']); + $url = ui_get_full_url('include/get_file.php?file='.urlencode($file_path).'&hash='.$hash); $date_format = ($config['date_format']) ? io_safe_output($config['date_format']) : 'F j, Y - H:m'; $data[0] = "".$file['name'].''; diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index b3aa490edf..801ead1d82 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -694,8 +694,9 @@ function filemanager_file_explorer( $data[1] = ''.$fileinfo['name'].''; } else { - $hash = md5($relative_path.$config['dbpass']); - $data[1] = ''.$fileinfo['name'].''; + $filename = base64_encode($relative_directory.'/'.$fileinfo['name']); + $hash = md5($filename.$config['dbpass']); + $data[1] = ''.$fileinfo['name'].''; } // Notice that uploaded php files could be dangerous @@ -755,8 +756,9 @@ function filemanager_file_explorer( } if ((!$fileinfo['is_dir']) && ($download_button)) { - $hash = md5($fileinfo['realpath'].$config['dbpass']); - $data[4] .= ''; + $filename = base64_encode($fileinfo['name']); + $hash = md5($filename.$config['dbpass']); + $data[4] .= ''; $data[4] .= html_print_image('images/file.png', true); $data[4] .= ''; } diff --git a/pandora_console/include/get_file.php b/pandora_console/include/get_file.php index 0f0fd30353..550e7e92fd 100644 --- a/pandora_console/include/get_file.php +++ b/pandora_console/include/get_file.php @@ -29,29 +29,42 @@ if ($auth_method != 'ad' && $auth_method != 'ldap') { $styleError = 'background:url("../images/err.png") no-repeat scroll 0 0 transparent; padding:4px 1px 6px 30px; color:#CC0000;'; -$file = get_parameter('file', null); +$file_raw = get_parameter('file', null); -$file = base64_decode($file); +$file = base64_decode(urldecode($file_raw)); $hash = get_parameter('hash', null); -$testHash = md5($file.$config['dbpass']); - -if ($hash != $testHash) { +if ($file === '' || $hash === '' || $hash !== md5($file_raw.$config['dbpass']) || !isset($_SERVER['HTTP_REFERER'])) { echo "

".__('Security error. Please contact the administrator.').'

'; -} else if (!empty($file) && !empty($hash)) { - // echo $file; - if (!file_exists($file)) { - $file = $_SERVER['DOCUMENT_ROOT'].$file; +} else { + $downloadable_file = ''; + $parse_all_queries = explode('&', parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY)); + $parse_sec2_query = explode('=', $parse_all_queries[1]); + if ($parse_sec2_query[0] === 'sec2') { + switch ($parse_sec2_query[1]) { + case 'godmode/setup/file_manager': + $downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/'.$file; + break; + + case 'extensions/files_repo': + $downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/files_repo/'.$file; + break; + + default: + $downloadable_file = ''; + // Do nothing + break; + } } - if (!file_exists($file)) { + if ($downloadable_file === '' || !file_exists($downloadable_file)) { echo "

".__('File is missing in disk storage. Please contact the administrator.').'

'; } else { header('Content-type: aplication/octet-stream;'); - header('Content-type: '.mime_content_type($file).';'); - header('Content-Length: '.filesize($file)); - header('Content-Disposition: attachment; filename="'.basename($file).'"'); - readfile($file); + header('Content-type: '.mime_content_type($downloadable_file).';'); + header('Content-Length: '.filesize($downloadable_file)); + header('Content-Disposition: attachment; filename="'.basename($downloadable_file).'"'); + readfile($downloadable_file); } } From b6d5d1a15ae4762dd6e06a1428f343726cc5b253 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 8 Jan 2020 15:23:39 +0100 Subject: [PATCH 22/67] Fixed bug with clock item in the visual consoles in meta --- pandora_console/include/functions_visual_map.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 417b6dc587..ca91f8aaa6 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1593,6 +1593,7 @@ function visual_map_print_item( case CLOCK: if ((get_parameter('action') == 'edit') || (get_parameter('operation') == 'edit_visualmap')) { + $image_prefix = (is_metaconsole()) ? '../../' : ''; if ($width == 0) { if ($layoutData['id_metaconsole'] != 0) { if ($layoutData['clock_animation'] == 'analogic_1') { @@ -1606,17 +1607,16 @@ function visual_map_print_item( } } else { if ($layoutData['clock_animation'] == 'analogic_1') { - $img = ''; + $img = ''; } else { if ($layoutData['time_format'] == 'time') { - $img = ''; + $img = ''; } else { - $img = ''; + $img = ''; } } } } else { - $image_prefix = ($layoutData['id_metaconsole'] != 0) ? '../../' : ''; if ($layoutData['clock_animation'] == 'analogic_1') { $img = ''; } else { @@ -1901,7 +1901,7 @@ function visual_map_print_item( } } else { $is_meta = is_metaconsole(); - + $agents_critical = agents_get_agents( [ 'disabled' => 0, From f4bc1723559ac1b49456f59ed64e094e44cea530 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 11 Jan 2020 00:01:09 +0100 Subject: [PATCH 23/67] 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 271486bbcb..dd6d2f102c 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200110 +Version: 7.0NG.742-200111 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 1023942f57..c3f59511ba 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.742-200110" +pandora_version="7.0NG.742-200111" 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 d586df1175..a9a45f5e68 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.742'; -use constant AGENT_BUILD => '200110'; +use constant AGENT_BUILD => '200111'; # 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 a4348b972d..bd2d6f99f9 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.742 -%define release 200110 +%define release 200111 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 9c237621ec..90c784d1a5 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.742 -%define release 200110 +%define release 200111 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 6367b03824..5471dee086 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200110" +PI_BUILD="200111" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 4f959dbb5e..88f6d28860 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200110} +{200111} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index fe1e45b5cc..19147805d8 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.742(Build 200110)") +#define PANDORA_VERSION ("7.0NG.742(Build 200111)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4bda8a6719..ea3933e160 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.742(Build 200110))" + VALUE "ProductVersion", "(7.0NG.742(Build 200111))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 71905b7ebf..0210149fc6 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200110 +Version: 7.0NG.742-200111 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 87e7e5ee76..5e94886649 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.742-200110" +pandora_version="7.0NG.742-200111" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9c424f92e2..b071774c7a 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 = 'PC200110'; +$build_version = 'PC200111'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 854974ac00..5def03be81 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 8acae1b0b4..78821d751e 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.742 -%define release 200110 +%define release 200111 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 5beef39208..d9a02ef507 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.742 -%define release 200110 +%define release 200111 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 3993c9aff4..105e6c2ce6 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200110" +PI_BUILD="200111" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 4da8b67f13..06137bef2a 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.742 PS200110"; +my $version = "7.0NG.742 PS200111"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d2fa6f2f5b..a91d261190 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.742 PS200110"; +my $version = "7.0NG.742 PS200111"; # save program name for logging my $progname = basename($0); From f7ea19863fd0023b76ac8d259f87716aa904197e Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 12 Jan 2020 00:01:08 +0100 Subject: [PATCH 24/67] 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 dd6d2f102c..1b6a12a634 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200111 +Version: 7.0NG.742-200112 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 c3f59511ba..9ac8606ff6 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.742-200111" +pandora_version="7.0NG.742-200112" 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 a9a45f5e68..7ce49e1636 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.742'; -use constant AGENT_BUILD => '200111'; +use constant AGENT_BUILD => '200112'; # 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 bd2d6f99f9..e598eed279 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.742 -%define release 200111 +%define release 200112 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 90c784d1a5..a52cd44c51 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.742 -%define release 200111 +%define release 200112 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 5471dee086..bb57084db4 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200111" +PI_BUILD="200112" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 88f6d28860..ad6c819275 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200111} +{200112} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 19147805d8..1d618a9550 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.742(Build 200111)") +#define PANDORA_VERSION ("7.0NG.742(Build 200112)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index ea3933e160..a24b6b013b 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.742(Build 200111))" + VALUE "ProductVersion", "(7.0NG.742(Build 200112))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 0210149fc6..9b3f130936 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200111 +Version: 7.0NG.742-200112 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 5e94886649..279d59e331 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.742-200111" +pandora_version="7.0NG.742-200112" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index b071774c7a..6bf84aab22 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 = 'PC200111'; +$build_version = 'PC200112'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 5def03be81..68650db1f2 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 78821d751e..e8aabe3761 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.742 -%define release 200111 +%define release 200112 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index d9a02ef507..1c203729ca 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.742 -%define release 200111 +%define release 200112 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 105e6c2ce6..0aa0379819 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200111" +PI_BUILD="200112" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 06137bef2a..ba882a5f71 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.742 PS200111"; +my $version = "7.0NG.742 PS200112"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a91d261190..4c12941f83 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.742 PS200111"; +my $version = "7.0NG.742 PS200112"; # save program name for logging my $progname = basename($0); From 2fa637ee4de72fc53a6128841612700bbfdd20d4 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 13 Jan 2020 00:01:08 +0100 Subject: [PATCH 25/67] 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 1b6a12a634..3a3027a6fd 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200112 +Version: 7.0NG.742-200113 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 9ac8606ff6..c9453f3fb2 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.742-200112" +pandora_version="7.0NG.742-200113" 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 7ce49e1636..4d728d0008 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.742'; -use constant AGENT_BUILD => '200112'; +use constant AGENT_BUILD => '200113'; # 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 e598eed279..047ee13afe 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.742 -%define release 200112 +%define release 200113 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 a52cd44c51..9aa2292cee 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.742 -%define release 200112 +%define release 200113 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 bb57084db4..e163bd087c 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200112" +PI_BUILD="200113" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ad6c819275..bec07f8982 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200112} +{200113} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 1d618a9550..004eccac56 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.742(Build 200112)") +#define PANDORA_VERSION ("7.0NG.742(Build 200113)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a24b6b013b..07f4a61cc6 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.742(Build 200112))" + VALUE "ProductVersion", "(7.0NG.742(Build 200113))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9b3f130936..cd5255f13a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200112 +Version: 7.0NG.742-200113 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 279d59e331..5616aecefa 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.742-200112" +pandora_version="7.0NG.742-200113" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6bf84aab22..56ec47231b 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 = 'PC200112'; +$build_version = 'PC200113'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 68650db1f2..8f532b8d49 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 e8aabe3761..6ce68748b8 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.742 -%define release 200112 +%define release 200113 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1c203729ca..7bed1022d4 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.742 -%define release 200112 +%define release 200113 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 0aa0379819..25a89cfce6 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200112" +PI_BUILD="200113" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index ba882a5f71..1092e461f5 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.742 PS200112"; +my $version = "7.0NG.742 PS200113"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 4c12941f83..221d99dbb1 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.742 PS200112"; +my $version = "7.0NG.742 PS200113"; # save program name for logging my $progname = basename($0); From 49e03f5e4420e2c200a818f742670c39e88fda66 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 13 Jan 2020 11:29:18 +0100 Subject: [PATCH 26/67] Fixed XSS vulnerability --- pandora_console/godmode/reporting/graphs.php | 2 +- pandora_console/include/functions_reporting.php | 4 +++- pandora_console/include/functions_reporting_html.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index 155eb560db..958819a95b 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -290,7 +290,7 @@ $table_aux = new stdClass(); foreach ($result_graphs as $graph) { $data = []; - $data[0] = ''.ui_print_truncate_text(io_safe_output($graph['name']), 70).''; + $data[0] = ''.ui_print_truncate_text($graph['name'], 70).''; $data[1] = ui_print_truncate_text($graph['description'], 70); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 7bffd6087d..44b6651c3b 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -190,6 +190,8 @@ function reporting_make_reporting_data( $metaconsole_on = is_metaconsole(); $index_content = 0; foreach ($contents as $content) { + $content['name'] = io_safe_input($content['name']); + $content['description'] = io_safe_input($content['description']); if (!empty($content['id_agent_module']) && !empty($content['id_agent']) && tags_has_user_acl_tags($config['id_user']) ) { @@ -7640,7 +7642,7 @@ function reporting_custom_graph( $return['title'] = $content['name']; $return['landscape'] = $content['landscape']; $return['pagebreak'] = $content['pagebreak']; - $return['subtitle'] = io_safe_output($graph['name']); + $return['subtitle'] = $graph['name']; $return['agent_name'] = $agent_alias; $return['module_name'] = $module_name; $return['description'] = $content['description']; diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index ac7ee7cd21..b81024559f 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -130,7 +130,7 @@ function html_do_report_info($report) $html .= ' - '.__('Description').': '.io_safe_output($report['description']).' + '.__('Description').': '.htmlspecialchars($report['description']).' '.'
'; From 40a86384c24de8542608de43195d6f89f9493288 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Mon, 13 Jan 2020 13:00:43 +0100 Subject: [PATCH 27/67] Add comment in events when status is changed --- pandora_console/include/functions_events.php | 32 +++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 53005037df..aa4bb5edec 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -624,7 +624,37 @@ function events_update_status($id_evento, $status, $filter=null, $history=false) break; } - return db_process_sql($update_sql); + $result = db_process_sql($update_sql); + + if ($result) { + switch ($status) { + case EVENT_STATUS_NEW: + $status_string = 'New'; + break; + + case EVENT_STATUS_VALIDATED: + $status_string = 'Validated'; + break; + + case EVENT_STATUS_INPROCESS: + $status_string = 'In process'; + break; + + default: + $status_string = ''; + break; + } + + events_comment( + $id_evento, + '', + 'Change status to '.$status_string, + is_metaconsole() ? true : false, + $history + ); + } + + return $result; } From 1747806256f72fd2fdd4a26e20860f8503930535 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Mon, 13 Jan 2020 18:19:50 +0100 Subject: [PATCH 28/67] Ent 3136 no se ven los eventos en el mapa de servicios cuando haces click en los elementos de un servicio creado en la meta --- pandora_console/operation/events/events.php | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 700a2026c1..9cabe15b47 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -135,6 +135,10 @@ $id_agent = get_parameter( 'filter[id_agent]', $filter['id_agent'] ); +$text_module = get_parameter( + 'filter[text_module]', + $filter['text_module'] +); $id_agent_module = get_parameter( 'filter[id_agent_module]', $filter['id_agent_module'] @@ -210,10 +214,38 @@ $id_source_event = get_parameter( $filter['id_source_event'] ); +$server_id = get_parameter( + 'filter[server_id]', + $filter['id_server_meta'] +); + +if (is_metaconsole()) { + // Connect to node database. + $id_node = $server_id; + if ($id_node != 0) { + if (metaconsole_connect(null, $id_node) != NOERR) { + return false; + } + } +} + + if (empty($text_agent) && !empty($id_agent)) { $text_agent = agents_get_alias($id_agent); } +if (empty($text_module) && !empty($id_agent_module)) { + $text_module = modules_get_agentmodule_name($id_agent_module); + $text_agent = agents_get_alias(modules_get_agentmodule_agent($id_agent_module)); +} + +if (is_metaconsole()) { + // Return to metaconsole database. + if ($id_node != 0) { + metaconsole_restore_db(); + } +} + // Ajax responses. if (is_ajax()) { $get_events = get_parameter('get_events', 0); From db49db371116bcc4bf6b2c88045062c816d1e000 Mon Sep 17 00:00:00 2001 From: Luis Date: Mon, 13 Jan 2020 18:21:48 +0100 Subject: [PATCH 29/67] report font not depending of custom report front enabled --- .../godmode/reporting/reporting_builder.php | 4 +-- .../godmode/setup/setup_visuals.php | 28 +++++++++---------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index e5e7121b10..4ff734bef9 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1207,8 +1207,7 @@ switch ($action) { $report_id_user = get_parameter('report_id_user'); $non_interactive = get_parameter('non_interactive', 0); - // Pretty font by default for pdf. - $custom_font = 'FreeSans.ttf'; + $custom_font = $config['custom_report_front_font']; switch ($type_access_selected) { case 'group_view': @@ -1284,7 +1283,6 @@ switch ($action) { $metaconsole_report = (int) is_metaconsole(); if ($config['custom_report_front']) { - $custom_font = $config['custom_report_front_font']; $logo = $config['custom_report_front_logo']; $header = $config['custom_report_front_header']; $first_page = $config['custom_report_front_firstpage']; diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 60da29ea46..32268e7c1a 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1048,6 +1048,20 @@ $row++; $row++; + $table_report->data[$row][0] = __('PDF font family'); + $table_report->data[$row][1] = html_print_select( + $fonts, + 'custom_report_front_font', + $config['custom_report_front_font'], + false, + __('Default'), + '', + true + ); + + $row++; + + $table_report->data[$row][0] = __('Graph image height for HTML reports'); $table_report->data[$row][0] .= ui_print_help_tip( __('This is the height in pixels of the module graph or custom graph in the reports (only: HTML)'), @@ -1078,18 +1092,6 @@ $row++; } } - // Font - $table_report->data['custom_report_front-font'][0] = __('Custom report front').' - '.__('Font family'); - $table_report->data['custom_report_front-font'][1] = html_print_select( - $fonts, - 'custom_report_front_font', - $config['custom_report_front_font'], - false, - __('Default'), - '', - true - ); - // 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."), @@ -1397,7 +1399,6 @@ function edit_csv_divider () { function display_custom_report_front (show,table) { if (show == true) { - $('tr#'+table+'-custom_report_front-font').show(); $('tr#'+table+'-custom_report_front-logo').show(); $('tr#'+table+'-custom_report_front-preview').show(); $('tr#'+table+'-custom_report_front-header').show(); @@ -1405,7 +1406,6 @@ function display_custom_report_front (show,table) { $('tr#'+table+'-custom_report_front-footer').show(); } else { - $('tr#'+table+'-custom_report_front-font').hide(); $('tr#'+table+'-custom_report_front-logo').hide(); $('tr#'+table+'-custom_report_front-preview').hide(); $('tr#'+table+'-custom_report_front-header').hide(); From 7204e7c0f2e5bcceb1a26fc835aedf3662987265 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 13 Jan 2020 18:24:29 +0100 Subject: [PATCH 30/67] Ent 4862 mas opciones en los filtros de severidad --- pandora_console/extras/mr/35.sql | 5 + .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 1 + .../godmode/events/event_edit_filter.php | 21 +++- pandora_console/include/ajax/events.php | 12 +- pandora_console/include/functions_events.php | 103 ++++++++++++------ pandora_console/include/styles/events.css | 8 +- pandora_console/operation/events/events.php | 40 ++++--- pandora_console/pandoradb.sql | 2 +- 8 files changed, 126 insertions(+), 66 deletions(-) create mode 100644 pandora_console/extras/mr/35.sql diff --git a/pandora_console/extras/mr/35.sql b/pandora_console/extras/mr/35.sql new file mode 100644 index 0000000000..86236df36f --- /dev/null +++ b/pandora_console/extras/mr/35.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +ALTER TABLE `tevent_filter` MODIFY `severity` TEXT NOT 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 ca415cd52a..0c95628752 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 @@ -1401,6 +1401,7 @@ ALTER TABLE tevent_filter ADD COLUMN `source` tinytext NOT NULL; ALTER TABLE tevent_filter ADD COLUMN `id_extra` tinytext NOT NULL; ALTER TABLE tevent_filter ADD COLUMN `id_source_event` int(10); ALTER TABLE `tevent_filter` MODIFY COLUMN `user_comment` text NOT NULL; +ALTER TABLE `tevent_filter` MODIFY COLUMN `severity` text NOT NULL; -- --------------------------------------------------------------------- -- Table `tusuario` diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php index 41068372d4..a677c6f801 100644 --- a/pandora_console/godmode/events/event_edit_filter.php +++ b/pandora_console/godmode/events/event_edit_filter.php @@ -55,7 +55,7 @@ if ($id) { $id_group = $filter['id_group']; $id_name = $filter['id_name']; $event_type = $filter['event_type']; - $severity = $filter['severity']; + $severity = explode(',', $filter['severity']); $status = $filter['status']; $search = $filter['search']; $text_agent = $filter['text_agent']; @@ -123,7 +123,7 @@ if ($update || $create) { $id_group_filter = get_parameter('id_group_filter'); $id_name = (string) get_parameter('id_name'); $event_type = get_parameter('event_type', ''); - $severity = get_parameter('severity', ''); + $severity = implode(',', get_parameter('severity', -1)); $status = get_parameter('status', ''); $search = get_parameter('search', ''); $text_agent = get_parameter('text_agent', ''); @@ -172,6 +172,8 @@ if ($update || $create) { 'user_comment' => $user_comment, 'filter_only_alert' => $filter_only_alert, ]; + + $severity = explode(',', $severity); } if ($update) { @@ -289,15 +291,24 @@ $table->data[3][1] = html_print_select( true ); +if (empty($severity) && $severity !== '0') { + $severity = -1; +} + $table->data[4][0] = ''.__('Severity').''; $table->data[4][1] = html_print_select( get_priorities(), - 'severity', + 'severity[]', $severity, '', __('All'), - '-1', - true + -1, + true, + true, + true, + '', + false, + 'width: 175px' ); $fields = events_get_all_status(); diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 24fa8be341..2a068e0214 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -231,7 +231,7 @@ if ($save_event_filter) { $values['id_name'] = get_parameter('id_name'); $values['id_group'] = get_parameter('id_group'); $values['event_type'] = get_parameter('event_type'); - $values['severity'] = get_parameter('severity'); + $values['severity'] = implode(',', get_parameter('severity', -1)); $values['status'] = get_parameter('status'); $values['search'] = get_parameter('search'); $values['text_agent'] = get_parameter('text_agent'); @@ -278,7 +278,7 @@ if ($update_event_filter) { $id = get_parameter('id'); $values['id_group'] = get_parameter('id_group'); $values['event_type'] = get_parameter('event_type'); - $values['severity'] = get_parameter('severity'); + $values['severity'] = implode(',', get_parameter('severity', -1)); $values['status'] = get_parameter('status'); $values['search'] = get_parameter('search'); $values['text_agent'] = get_parameter('text_agent'); @@ -439,8 +439,10 @@ function load_form_filter() { $("#id_group").val(val); if (i == 'event_type') $("#event_type").val(val); - if (i == 'severity') - $("#severity").val(val); + if (i == 'severity') { + const multiple = val.split(","); + $("#severity").val(multiple); + } if (i == 'status') $("#status").val(val); if (i == 'search') @@ -1579,7 +1581,7 @@ if ($get_list_events_agents) { $id_agent = get_parameter('id_agent'); $server_id = get_parameter('server_id'); $event_type = get_parameter('event_type'); - $severity = get_parameter('severity'); + $severity = implode(',', get_parameter('severity', -1)); $status = get_parameter('status'); $search = get_parameter('search'); $id_agent_module = get_parameter('id_agent_module'); diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 53005037df..3734c93092 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -751,43 +751,78 @@ function events_get_all( } if (isset($filter['severity']) && $filter['severity'] > 0) { - switch ($filter['severity']) { - case EVENT_CRIT_MAINTENANCE: - case EVENT_CRIT_INFORMATIONAL: - case EVENT_CRIT_NORMAL: - case EVENT_CRIT_MINOR: - case EVENT_CRIT_WARNING: - case EVENT_CRIT_MAJOR: - case EVENT_CRIT_CRITICAL: - default: - $sql_filters[] = sprintf( - ' AND criticity = %d ', - $filter['severity'] - ); - break; + if (is_array($filter['severity'])) { + if (!in_array(-1, $filter['severity'])) { + $not_normal = array_search(EVENT_CRIT_NOT_NORMAL, $filter['severity']); + if ($not_normal !== false) { + unset($filter['severity'][$not_normal]); + $sql_filters[] = sprintf( + ' AND criticity != %d', + EVENT_CRIT_NORMAL + ); + } else { + $critical_warning = array_search(EVENT_CRIT_WARNING_OR_CRITICAL, $filter['severity']); + if ($critical_warning !== false) { + unset($filter['severity'][$critical_warning]); + $filter['severity'][] = EVENT_CRIT_WARNING; + $filter['severity'][] = EVENT_CRIT_CRITICAL; + } - case EVENT_CRIT_WARNING_OR_CRITICAL: - $sql_filters[] = sprintf( - ' AND (criticity = %d OR criticity = %d)', - EVENT_CRIT_WARNING, - EVENT_CRIT_CRITICAL - ); - break; + $critical_normal = array_search(EVENT_CRIT_OR_NORMAL, $filter['severity']); + if ($critical_normal !== false) { + unset($filter['severity'][$critical_normal]); + $filter['severity'][] = EVENT_CRIT_NORMAL; + $filter['severity'][] = EVENT_CRIT_CRITICAL; + } - case EVENT_CRIT_NOT_NORMAL: - $sql_filters[] = sprintf( - ' AND criticity != %d', - EVENT_CRIT_NORMAL - ); - break; + if (!empty($filter['severity'])) { + $filter['severity'] = implode(',', $filter['severity']); + $sql_filters[] = sprintf( + ' AND criticity IN (%s)', + $filter['severity'] + ); + } + } + } + } else { + switch ($filter['severity']) { + case EVENT_CRIT_MAINTENANCE: + case EVENT_CRIT_INFORMATIONAL: + case EVENT_CRIT_NORMAL: + case EVENT_CRIT_MINOR: + case EVENT_CRIT_WARNING: + case EVENT_CRIT_MAJOR: + case EVENT_CRIT_CRITICAL: + default: + $sql_filters[] = sprintf( + ' AND criticity = %d ', + $filter['severity'] + ); + break; - case EVENT_CRIT_OR_NORMAL: - $sql_filters[] = sprintf( - ' AND (criticity = %d OR criticity = %d)', - EVENT_CRIT_NORMAL, - EVENT_CRIT_CRITICAL - ); - break; + case EVENT_CRIT_WARNING_OR_CRITICAL: + $sql_filters[] = sprintf( + ' AND (criticity = %d OR criticity = %d)', + EVENT_CRIT_WARNING, + EVENT_CRIT_CRITICAL + ); + break; + + case EVENT_CRIT_NOT_NORMAL: + $sql_filters[] = sprintf( + ' AND criticity != %d', + EVENT_CRIT_NORMAL + ); + break; + + case EVENT_CRIT_OR_NORMAL: + $sql_filters[] = sprintf( + ' AND (criticity = %d OR criticity = %d)', + EVENT_CRIT_NORMAL, + EVENT_CRIT_CRITICAL + ); + break; + } } } diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index 9461fcf424..a0b2fdf89c 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -30,7 +30,6 @@ div.mini-criticity.h100p { form.flex-row div.filter_input, form.flex-row ul { width: 30%; - min-width: 300px; display: flex; flex-direction: row; align-items: baseline; @@ -47,12 +46,13 @@ div.filter_input_little { flex-direction: row; align-items: baseline; flex-wrap: nowrap; - margin: 0.5em 0 0.5em 1em; + margin: 0.5em 0 0.5em 0em; } form.flex-row div.filter_input.large { flex: 1; - min-width: 470px; + min-width: 700px; + max-width: 100%; } div.filter_input > label, @@ -120,6 +120,8 @@ table.dataTable tbody td { .filter_input { align-items: center; + min-width: 400px; + max-width: 450px; } .filter_input_little > select, diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 9cabe15b47..3b065f9c12 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -894,22 +894,6 @@ $in = '
'; $in .= $data.'
'; $inputs[] = $in; -// Criticity - severity. -$severity_select .= html_print_select( - get_priorities(), - 'severity', - $severity, - '', - __('All'), - '-1', - true, - false, - false -); -$in = '
'; -$in .= $severity_select.'
'; -$inputs[] = $in; - // Event status. $data = html_print_select( events_get_all_status(), @@ -961,6 +945,28 @@ $in = '
'; $in .= $data.'
'; $inputs[] = $in; +if (empty($severity) && $severity !== '0') { + $severity = -1; +} + +// Criticity - severity. +$data = html_print_select( + get_priorities(), + 'severity', + $severity, + '', + __('All'), + -1, + true, + true, + true, + '', + false +); +$in = '
'; +$in .= $data.'
'; +$inputs[] = $in; + $buttons = []; $buttons[] = [ @@ -1115,8 +1121,6 @@ if (is_metaconsole()) { $adv_inputs[] = $in; } -// Gap. -$adv_inputs[] = '
'; // Date from. $data = html_print_input_text( diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index d1db588a10..a42a9592c3 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1098,7 +1098,7 @@ CREATE TABLE IF NOT EXISTS `tevent_filter` ( `id_name` varchar(600) NOT NULL, `id_group` int(10) NOT NULL default 0, `event_type` text NOT NULL, - `severity` int(10) NOT NULL default -1, + `severity` text NOT NULL, `status` int(10) NOT NULL default -1, `search` TEXT, `text_agent` TEXT, From 8038e16c25ea5540849dc5e1dfa38908bcb07ca8 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 14 Jan 2020 00:01:11 +0100 Subject: [PATCH 31/67] 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 3a3027a6fd..ccf1e6c2ad 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200113 +Version: 7.0NG.742-200114 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 c9453f3fb2..7314499ab3 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.742-200113" +pandora_version="7.0NG.742-200114" 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 4d728d0008..6e1efa4868 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.742'; -use constant AGENT_BUILD => '200113'; +use constant AGENT_BUILD => '200114'; # 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 047ee13afe..f47a498bdc 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.742 -%define release 200113 +%define release 200114 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 9aa2292cee..acb7a38982 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.742 -%define release 200113 +%define release 200114 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 e163bd087c..051e123b28 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200113" +PI_BUILD="200114" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index bec07f8982..83bfea33da 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200113} +{200114} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 004eccac56..8a3003ecd3 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.742(Build 200113)") +#define PANDORA_VERSION ("7.0NG.742(Build 200114)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 07f4a61cc6..f4af970791 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.742(Build 200113))" + VALUE "ProductVersion", "(7.0NG.742(Build 200114))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index cd5255f13a..ac738db348 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200113 +Version: 7.0NG.742-200114 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 5616aecefa..7017eea4f8 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.742-200113" +pandora_version="7.0NG.742-200114" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 56ec47231b..4e63624557 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 = 'PC200113'; +$build_version = 'PC200114'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 8f532b8d49..c568f67531 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 6ce68748b8..c689ba7a7a 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.742 -%define release 200113 +%define release 200114 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 7bed1022d4..ce662c1222 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.742 -%define release 200113 +%define release 200114 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 25a89cfce6..20a9682602 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200113" +PI_BUILD="200114" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 1092e461f5..61e03cf39d 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.742 PS200113"; +my $version = "7.0NG.742 PS200114"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 221d99dbb1..f068b6d93a 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.742 PS200113"; +my $version = "7.0NG.742 PS200114"; # save program name for logging my $progname = basename($0); From 7c928b8100c573a0563fdd0b1eb966ac5e57ded3 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Tue, 14 Jan 2020 08:37:04 +0100 Subject: [PATCH 32/67] Ent 4795 check seleccionar todos queda marcado --- pandora_console/include/javascript/pandora_events.js | 2 +- pandora_console/operation/events/events.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index 79668406e1..8f23339692 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -214,8 +214,8 @@ function show_massive_response_dialog( $("#button-submit_event_response").show(); }, close: function() { + $("#checkbox-all_validate_box").prop("checked", false); $(".chk_val").prop("checked", false); - $("#event_response_command_window").dialog("close"); }, width: response["modal_width"], height: response["modal_height"] diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 3b065f9c12..3c758fde12 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -1670,6 +1670,10 @@ function process_datatables_callback(table, settings) { } + // Uncheck checkbox to select all. + if ($('#checkbox-all_validate_box').length) { + $('#checkbox-all_validate_box').uncheck(); + } } function process_datatables_item(item) { From 95600412e1246d431fba1647a6112e86237c9bb7 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Tue, 14 Jan 2020 13:14:09 +0100 Subject: [PATCH 33/67] Minor visual changes in alert list --- .../godmode/alerts/alert_list.list.php | 340 +++++++++--------- pandora_console/include/styles/pandora.css | 5 +- 2 files changed, 170 insertions(+), 175 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index f830f47dbd..e567f20716 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -412,65 +412,56 @@ $url_up_template = $url.'&sort_field=template&sort=up&pure='.$pure; $url_down_template = $url.'&sort_field=template&sort=down&pure='.$pure; -$table = new stdClass(); +$table_alert_list = new stdClass(); if (is_metaconsole()) { - $table->class = 'alert_list databox'; + $table_alert_list->class = 'alert_list databox'; } else { - $table->class = 'info_table'; + $table_alert_list->class = 'info_table'; } -$table->width = '100%'; -$table->cellpadding = 0; -$table->cellspacing = 0; -$table->size = []; +$table_alert_list->width = '100%'; +$table_alert_list->cellpadding = 0; +$table_alert_list->cellspacing = 0; +$table_alert_list->size = []; -$table->align = []; -$table->align[0] = 'left'; -$table->align[1] = 'left'; -$table->align[2] = 'left'; -$table->align[3] = 'left'; -$table->align[4] = 'left'; +$table_alert_list->align = []; +$table_alert_list->align[0] = 'left'; +$table_alert_list->align[1] = 'left'; +$table_alert_list->align[2] = 'left'; +$table_alert_list->align[3] = 'left'; +$table_alert_list->align[4] = 'left'; -$table->head = []; +$table_alert_list->head = []; if (! $id_agente) { - $table->style = []; - $table->style[0] = 'font-weight: bold;'; - $table->head[0] = __('Agent').ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown); - $table->headstyle[0] = 'width: 100%; min-width: 12em;'; - $table->headstyle[1] = 'min-width: 15em;'; - $table->headstyle[2] = 'min-width: 20em;'; - $table->headstyle[3] = 'min-width: 1em;'; - $table->headstyle[4] = 'min-width: 15em;'; - - /* - if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { - $table->size[4] = '8%'; - }*/ + $table_alert_list->style = []; + $table_alert_list->style[0] = 'font-weight: bold;'; + $table_alert_list->head[0] = __('Agent').ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown); } else { - $table->head[0] = __('Module').ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown); - $table->headstyle[0] = 'width: 100%; min-width: 15em;'; - $table->headstyle[1] = 'min-width: 15em;'; - $table->headstyle[2] = 'min-width: 20em;'; - $table->headstyle[3] = 'min-width: 1em;'; - $table->headstyle[4] = 'min-width: 15em;'; + $table_alert_list->head[0] = __('Module').ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown); } -$table->head[1] = __('Template').ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown); -$table->head[2] = __('Actions'); -$table->head[3] = __('Status'); -$table->head[4] = "".__('Op.').''; +$table_alert_list->head[1] = __('Status'); +$table_alert_list->head[2] = __('Template').ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown); +$table_alert_list->head[3] = __('Actions'); +$table_alert_list->head[4] = "".__('Op.').''; -$table->valign[0] = 'middle'; -$table->valign[1] = 'middle'; -$table->valign[2] = 'middle'; -$table->valign[3] = 'middle'; -$table->valign[4] = 'middle'; +$table_alert_list->headstyle[0] = 'min-width: 200px; width:30%;'; +$table_alert_list->headstyle[1] = 'min-width: 50px; width:8%'; +$table_alert_list->headstyle[2] = 'min-width: 150px; width:22%;'; +$table_alert_list->headstyle[3] = 'min-width: 200px; width:30%;'; +$table_alert_list->headstyle[4] = 'min-width: 150px; width:10%;'; -$table->style[4] = 'min-width:80px'; +$table_alert_list->valign[0] = 'middle'; +$table_alert_list->valign[1] = 'middle'; +$table_alert_list->valign[2] = 'middle'; +$table_alert_list->valign[3] = 'middle'; +$table_alert_list->valign[4] = 'middle'; -$table->data = []; +$table_alert_list->cellstyle = []; + +$table_alert_list->data = []; $url .= $sort_params; @@ -479,14 +470,14 @@ $iterator = 0; foreach ($simple_alerts as $alert) { if ($alert['disabled']) { - $table->rowstyle[$iterator] = 'font-style: italic; color: #aaaaaa;'; - $table->style[$iterator][1] = 'font-style: italic; color: #aaaaaa;'; + $table_alert_list->rowstyle[$iterator] = 'font-style: italic; color: #aaaaaa;'; + $table_alert_list->style[$iterator][2] = 'font-style: italic; color: #aaaaaa;'; } if ($rowPair) { - $table->rowclass[$iterator] = 'rowPair'; + $table_alert_list->rowclass[$iterator] = 'rowPair'; } else { - $table->rowclass[$iterator] = 'rowOdd'; + $table_alert_list->rowclass[$iterator] = 'rowOdd'; } $rowPair = !$rowPair; @@ -523,38 +514,53 @@ foreach ($simple_alerts as $alert) { $all_groups = agents_get_all_groups_agent($id_agente); } - $module_name = modules_get_agentmodule_name($alert['id_agent_module']); - $data[0] .= ui_print_truncate_text($module_name, 'module_medium', false, true, true, '[…]', 'display:block;font-size: 7.2pt').'
'; + $status = STATUS_ALERT_NOT_FIRED; + $title = ''; + if ($alert['times_fired'] > 0) { + $status = STATUS_ALERT_FIRED; + $title = __('Alert fired').' '.$alert['internal_counter'].' '.__('time(s)'); + } else if ($alert['disabled'] > 0) { + $status = STATUS_ALERT_DISABLED; + $title = __('Alert disabled'); + } else { + $status = STATUS_ALERT_NOT_FIRED; + $title = __('Alert not fired'); + } + + $module_name = modules_get_agentmodule_name($alert['id_agent_module']); + $data[0] .= ui_print_truncate_text($module_name, 'module_medium', false, true, true, '[…]', 'display:block;font-weight:normal;').'
'; + + $data[1] = ui_print_status_image($status, $title, true); $template_group = db_get_value('id_group', 'talert_templates', 'id', $alert['id_alert_template']); // The access to the template manage page is necessary have LW permissions on template group if (check_acl($config['id_user'], $template_group, 'LW')) { - $data[1] .= ""; + $data[2] .= ""; } - $data[1] .= ui_print_truncate_text( + $data[2] .= ui_print_truncate_text( alerts_get_alert_template_name($alert['id_alert_template']), 'module_medium', false, true, true, '[…]', - 'font-size: 7.1pt' + '' ); - $data[1] .= ' '; - $data[1] .= html_print_image('images/zoom.png', true, ['id' => 'template-details-'.$alert['id_alert_template'], 'class' => 'img_help']); - $data[1] .= ' '; + $data[2] .= html_print_image('images/zoom.png', true, ['id' => 'template-details-'.$alert['id_alert_template'], 'class' => 'img_help action_button_img']); + $data[2] .= ' '; if (check_acl($config['id_user'], $template_group, 'LW') || check_acl($config['id_user'], $template_group, 'LM')) { - $data[1] .= ''; + $data[2] .= ''; } $actions = alerts_get_alert_agent_module_actions($alert['id']); - $data[2] = ""; + $data[3] = "
"; // Get and show default actions for this alert $default_action = db_get_sql( 'SELECT id_alert_action @@ -562,69 +568,74 @@ foreach ($simple_alerts as $alert) { WHERE id = '.$alert['id_alert_template'] ); if ($default_action != '') { - $data[2] .= "'; - $data[2] .= ''; - $data[2] .= ''; + $data[3] .= "'; + $data[3] .= ''; } foreach ($actions as $action_id => $action) { - $data[2] .= ''; - $data[2] .= ''; + $data[3] .= ''; + + $data[3] .= ''; - $data[2] .= ''; + $data[3] .= ''; + $data[3] .= ''; } - $data[2] .= ''; - $data[2] .= '
  • "; - $data[2] .= db_get_sql("SELECT name FROM talert_actions WHERE id = $default_action").' ('.__('Default').')'; - $data[2] .= ui_print_help_tip(__('The default actions will be executed every time that the alert is fired and no other action is executed'), true); - $data[2] .= '
  • "; + $data[3] .= db_get_sql("SELECT name FROM talert_actions WHERE id = $default_action").' ('.__('Default').')'; + $data[3] .= '
'; - $data[2] .= '
    '; - $data[2] .= '
  • '; + $data[3] .= '
'; + $data[3] .= '
    '; + $data[3] .= '
  • '; if ($alert['disabled']) { - $data[2] .= ''; + $data[3] .= ''; } else { - $data[2] .= ''; + $data[3] .= ''; } - $data[2] .= ui_print_truncate_text($action['name'], (GENERIC_SIZE_TEXT + 20), false); - $data[2] .= ' ('; + $data[3] .= ui_print_truncate_text($action['name'], (GENERIC_SIZE_TEXT + 20), false); + $data[3] .= ' ('; if ($action['fires_min'] == $action['fires_max']) { if ($action['fires_min'] == 0) { - $data[2] .= __('Always'); + $data[3] .= __('Always'); } else { - $data[2] .= __('On').' '.$action['fires_min']; + $data[3] .= __('On').' '.$action['fires_min']; } } else if ($action['fires_min'] < $action['fires_max']) { if ($action['fires_min'] == 0) { - $data[2] .= __('Until').' '.$action['fires_max']; + $data[3] .= __('Until').' '.$action['fires_max']; } else { - $data[2] .= __('From').' '.$action['fires_min'].' '.__('to').' '.$action['fires_max']; + $data[3] .= __('From').' '.$action['fires_min'].' '.__('to').' '.$action['fires_max']; } } else { - $data[2] .= __('From').' '.$action['fires_min']; + $data[3] .= __('From').' '.$action['fires_min']; } if ($action['module_action_threshold'] != 0) { - $data[2] .= ' '.__('Threshold').' '.human_time_description_alerts($action['module_action_threshold'], true, 'tiny'); + $data[3] .= ' '.__('Threshold').' '.human_time_description_alerts($action['module_action_threshold'], true, 'tiny'); } - $data[2] .= ')'; - $data[2] .= ''; - $data[2] .= '
  • '; - $data[2] .= '
'; + $data[3] .= ')'; + $data[3] .= ''; + $data[3] .= ''; + $data[3] .= ''; - // Is possible manage actions if have LW permissions in the agent group of the alert module + $data[3] .= '
'; + $data[3] .= ui_print_help_tip(__('The default actions will be executed every time that the alert is fired and no other action is executed'), true); + // Is possible manage actions if have LW permissions in the agent group of the alert module if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW')) { // ~ $data[2] .= ''; - $data[2] .= html_print_input_image( + $data[3] .= html_print_input_hidden('delete_action', 1, true); + $data[3] .= html_print_input_hidden('id_alert', $alert['id'], true); + $data[3] .= html_print_input_hidden('id_action', $action_id, true); + $data[3] .= ''; + $data[3] .= html_print_input_image( 'update_action', 'images/config.png', 1, @@ -632,19 +643,20 @@ foreach ($simple_alerts as $alert) { true, [ 'title' => __('Update action'), + 'class' => 'action_button_img', 'onclick' => 'show_display_update_action(\''.$action['id'].'\',\''.$alert['id'].'\',\''.$alert['id_agent_module'].'\',\''.$action_id.'\',\''.$alert['id_agent_module'].'\')', ] ); - $data[2] .= html_print_input_hidden('id_agent_module', $alert['id_agent_module'], true); + $data[3] .= html_print_input_hidden('id_agent_module', $alert['id_agent_module'], true); } - $data[2] .= '
'; + $data[3] .= ''; + $data[3] .= ''; // Is possible manage actions if have LW permissions in the agent group of the alert module if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW') || check_acl($config['id_user'], $template_group, 'LM')) { $own_info = get_user_info($config['id_user']); @@ -660,45 +672,45 @@ foreach ($simple_alerts as $alert) { $actions = alerts_get_alert_actions_filter(true, 'id_group IN ('.$filter_groups.')'); } - $data[2] .= ''; + $data[3] .= ''; + $data[3] .= ''; + $data[3] .= ''; + $data[3] .= html_print_submit_button(__('Add'), 'addbutton', false, ['class' => 'sub next', 'style' => 'float:right'], true); + $data[3] .= ''; + $data[3] .= '
'; } - $status = STATUS_ALERT_NOT_FIRED; - $title = ''; - - if ($alert['times_fired'] > 0) { - $status = STATUS_ALERT_FIRED; - $title = __('Alert fired').' '.$alert['internal_counter'].' '.__('time(s)'); - } else if ($alert['disabled'] > 0) { - $status = STATUS_ALERT_DISABLED; - $title = __('Alert disabled'); - } else { - $status = STATUS_ALERT_NOT_FIRED; - $title = __('Alert not fired'); - } - - $data[3] = ui_print_status_image($status, $title, true); - - $table->cellclass[] = [ - 3 => 'action_buttons', + $table_alert_list->cellclass[] = [ + 1 => 'action_buttons', 4 => 'action_buttons', ]; $data[4] = '
'; @@ -790,11 +786,11 @@ foreach ($simple_alerts as $alert) { if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { $policyInfo = policies_is_alert_in_policy2($alert['id'], false); if ($policyInfo === false) { - $data[3] .= ''; + $data[1] .= ''; } else { $img = 'images/policies.png'; - $data[3] .= '  '.html_print_image($img, true, ['title' => $policyInfo['name']]).''; + $data[1] .= '  '.html_print_image($img, true, ['title' => $policyInfo['name']]).''; } } } @@ -840,11 +836,11 @@ foreach ($simple_alerts as $alert) { $data[4] .= '
'; } - array_push($table->data, $data); + array_push($table_alert_list->data, $data); } if (isset($data)) { - html_print_table($table); + html_print_table($table_alert_list); if ($id_agente) { ui_pagination($total, 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&id_agente='.$id_agente.$form_params.$sort_params, 0, 0, false, 'offset', true, 'pagination-bottom'); } else { @@ -864,7 +860,7 @@ if (isset($dont_display_alert_create_bttn)) { } if ($display_create && (check_acl($config['id_user'], 0, 'LW') || check_acl($config['id_user'], $template_group, 'LM')) && !$id_cluster) { - echo '
'; + echo '
'; echo '
'; html_print_submit_button(__('Create'), 'crtbtn', false, 'class="sub next"'); echo '
'; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index a003dd0d7a..6976c652d9 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -4985,11 +4985,10 @@ input:checked + .p-slider:before { .action_buttons input[type="image"], .action_button_img { border-radius: 4px; - border: 1px solid #dcdcdc; - padding: 1px; + border: 1px solid #dcdcdc !important; + padding: 1px !important; box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1); max-width: 21px; - background-color: transparent; /*BORRAR*/ } /* This class is for only one icon to be a button type. */ From 5eb2953810bb77f890dca35c10f3583873820062 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Tue, 14 Jan 2020 15:43:17 +0100 Subject: [PATCH 34/67] Added port option on server configuration to be used when connecting to execution server --- pandora_console/extras/mr/35.sql | 5 ++ .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 1 + .../agentes/agent_wizard.snmp_explorer.php | 2 +- .../agent_wizard.snmp_interfaces_explorer.php | 2 +- .../agentes/agent_wizard.wmi_explorer.php | 57 ++++++++++++++----- .../godmode/servers/modificar_server.php | 13 ++++- .../godmode/servers/servers.build_table.php | 4 ++ pandora_console/include/ajax/events.php | 6 +- pandora_console/include/functions.php | 7 ++- .../include/functions_snmp_browser.php | 19 +++++-- pandora_console/pandoradb.sql | 1 + 11 files changed, 93 insertions(+), 24 deletions(-) create mode 100644 pandora_console/extras/mr/35.sql diff --git a/pandora_console/extras/mr/35.sql b/pandora_console/extras/mr/35.sql new file mode 100644 index 0000000000..cf6a4d940a --- /dev/null +++ b/pandora_console/extras/mr/35.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +ALTER TABLE `tserver` ADD COLUMN `port` int(5) unsigned NOT NULL default 0; + +COMMIT; 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 ca415cd52a..d4f773b1ff 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 @@ -1775,6 +1775,7 @@ ALTER TABLE tserver_export_data MODIFY `module_name` varchar(600) NOT NULL defau -- Table `tserver` -- --------------------------------------------------------------------- ALTER TABLE tserver ADD COLUMN exec_proxy tinyint(1) UNSIGNED NOT NULL default 0; +ALTER TABLE `tserver` ADD COLUMN `port` int(5) unsigned NOT NULL default 0; -- --------------------------------------------------------------------- -- Table `tevent_response` diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php index fbb03c6e02..1fd9136a2c 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php @@ -750,7 +750,7 @@ if (enterprise_installed()) { } } -$table->data[1][2] = ''.__('Server to execute command').''; +$table->data[1][2] = ''.__('Server to execute command').''.ui_print_help_icon('agent_snmp_explorer_tab', true); $table->data[1][3] = html_print_select($servers_to_exec, 'server_to_exec', $server_to_exec, '', '', '', true); $snmp_versions['1'] = 'v. 1'; 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 3eb404340e..50ae676926 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php @@ -492,7 +492,7 @@ if (enterprise_installed()) { } } -$table->data[1][2] = ''.__('Server to execute command').''; +$table->data[1][2] = ''.__('Server to execute command').''.ui_print_help_icon('agent_snmp_explorer_tab', true); $table->data[1][2] .= ''.ui_print_help_tip(__('In order to use remote executions you need to enable remote execution in satellite server'), true, 'images/tip_help.png', false, 'display:').''; $table->data[1][4] = html_print_select( $servers_to_exec, diff --git a/pandora_console/godmode/agentes/agent_wizard.wmi_explorer.php b/pandora_console/godmode/agentes/agent_wizard.wmi_explorer.php index 5d889178bb..c7eb716e80 100644 --- a/pandora_console/godmode/agentes/agent_wizard.wmi_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.wmi_explorer.php @@ -64,12 +64,22 @@ if ($wmiexplore) { $processes_name_field = 1; if (enterprise_installed() && (int) $server_to_exec != 0) { $server_data = db_get_row('tserver', 'id_server', $server_to_exec); - exec( - 'ssh pandora_exec_proxy@'.$server_data['ip_address']." - '".$wmi_processes."'", - $output, - $rc - ); + + if (empty($server_data['port'])) { + exec( + 'ssh pandora_exec_proxy@'.$server_data['ip_address']." + '".$wmi_processes."'", + $output, + $rc + ); + } else { + exec( + 'ssh -p '.$server_data['port'].' pandora_exec_proxy@'.$server_data['ip_address']." + '".$wmi_processes."'", + $output, + $rc + ); + } } else { exec($wmi_processes, $output); } @@ -110,12 +120,21 @@ if ($wmiexplore) { 'id_server', $server_to_exec ); + if (empty($server_data['port'])) { exec( 'ssh pandora_exec_proxy@'.$server_data['ip_address']." - '".$wmi_services."'", + '".$wmi_services."'", $output, $rc ); + } else { + exec( + 'ssh -p '.$server_data['port'].' pandora_exec_proxy@'.$server_data['ip_address']." + '".$wmi_services."'", + $output, + $rc + ); + } } else { exec($wmi_services, $output); } @@ -145,12 +164,22 @@ if ($wmiexplore) { if (enterprise_installed() && (int) $server_to_exec != 0) { $server_data = db_get_row('tserver', 'id_server', $server_to_exec); - exec( - 'ssh pandora_exec_proxy@'.$server_data['ip_address']." - '".$wmi_disks."'", - $output, - $rc - ); + + if (empty($server_data['port'])) { + exec( + 'ssh pandora_exec_proxy@'.$server_data['ip_address']." + '".$wmi_disks."'", + $output, + $rc + ); + } else { + exec( + 'ssh -p '.$server_data['port'].' pandora_exec_proxy@'.$server_data['ip_address']." + '".$wmi_disks."'", + $output, + $rc + ); + } } else { exec($wmi_disks, $output); } @@ -469,7 +498,7 @@ if (enterprise_installed()) { } } -$table->data[2][0] = ''.__('Server to execute command').''; +$table->data[2][0] = ''.__('Server to execute command').''.ui_print_help_icon('agent_snmp_explorer_tab', true); $table->data[2][1] = html_print_select( $servers_to_exec, 'server_to_exec', diff --git a/pandora_console/godmode/servers/modificar_server.php b/pandora_console/godmode/servers/modificar_server.php index 66c14ee89f..8af5e47199 100644 --- a/pandora_console/godmode/servers/modificar_server.php +++ b/pandora_console/godmode/servers/modificar_server.php @@ -32,7 +32,7 @@ if (isset($_GET['server'])) { $id_server = get_parameter_get('server'); // Headers ui_print_page_header(__('Update Server'), 'images/gm_servers.png', false, 'servers', true); - $sql = sprintf('SELECT name, ip_address, description, server_type, exec_proxy FROM tserver WHERE id_server = %d', $id_server); + $sql = sprintf('SELECT name, ip_address, description, server_type, exec_proxy, port FROM tserver WHERE id_server = %d', $id_server); $row = db_get_row_sql($sql); echo '
'; html_print_input_hidden('server', $id_server); @@ -81,6 +81,13 @@ if (isset($_GET['server'])) { ''.html_print_image('images/dot_red.disabled.png', true).''.'
', ]; } + + $port_number = empty($row['port']) ? '' : $row['port']; + + $table->data[] = [ + __('Port'), + html_print_input_text('port', $port_number, '', 10, 0, true).ui_print_help_tip(__('Leave blank to use SSH default port (22)'), true), + ]; } } @@ -136,11 +143,15 @@ if (isset($_GET['server'])) { $description = get_parameter_post('description'); $id_server = get_parameter_post('server'); $exec_proxy = get_parameter_post('exec_proxy'); + $port = get_parameter_post('port'); + + $port_number = empty($port) ? 0 : $port; $values = [ 'ip_address' => $address, 'description' => $description, 'exec_proxy' => $exec_proxy, + 'port' => $port_number, ]; $result = db_process_sql_update('tserver', $values, ['id_server' => $id_server]); if ($result !== false) { diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 0006fc3e9b..668ef26f0c 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -101,6 +101,10 @@ foreach ($servers as $server) { $data[2] .= ui_print_help_tip(__('This is a master server'), true); } + if ($server['exec_proxy'] == 1) { + $data[2] .= html_print_image('images/star.png', true, ['title' => __('Exec server enabled')]); + } + // $data[2] .= ' v' .. ''; switch ($server['type']) { case 'snmp': diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 24fa8be341..70d1470366 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -954,7 +954,11 @@ if ($perform_event_response) { break; } - system('ssh pandora_exec_proxy@'.$server_data['ip_address'].' "'.$timeout_bin.' '.$command_timeout.' '.io_safe_output($command).' 2>&1"', $ret_val); + if (empty($server_data['port'])) { + system('ssh pandora_exec_proxy@'.$server_data['ip_address'].' "'.$timeout_bin.' '.$command_timeout.' '.io_safe_output($command).' 2>&1"', $ret_val); + } else { + system('ssh -p '.$server_data['port'].' pandora_exec_proxy@'.$server_data['ip_address'].' "'.$timeout_bin.' '.$command_timeout.' '.io_safe_output($command).' 2>&1"', $ret_val); + } } } else { switch (PHP_OS) { diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 08a41a00f2..ba6350e49c 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1994,7 +1994,12 @@ function get_snmpwalk( if (enterprise_installed()) { if ($server_to_exec != 0) { $server_data = db_get_row('tserver', 'id_server', $server_to_exec); - exec('ssh pandora_exec_proxy@'.$server_data['ip_address'].' "'.$command_str.'"', $output, $rc); + + if (empty($server_data['port'])) { + exec('ssh pandora_exec_proxy@'.$server_data['ip_address'].' "'.$command_str.'"', $output, $rc); + } else { + exec('ssh -p '.$server_data['port'].' pandora_exec_proxy@'.$server_data['ip_address'].' "'.$command_str.'"', $output, $rc); + } } else { exec($command_str, $output, $rc); } diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index dc423481f2..bb69eec319 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -409,11 +409,20 @@ function snmp_browser_get_oid( if ($server_to_exec != 0) { $command_output = $snmptranslate_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -Td '.escapeshellarg($oid); - exec( - 'ssh pandora_exec_proxy@'.$server_data['ip_address'].' "'.$command_output.'"', - $translate_output, - $rc - ); + + if (empty($server_data['port'])) { + exec( + 'ssh pandora_exec_proxy@'.$server_data['ip_address'].' "'.$command_output.'"', + $translate_output, + $rc + ); + } else { + exec( + 'ssh -p '.$server_data['port'].' pandora_exec_proxy@'.$server_data['ip_address'].' "'.$command_output.'"', + $translate_output, + $rc + ); + } } else { exec( $snmptranslate_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -Td '.escapeshellarg($oid), diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index d1db588a10..f6cbd459d5 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1020,6 +1020,7 @@ CREATE TABLE IF NOT EXISTS `tserver` ( `server_keepalive` int(11) NOT NULL default 0, `stat_utimestamp` bigint(20) NOT NULL default '0', `exec_proxy` tinyint(1) UNSIGNED NOT NULL default 0, + `port` int(5) unsigned NOT NULL default 0, PRIMARY KEY (`id_server`), KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; From 6bf5d07a2cf64e00ed415164b35781c0627cecc7 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 15 Jan 2020 00:01:09 +0100 Subject: [PATCH 35/67] 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 ccf1e6c2ad..a54002818d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200114 +Version: 7.0NG.742-200115 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 7314499ab3..ec00c3d207 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.742-200114" +pandora_version="7.0NG.742-200115" 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 6e1efa4868..366e7ad559 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.742'; -use constant AGENT_BUILD => '200114'; +use constant AGENT_BUILD => '200115'; # 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 f47a498bdc..fd41ec1f90 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.742 -%define release 200114 +%define release 200115 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 acb7a38982..920028aef8 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.742 -%define release 200114 +%define release 200115 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 051e123b28..df8455a431 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200114" +PI_BUILD="200115" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 83bfea33da..214118aaff 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200114} +{200115} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8a3003ecd3..6889d27878 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.742(Build 200114)") +#define PANDORA_VERSION ("7.0NG.742(Build 200115)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f4af970791..a206edfda6 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.742(Build 200114))" + VALUE "ProductVersion", "(7.0NG.742(Build 200115))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index ac738db348..543a1c91f4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200114 +Version: 7.0NG.742-200115 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 7017eea4f8..0048357d77 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.742-200114" +pandora_version="7.0NG.742-200115" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4e63624557..9585142299 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 = 'PC200114'; +$build_version = 'PC200115'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index c568f67531..dd26d01916 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 c689ba7a7a..9bf45f239b 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.742 -%define release 200114 +%define release 200115 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index ce662c1222..9d3f896141 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.742 -%define release 200114 +%define release 200115 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 20a9682602..528e0568d4 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200114" +PI_BUILD="200115" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 61e03cf39d..8864f9ddac 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.742 PS200114"; +my $version = "7.0NG.742 PS200115"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f068b6d93a..81eabe2acc 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.742 PS200114"; +my $version = "7.0NG.742 PS200115"; # save program name for logging my $progname = basename($0); From 2926ead13b50df8cfc8c207473ef9b1c8b54d276 Mon Sep 17 00:00:00 2001 From: Luis Date: Wed, 15 Jan 2020 12:14:37 +0100 Subject: [PATCH 36/67] Fixed group change on networkmap.ACL and source group working separated --- pandora_console/extras/mr/35.sql | 3 +- .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 + .../include/functions_networkmap.php | 14 +++ .../agentes/pandora_networkmap.editor.php | 90 +++++++++++++++++-- .../operation/agentes/pandora_networkmap.php | 63 ++++++++----- .../agentes/pandora_networkmap.view.php | 10 +-- pandora_console/pandoradb.sql | 1 + 7 files changed, 148 insertions(+), 35 deletions(-) diff --git a/pandora_console/extras/mr/35.sql b/pandora_console/extras/mr/35.sql index 86236df36f..3a002f44f8 100644 --- a/pandora_console/extras/mr/35.sql +++ b/pandora_console/extras/mr/35.sql @@ -1,5 +1,6 @@ START TRANSACTION; +ALTER TABLE `tmap` ADD COLUMN `id_group_map` INT(10) UNSIGNED NOT NULL default 0; ALTER TABLE `tevent_filter` MODIFY `severity` TEXT NOT NULL; -COMMIT; \ No newline at end of file +COMMIT; 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 0c95628752..bbc07ad08c 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 @@ -1195,6 +1195,8 @@ CREATE TABLE IF NOT EXISTS `tmap` ( `generation_method` INTEGER UNSIGNED NOT NULL default 0, `generated` INTEGER UNSIGNED NOT NULL default 0, `filter` TEXT, + `id_group_map` INT(10) UNSIGNED NOT NULL default 0, + PRIMARY KEY(`id`) ) ENGINE = InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index dda25538ee..56172331c6 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -1453,6 +1453,20 @@ function networkmap_delete_nodes($id_map) } +/** + * Delete relations given id_map + * + * @param integer $id_map + * @return integer result + */ +function networkmap_delete_relations($id_map) +{ + $result = db_process_sql_delete('trel_item', ['id_map' => $id_map]); + + return $result; +} + + function get_networkmaps($id) { $groups = array_keys(users_get_groups(null, 'IW')); diff --git a/pandora_console/operation/agentes/pandora_networkmap.editor.php b/pandora_console/operation/agentes/pandora_networkmap.editor.php index 7f698d8653..d719df08cd 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.editor.php +++ b/pandora_console/operation/agentes/pandora_networkmap.editor.php @@ -81,8 +81,8 @@ if ($edit_networkmap) { $id_group = $values['id_group']; // ACL for the network map. - $networkmap_write = check_acl($config['id_user'], $id_group, 'MW'); - $networkmap_manage = check_acl($config['id_user'], $id_group, 'MM'); + $networkmap_write = check_acl($config['id_user'], $id_group_map, 'MW'); + $networkmap_manage = check_acl($config['id_user'], $id_group_map, 'MM'); if (!$networkmap_write && !$networkmap_manage) { db_pandora_audit( @@ -95,6 +95,9 @@ if ($edit_networkmap) { $name = io_safe_output($values['name']); + // Id group of the map itself, not data source. + $id_group_map = $values['id_group_map']; + $description = $values['description']; $filter = json_decode($values['filter'], true); @@ -267,8 +270,8 @@ if ($not_found) { $config['id_user'], 'AR', true, - 'id_group', - $id_group, + 'id_group_map', + $id_group_map, '', '', '', @@ -329,6 +332,28 @@ if ($not_found) { $table->data['source_data_ip_mask'][0] = __('Source from CIDR IP mask'); $table->data['source_data_ip_mask'][1] = html_print_input_text('ip_mask', $ip_mask, '', 20, 255, true, $disabled_source); + $table->data['source_data_group'][0] = __('Source group'); + $table->data['source_data_group'][1] = html_print_select_groups( + $config['id_user'], + 'AR', + true, + 'id_group', + $id_group, + '', + '', + '', + true + ); + $table->data['source_data_group'][1] .= html_print_image( + 'images/error.png', + true, + [ + 'id' => 'group_change_warning', + 'title' => __('Source id group changed. All elements in networkmap will be lost.'), + 'style' => 'display : none', + ] + ); + $table->data['source_data_dont_show_subgroups'][0] = __('Don\'t show subgroups:'); $table->data['source_data_dont_show_subgroups'][1] = html_print_checkbox( 'dont_show_subgroups', @@ -379,7 +404,7 @@ if ($not_found) { $table->data['kval'][0] = __('Default ideal node separation'); $table->data['kval'][1] = html_print_input_text('kval', $kval, '', 5, 10, true, $disabled_source, false, $itemClass).ui_print_help_tip(__('Only fdp. Default ideal node separation in the layout. By default 0.3'), true); - echo ''; + echo ''; html_print_table($table); @@ -420,8 +445,11 @@ $(document).ready(function() { .css('display', 'none'); $("#form_editor-source_data_dont_show_subgroups") .css('display', 'none'); + $("#form_editor-source_data_group") + .css('display', 'none'); $("#form_editor-source_data_recon_task") .css('display', ''); + } else if (source == 'ip_mask') { $("#form_editor-source_data_ip_mask") @@ -430,6 +458,8 @@ $(document).ready(function() { .css('display', 'none'); $("#form_editor-source_data_dont_show_subgroups") .css('display', 'none'); + $("#form_editor-source_data_group") + .css('display', 'none'); } else if (source == 'group') { $("#form_editor-source_data_ip_mask") @@ -438,6 +468,8 @@ $(document).ready(function() { .css('display', 'none'); $("#form_editor-source_data_dont_show_subgroups") .css('display', ''); + $("#form_editor-source_data_group") + .css('display', ''); } }); @@ -508,5 +540,53 @@ $(document).ready(function() { $("input[name='source']").trigger("change"); $("#method").trigger("change"); + + + // Control if id_group has changed. + var id_group_old = $("#id_group").val(); + var id_group_changed = false; + + $("#id_group").on('change',{id_group_old: id_group_old}, function () { + + var id_group_new = $("#id_group").val(); + if((id_group_old != id_group_new) && (update_networkmap == 1 )) { + id_group_changed = true; + $("#group_change_warning").show(); + + } else { + id_group_changed = false; + $("#group_change_warning").hide(); + } + }); + + var update_networkmap = 0; + // Show advice if id_group has changed. + update_networkmap = $("input[name='update_networkmap']").val(); + + $( "#submit-crt" ).click(function( event ) { + + if(update_networkmap == 1 && id_group_changed === true) { + confirmDialog({ + title: '', + message: '', + ok: '', + cancel: '', + onDeny: function() { + // Continue execution. + return false; + }, + onAccept: function () { + // Submit form + $("#networkmap_options_form").submit(); + } + }) + event.preventDefault(); + } + }); + + +}); + + diff --git a/pandora_console/operation/agentes/pandora_networkmap.php b/pandora_console/operation/agentes/pandora_networkmap.php index 2aa1404e30..97ebcf82c3 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.php +++ b/pandora_console/operation/agentes/pandora_networkmap.php @@ -12,10 +12,10 @@ // Load global variables global $config; -// Check user credentials +// Check user credentials. check_login(); -// General ACL for the network maps +// General ACL for the network maps. $networkmaps_read = check_acl($config['id_user'], 0, 'MR'); $networkmaps_write = check_acl($config['id_user'], 0, 'MW'); $networkmaps_manage = check_acl($config['id_user'], 0, 'MM'); @@ -53,11 +53,12 @@ if (enterprise_installed()) { if ($save_empty_networkmap) { $id_group = (int) get_parameter('id_group', 0); + $id_group_map = (int) get_paramater('id_group_map', 0); - // ACL for the network map + // ACL for the network map. // $networkmap_read = check_acl ($config['id_user'], $id_group, "MR"); - $networkmap_write = check_acl($config['id_user'], $id_group, 'MW'); - $networkmap_manage = check_acl($config['id_user'], $id_group, 'MM'); + $networkmap_write = check_acl($config['id_user'], $id_group_map, 'MW'); + $networkmap_manage = check_acl($config['id_user'], $id_group_map, 'MM'); if (!$networkmap_write && !$networkmap_manage) { db_pandora_audit( @@ -93,6 +94,7 @@ if (enterprise_installed()) { $values['description'] = $description; $values['source'] = 0; $values['source_data'] = $id_group; + $values['id_group_map'] = $id_group_map; if (!$networkmap_write && !$networkmap_manage) { @@ -139,10 +141,12 @@ if (enterprise_installed()) { } } else if ($update_empty_networkmap) { $id_group = (int) get_parameter('id_group', 0); + $id_group_map = (int) get_parameter('id_group_map', 0); + // ACL for the new network map - $networkmap_write_new = check_acl($config['id_user'], $id_group, 'MW'); - $networkmap_manage_new = check_acl($config['id_user'], $id_group, 'MM'); + $networkmap_write_new = check_acl($config['id_user'], $id_group_map, 'MW'); + $networkmap_manage_new = check_acl($config['id_user'], $id_group_map, 'MM'); if (!$networkmap_write && !$networkmap_manage) { db_pandora_audit( @@ -221,11 +225,13 @@ if ($new_networkmap || $save_networkmap) { if ($save_networkmap) { $id_group = (int) get_parameter('id_group', 0); + $id_group_map = (int) get_parameter('id_group_map', 0); + // ACL for the network map // $networkmap_read = check_acl ($config['id_user'], $id_group, "MR"); - $networkmap_write = check_acl($config['id_user'], $id_group, 'MW'); - $networkmap_manage = check_acl($config['id_user'], $id_group, 'MM'); + $networkmap_write = check_acl($config['id_user'], $id_group_map, 'MW'); + $networkmap_manage = check_acl($config['id_user'], $id_group_map, 'MM'); if (!$networkmap_write && !$networkmap_manage) { db_pandora_audit( @@ -282,6 +288,7 @@ if ($new_networkmap || $save_networkmap) { $values['height'] = $height; $values['id_user'] = $config['id_user']; $values['description'] = $description; + $values['id_group_map'] = $id_group_map; switch ($method) { case 'twopi': @@ -401,8 +408,10 @@ else if ($update_networkmap || $copy_networkmap || $delete) { return; } - $id_group_old = db_get_value('id_group', 'tmap', 'id', $id); - if ($id_group_old === false) { + // ACL for the network map. + $id_group_map_old = db_get_value('id_group_map', 'tmap', 'id', $id); + + if ($id_group_map_old === false) { db_pandora_audit( 'ACL Violation', 'Trying to accessnode graph builder' @@ -411,9 +420,8 @@ else if ($update_networkmap || $copy_networkmap || $delete) { return; } - // ACL for the network map - $networkmap_write = check_acl($config['id_user'], $id_group_old, 'MW'); - $networkmap_manage = check_acl($config['id_user'], $id_group_old, 'MM'); + $networkmap_write = check_acl($config['id_user'], $id_group_map_old, 'MW'); + $networkmap_manage = check_acl($config['id_user'], $id_group_map_old, 'MM'); if (!$networkmap_write && !$networkmap_manage) { db_pandora_audit( @@ -426,10 +434,14 @@ else if ($update_networkmap || $copy_networkmap || $delete) { if ($update_networkmap) { $id_group = (int) get_parameter('id_group', 0); + // Get id of old group source to check changes. + $id_group_old = db_get_value('id_group', 'tmap', 'id', $id); + // ACL for the new network map - $networkmap_write_new = check_acl($config['id_user'], $id_group, 'MW'); - $networkmap_manage_new = check_acl($config['id_user'], $id_group, 'MM'); + $id_group_map = (int) get_parameter('id_group_map', 0); + $networkmap_write_new = check_acl($config['id_user'], $id_group_map, 'MW'); + $networkmap_manage_new = check_acl($config['id_user'], $id_group_map, 'MM'); if (!$networkmap_write && !$networkmap_manage) { db_pandora_audit( @@ -456,6 +468,7 @@ else if ($update_networkmap || $copy_networkmap || $delete) { $values = []; $values['name'] = $name; $values['id_group'] = $id_group; + $values['id_group_map'] = $id_group_map; $description = get_parameter('description', ''); $values['description'] = $description; @@ -493,6 +506,8 @@ else if ($update_networkmap || $copy_networkmap || $delete) { // If change the group, the map must be regenerated if ($id_group != $id_group_old) { networkmap_delete_nodes($id); + // Delete relations. + networkmap_delete_relations($id); } $networkmap_write = $networkmap_write_new; @@ -701,9 +716,9 @@ switch ($tab) { $network_maps = db_get_all_rows_filter( 'tmap', [ - 'id_group' => $id_groups, - 'limit' => $limit, - 'offset' => $offset, + 'id_group_map' => $id_groups, + 'limit' => $limit, + 'offset' => $offset, ] ); @@ -712,9 +727,9 @@ switch ($tab) { foreach ($network_maps as $network_map) { // ACL for the network map - $networkmap_read = check_acl($config['id_user'], $network_map['id_group'], 'MR'); - $networkmap_write = check_acl($config['id_user'], $network_map['id_group'], 'MW'); - $networkmap_manage = check_acl($config['id_user'], $network_map['id_group'], 'MM'); + $networkmap_read = check_acl($config['id_user'], $network_map['id_group_map'], 'MR'); + $networkmap_write = check_acl($config['id_user'], $network_map['id_group_map'], 'MW'); + $networkmap_manage = check_acl($config['id_user'], $network_map['id_group_map'], 'MM'); if (!$networkmap_read && !$networkmap_write && !$networkmap_manage) { db_pandora_audit( @@ -722,7 +737,7 @@ switch ($tab) { 'Trying to access networkmap enterprise' ); include 'general/noaccess.php'; - return; + continue; } $data = []; @@ -768,7 +783,7 @@ switch ($tab) { } } - $data['groups'] = ui_print_group_icon($network_map['id_group'], true); + $data['groups'] = ui_print_group_icon($network_map['id_group_map'], true); if ($networkmap_write || $networkmap_manage) { $table->cellclass[] = [ diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index 2ee34806d9..3c4565fe9a 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -576,8 +576,8 @@ if (is_ajax()) { $filter = json_encode($array_filter); // ACL for the network map. - $networkmap_write = check_acl($config['id_user'], $networkmap['id_group'], 'MW'); - $networkmap_manage = check_acl($config['id_user'], $networkmap['id_group'], 'MM'); + $networkmap_write = check_acl($config['id_user'], $networkmap['id_group_map'], 'MW'); + $networkmap_manage = check_acl($config['id_user'], $networkmap['id_group_map'], 'MM'); if (!$networkmap_write && !$networkmap_manage) { db_pandora_audit( @@ -800,9 +800,9 @@ if ($networkmap === false) { return; } else { // ACL for the network map. - $networkmap_read = check_acl($config['id_user'], $networkmap['id_group'], 'MR'); - $networkmap_write = check_acl($config['id_user'], $networkmap['id_group'], 'MW'); - $networkmap_manage = check_acl($config['id_user'], $networkmap['id_group'], 'MM'); + $networkmap_read = check_acl($config['id_user'], $networkmap['id_group_map'], 'MR'); + $networkmap_write = check_acl($config['id_user'], $networkmap['id_group_map'], 'MW'); + $networkmap_manage = check_acl($config['id_user'], $networkmap['id_group_map'], 'MM'); if (!$networkmap_read && !$networkmap_write && !$networkmap_manage) { db_pandora_audit( diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index a42a9592c3..134eceba32 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2188,6 +2188,7 @@ CREATE TABLE IF NOT EXISTS `tmap` ( `generation_method` INTEGER UNSIGNED NOT NULL default 0, `generated` INTEGER UNSIGNED NOT NULL default 0, `filter` TEXT, + `id_group_map` INT(10) UNSIGNED NOT NULL default 0, PRIMARY KEY(`id`) ) ENGINE = InnoDB DEFAULT CHARSET=utf8; From 28b585196b08339137f7a29d58aaf1fc353ec90a Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 15 Jan 2020 14:11:36 +0100 Subject: [PATCH 37/67] Ent 5099 dobles interfaces en mapas de red no se visualizan --- pandora_console/include/class/NetworkMap.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index b28b43f502..43fb9138c7 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -1340,6 +1340,10 @@ class NetworkMap if ($rel['parent_type'] == NODE_MODULE && $rel['child_type'] == NODE_MODULE ) { + // Keep std references. + $ref_id_parent = $id_parent; + $ref_id_child = $id_child; + // Module information available. $id_parent = $rel['id_parent_source_data']; $id_child = $rel['id_child_source_data']; @@ -1374,6 +1378,12 @@ class NetworkMap 'index' => $index, 'priority' => $priority, ]; + + // Keep node reference mapping - low precedence relationship. + $rel_map[$ref_id_parent.'_'.$ref_id_child] = [ + 'index' => $index, + 'priority' => $priority, + ]; } } else if ($rel['parent_type'] == NODE_AGENT && $rel['child_type'] == NODE_AGENT From 8b6c1261a9b91456b9f2e6eb75ecae2d54afe46b Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Wed, 15 Jan 2020 15:37:42 +0100 Subject: [PATCH 38/67] change order of form port input --- .../godmode/servers/modificar_server.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/servers/modificar_server.php b/pandora_console/godmode/servers/modificar_server.php index 8af5e47199..37c8aac797 100644 --- a/pandora_console/godmode/servers/modificar_server.php +++ b/pandora_console/godmode/servers/modificar_server.php @@ -75,12 +75,6 @@ if (isset($_GET['server'])) { __('Exec Server'), html_print_checkbox('exec_proxy', 1, $row['exec_proxy'], true), ]; - if ($row['exec_proxy']) { - $table->data[] = [ - __('Check Exec Server'), - ''.html_print_image('images/dot_red.disabled.png', true).''.'
', - ]; - } $port_number = empty($row['port']) ? '' : $row['port']; @@ -88,6 +82,13 @@ if (isset($_GET['server'])) { __('Port'), html_print_input_text('port', $port_number, '', 10, 0, true).ui_print_help_tip(__('Leave blank to use SSH default port (22)'), true), ]; + + if ($row['exec_proxy']) { + $table->data[] = [ + __('Check Exec Server'), + ''.html_print_image('images/dot_red.disabled.png', true).''.'
', + ]; + } } } From 3f26f2ef6f03e539422635b957674b1a3a0e7887 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Wed, 15 Jan 2020 16:00:33 +0100 Subject: [PATCH 39/67] fix bug when deleting custom units and changed default value for byte multiplier --- pandora_console/godmode/setup/setup_visuals.php | 2 +- pandora_console/include/functions.php | 4 ++-- pandora_console/include/functions_config.php | 2 +- pandora_console/include/javascript/pandora.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 1a87ba9e74..ac66ec53aa 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1361,7 +1361,7 @@ $row++; $options_data_multiplier[1] = __('Use always 1000'); $options_data_multiplier[2] = __('Use always 1024'); - $table_other->data[$row][1] = html_print_select($options_data_multiplier, 'use_data_multiplier', $config['use_data_multiplier'], '', '', 0, true, false, false); + $table_other->data[$row][1] = html_print_select($options_data_multiplier, 'use_data_multiplier', $config['use_data_multiplier'], '', '', 1, true, false, false); echo '
'; diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 96512ad4b4..e267de43e3 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -5543,7 +5543,7 @@ function delete_custom_module_unit($value) $custom_units = get_custom_module_units(); - unset($custom_units[$value]); + unset($custom_units[io_safe_output($value)]); $new_conf = json_encode($custom_units); $return = config_update_value( @@ -5574,7 +5574,7 @@ function get_data_multiplier($unit) switch ($config['use_data_multiplier']) { case 0: - if (strpos($unit, 'yte') !== false) { + if (strpos(strtolower($unit), 'yte') !== false) { $multiplier = 1024; } else { $multiplier = 1000; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index a748ef0fae..fcc065225d 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -2831,7 +2831,7 @@ function config_process_config() } if (!isset($config['use_data_multiplier'])) { - config_update_value('use_data_multiplier', ';'); + config_update_value('use_data_multiplier', '1'); } if (!isset($config['command_snapshot'])) { diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 6a29b6b552..19722cb311 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -712,7 +712,7 @@ function post_process_select_init_unit(name, selected) { }); if (select_or_text) { - $("#" + name + "_select option[value=" + selected + "]").attr( + $("#" + name + "_select option[value='" + selected + "']").attr( "selected", true ); @@ -728,7 +728,7 @@ function post_process_select_init_unit(name, selected) { $("#" + name + "_select").change(function() { var value = $("#" + name + "_select").val(); - $("#" + name + "_select option[value=" + value + "]").attr( + $("#" + name + "_select option[value='" + value + "']").attr( "selected", true ); From c68f83f01318d154ffb94b64049f270ddcc2e801 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 15 Jan 2020 17:16:46 +0100 Subject: [PATCH 40/67] availability failover --- pandora_console/extras/mr/35.sql | 1 + .../reporting_builder.item_editor.php | 186 +++++++++++++++++- .../godmode/reporting/reporting_builder.php | 8 + .../include/ajax/reporting.ajax.php | 10 +- .../include/functions_reporting.php | 31 ++- pandora_console/pandoradb.sql | 9 +- 6 files changed, 229 insertions(+), 16 deletions(-) diff --git a/pandora_console/extras/mr/35.sql b/pandora_console/extras/mr/35.sql index 3a002f44f8..545f7a64a7 100644 --- a/pandora_console/extras/mr/35.sql +++ b/pandora_console/extras/mr/35.sql @@ -2,5 +2,6 @@ START TRANSACTION; ALTER TABLE `tmap` ADD COLUMN `id_group_map` INT(10) UNSIGNED NOT NULL default 0; ALTER TABLE `tevent_filter` MODIFY `severity` TEXT NOT NULL; +ALTER TABLE `treport_content_item` ADD `id_agent_module_failover` int(10) unsigned NOT NULL DEFAULT 0; COMMIT; diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 98ee756b7b..d958a45211 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -628,6 +628,8 @@ switch ($action) { $unknown_checks = $item['unknown_checks']; $agent_max_value = $item['agent_max_value']; $agent_min_value = $item['agent_min_value']; + $failover_mode = $item['failover_mode']; + $failover_type = $item['failover_type']; break; case 'group_report': @@ -3263,6 +3265,13 @@ function print_General_list($width, $action, $idItem=null, $type='general') $meta = false; } + $failover_mode = db_get_value( + 'failover_mode', + 'treport_content', + 'id_rc', + $idItem + ); + $operation = [ 'avg' => __('rate'), 'max' => __('max'), @@ -3284,6 +3293,18 @@ function print_General_list($width, $action, $idItem=null, $type='general') + + + + + + + + @@ -3365,19 +3386,50 @@ function print_General_list($width, $action, $idItem=null, $type='general') ['id_agente_modulo' => $item['id_agent_module']] ); + if (isset($item['id_agent_module_failover']) === true + && $item['id_agent_module_failover'] !== 0 + ) { + $idAgentFailover = db_get_value_filter( + 'id_agente', + 'tagente_modulo', + ['id_agente_modulo' => $item['id_agent_module_failover']] + ); + $nameAgentFailover = agents_get_alias( + $idAgentFailover + ); + + $nameModuleFailover = db_get_value_filter( + 'nombre', + 'tagente_modulo', + ['id_agente_modulo' => $item['id_agent_module_failover']] + ); + } + $server_name_element = ''; if ($meta && $server_name != '') { $server_name_element .= ' ('.$server_name.')'; } if ($type == 'availability') { - echo ' - '.printSmallFont($nameAgent).$server_name_element.' - '.printSmallFont($nameModule).' - - '.html_print_image('images/cross.png', true).' - - '; + if ($failover_mode) { + echo ' + '.printSmallFont($nameAgent).$server_name_element.' + '.printSmallFont($nameModule).' + '.printSmallFont($nameAgentFailover).$server_name_element.' + '.printSmallFont($nameModuleFailover).' + + '.html_print_image('images/cross.png', true).' + + '; + } else { + echo ' + '.printSmallFont($nameAgent).$server_name_element.' + '.printSmallFont($nameModule).' + + '.html_print_image('images/cross.png', true).' + + '; + } } else { echo ' '.printSmallFont($nameAgent).$server_name_element.' @@ -3403,6 +3455,15 @@ function print_General_list($width, $action, $idItem=null, $type='general') + + + @@ -3456,6 +3517,43 @@ function print_General_list($width, $action, $idItem=null, $type='general') + + + + + + + + + + @@ -4495,6 +4593,10 @@ function addGeneralRow() { var idAgent = $("input[name=id_agent_general]").val(); var serverId = $("input[name=id_server]").val(); var idModule = $("#id_agent_module_general").val(); + var nameAgentFailover = $("input[name=agent_failover]").val(); + var idModuleFailover = $("#id_agent_module_failover").val(); + var nameModuleFailover = $("#id_agent_module_failover :selected").text(); + var operation; if ($("#id_operation_module_general").length) { operation = $("#id_operation_module_general").val(); @@ -4580,10 +4682,63 @@ function addGeneralRow() { } }); + if (nameAgentFailover != '') { + //Truncate nameAgentFailover + var params = []; + params.push("truncate_text=1"); + params.push("text=" + nameAgentFailover); + params.push("page=include/ajax/reporting.ajax"); + jQuery.ajax ({ + data: params.join ("&"), + type: 'POST', + url: action= + + + "/ajax.php", + async: false, + timeout: 10000, + success: function (data) { + nameAgentFailover = data; + } + }); + + //Truncate nameModuleFailover + var params = []; + params.push("truncate_text=1"); + params.push("text=" + nameModuleFailover); + params.push("page=include/ajax/reporting.ajax"); + jQuery.ajax ({ + data: params.join ("&"), + type: 'POST', + url: action= + + + "/ajax.php", + async: false, + timeout: 10000, + success: function (data) { + nameModuleFailover = data; + } + }); + } + var params = []; params.push("add_general=1"); params.push("id=" + $("input[name=id_item]").val()); params.push("id_module=" + idModule); + params.push("id_module_failover=" + idModuleFailover); params.push("id_server=" + serverId); params.push("operation=" + operation); params.push("id_agent=" + idAgent); @@ -4610,6 +4765,8 @@ function addGeneralRow() { $("#row", row).attr('id', 'general_' + data['id']); $(".agent_name", row).html(nameAgent); $(".module_name", row).html(nameModule); + $(".agent_name_failover", row).html(nameAgentFailover); + $(".module_name_failover", row).html(nameModuleFailover); $(".operation_name", row).html(nameOperation); $(".delete_button", row).attr( 'href', @@ -4624,6 +4781,15 @@ function addGeneralRow() { $("#id_operation_module_general").val('avg'); $("#id_agent_module_general").empty(); $("#id_agent_module_general").attr('disabled', 'true'); + + $("input[name=id_agent_failover]").val(''); + $("input[name=agent_failover]").val(''); + $("#id_agent_module_failover").empty(); + $("#id_agent_module_failover").attr('disabled', 'true'); + $("#id_agent_module_failover").append( + $("") + .attr ("value", 0) + .html ($("#module_sla_text").html())); } } }); @@ -5111,6 +5277,12 @@ function chooseType() { $("#row_select_fields3").hide(); } $("#row_historical_db_check").hide(); + + $("#row_failover_mode").show(); + var failover_checked = $("input[name='failover_mode']").prop("checked"); + if(failover_checked){ + $("#row_failover_type").show(); + } break; case 'group_report': diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 4ff734bef9..60464ee953 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1609,6 +1609,14 @@ switch ($action) { $values['agent_min_value'] = get_parameter( 'agent_min_value' ); + $values['failover_mode'] = get_parameter( + 'failover_mode', + 0 + ); + $values['failover_type'] = get_parameter( + 'failover_type', + REPORT_FAILOVER_TYPE_NORMAL + ); $good_format = true; break; diff --git a/pandora_console/include/ajax/reporting.ajax.php b/pandora_console/include/ajax/reporting.ajax.php index dec331b6ef..a858f2083a 100755 --- a/pandora_console/include/ajax/reporting.ajax.php +++ b/pandora_console/include/ajax/reporting.ajax.php @@ -111,6 +111,7 @@ if ($add_general) { $id_module = get_parameter('id_module', 0); $id_server = (int) get_parameter('id_server', 0); $operation = get_parameter('operation', ''); + $id_module_failover = (int) get_parameter('id_module_failover', 0); $include_enterprise = enterprise_include('include/functions_metaconsole.php'); @@ -126,10 +127,11 @@ if ($add_general) { $result = db_process_sql_insert( 'treport_content_item', [ - 'id_report_content' => $id, - 'id_agent_module' => $id_module, - 'server_name' => $connection['server_name'], - 'operation' => $operation, + 'id_report_content' => $id, + 'id_agent_module' => $id_module, + 'server_name' => $connection['server_name'], + 'operation' => $operation, + 'id_agent_module_failover' => $id_module_failover, ] ); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 48e0182ba1..58ead605f7 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -6252,7 +6252,7 @@ function reporting_availability($report, $content, $date=false, $time=false) $sql = sprintf( ' - SELECT id_agent_module, + SELECT id_agent_module, id_agent_module_failover, server_name, operation FROM treport_content_item WHERE id_report_content = %d', @@ -6337,6 +6337,30 @@ function reporting_availability($report, $content, $date=false, $time=false) $content['time_to'] ); + // $row['data']= reporting_advanced_sla( + // $item['id_agent_module_failover'], + // ($report['datetime'] - $content['period']), + // $report['datetime'], + // null, + // min_value -> dynamic + // null, + // max_value -> dynamic + // null, + // inverse_interval -> dynamic + // [ + // '1' => $content['sunday'], + // '2' => $content['monday'], + // '3' => $content['tuesday'], + // '4' => $content['wednesday'], + // '5' => $content['thursday'], + // '6' => $content['friday'], + // '7' => $content['saturday'], + // ], + // $content['time_from'], + // $content['time_to'] + // ); + hd($row['data']); + // HACK it is saved in show_graph field. // Show interfaces instead the modules if ($content['show_graph']) { @@ -6450,6 +6474,8 @@ function reporting_availability($report, $content, $date=false, $time=false) } } + hd($data); + $return['data'] = $data; $return['resume'] = []; $return['resume']['resume'] = $content['show_resume']; @@ -6472,6 +6498,8 @@ function reporting_availability($report, $content, $date=false, $time=false) $return['fields']['agent_max_value'] = $content['agent_max_value']; $return['fields']['agent_min_value'] = $content['agent_min_value']; + hd(reporting_check_structure_content($return)); + return reporting_check_structure_content($return); } @@ -6595,6 +6623,7 @@ function reporting_availability_graph($report, $content, $pdf=false) $slice = ($content['period'] / $module_interval); $data_combined = []; + // hd($sla_failover); foreach ($sla_failover as $k_sla => $v_sla) { $sla_array = data_db_uncompress_module( $v_sla, diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 134eceba32..1652cfe1f9 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1485,14 +1485,15 @@ CREATE TABLE IF NOT EXISTS `treport_content_sla_combined` ( -- Table `treport_content_item` -- ---------------------------------------------------------------------- CREATE TABLE IF NOT EXISTS `treport_content_item` ( - `id` INTEGER UNSIGNED NOT NULL auto_increment, - `id_report_content` INTEGER UNSIGNED NOT NULL, - `id_agent_module` int(10) unsigned NOT NULL, + `id` INTEGER UNSIGNED NOT NULL auto_increment, + `id_report_content` INTEGER UNSIGNED NOT NULL, + `id_agent_module` int(10) unsigned NOT NULL, + `id_agent_module_failover` int(10) unsigned NOT NULL DEFAULT 0, `server_name` text, `operation` text, PRIMARY KEY(`id`), FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`) - ON UPDATE CASCADE ON DELETE CASCADE + ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE = InnoDB DEFAULT CHARSET=utf8; -- --------------------------------------------------------------------- From 40f03e56824241c08bab1cbaef2ba7f737325ef5 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 16 Jan 2020 00:01:08 +0100 Subject: [PATCH 41/67] 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 a54002818d..b201f03df1 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200115 +Version: 7.0NG.742-200116 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 ec00c3d207..667a916eae 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.742-200115" +pandora_version="7.0NG.742-200116" 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 366e7ad559..901a25684c 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.742'; -use constant AGENT_BUILD => '200115'; +use constant AGENT_BUILD => '200116'; # 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 fd41ec1f90..a5ba25309f 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.742 -%define release 200115 +%define release 200116 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 920028aef8..9391a8fe18 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.742 -%define release 200115 +%define release 200116 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 df8455a431..33b85b6879 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200115" +PI_BUILD="200116" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 214118aaff..462a905312 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200115} +{200116} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 6889d27878..1b90cd4356 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.742(Build 200115)") +#define PANDORA_VERSION ("7.0NG.742(Build 200116)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a206edfda6..069494b28e 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.742(Build 200115))" + VALUE "ProductVersion", "(7.0NG.742(Build 200116))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 543a1c91f4..a21b22de5f 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200115 +Version: 7.0NG.742-200116 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 0048357d77..dbe006c507 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.742-200115" +pandora_version="7.0NG.742-200116" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9585142299..391e652262 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 = 'PC200115'; +$build_version = 'PC200116'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 2f6a94fb1f..d42fc41a5f 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 9bf45f239b..52d2982409 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.742 -%define release 200115 +%define release 200116 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 9d3f896141..b0c0b3e120 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.742 -%define release 200115 +%define release 200116 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 528e0568d4..cd6e05391a 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200115" +PI_BUILD="200116" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 8864f9ddac..2a7b857f60 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.742 PS200115"; +my $version = "7.0NG.742 PS200116"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 81eabe2acc..d97ee4766c 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.742 PS200115"; +my $version = "7.0NG.742 PS200116"; # save program name for logging my $progname = basename($0); From 0980c9a74a9e671377cad7f0b81a301343620f63 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Thu, 16 Jan 2020 13:50:39 +0100 Subject: [PATCH 42/67] Ent 5261 cambio de control de intervalo en alertas --- .../godmode/alerts/alert_list.builder.php | 19 +++++++- .../godmode/alerts/alert_list.list.php | 15 +++++-- .../godmode/alerts/configure_alert_action.php | 18 +++++++- .../include/ajax/alert_list.ajax.php | 15 +++++-- pandora_console/include/functions.php | 13 ++++-- pandora_console/include/functions_html.php | 44 ++++++++++++------- pandora_console/include/javascript/pandora.js | 5 ++- 7 files changed, 98 insertions(+), 31 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php index 545ceefa35..4e9772b6d6 100644 --- a/pandora_console/godmode/alerts/alert_list.builder.php +++ b/pandora_console/godmode/alerts/alert_list.builder.php @@ -163,8 +163,23 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) { } $table->data[3][0] = __('Threshold'); - $table->data[3][1] = html_print_input_text('module_action_threshold', '0', '', 5, 7, true); - $table->data[3][1] .= ''.__('seconds').''; + $table->data[3][1] = html_print_extended_select_for_time( + 'module_action_threshold', + 0, + '', + '', + '', + false, + true, + false, + true, + '', + false, + false, + '', + false, + true + ); if (!isset($step)) { echo ''; diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index e567f20716..59b78c9e02 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -734,12 +734,21 @@ foreach ($simple_alerts as $alert) { $data[3] .= __('Threshold'); $data[3] .= ''; $data[3] .= ''; - $data[3] .= html_print_input_text( + $data[3] .= html_print_extended_select_for_time( 'module_action_threshold', + 0, '', '', - 4, - 10, + '', + false, + true, + false, + true, + '', + false, + false, + '', + false, true ); $data[3] .= ''; diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index 870a6fafc8..60052e9645 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -177,7 +177,23 @@ $table->data[2][1] .= '
'; $table->colspan[2][1] = 2; $table->data[3][0] = __('Threshold'); -$table->data[3][1] = html_print_input_text('action_threshold', $action_threshold, '', 5, 7, true); +$table->data[3][1] = html_print_extended_select_for_time( + 'action_threshold', + $action_threshold, + '', + '', + '', + false, + true, + false, + true, + '', + false, + false, + '', + false, + true +); $table->colspan[3][1] = 2; $table->data[4][0] = ''; diff --git a/pandora_console/include/ajax/alert_list.ajax.php b/pandora_console/include/ajax/alert_list.ajax.php index 3f724b4e58..4beb9efdfa 100644 --- a/pandora_console/include/ajax/alert_list.ajax.php +++ b/pandora_console/include/ajax/alert_list.ajax.php @@ -264,12 +264,21 @@ if ($show_update_action_menu) { $data .= __('Threshold'); $data .= ''; $data .= ''; - $data .= html_print_input_text( + $data .= html_print_extended_select_for_time( 'module_action_threshold_ajax', $action_option['module_action_threshold'], '', - 4, - 10, + '', + '', + false, + true, + false, + true, + '', + false, + false, + '', + false, true ); $data .= ''; diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 08a41a00f2..9684dc1fa6 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -2503,12 +2503,13 @@ function get_user_dashboards($id_user) /** * Get all the possible periods in seconds. * - * @param bool Flag to show or not custom fist option - * @param bool Show the periods by default if it is empty + * @param boolean $custom Flag to show or not custom fist option + * @param boolean $show_default Show the periods by default if it is empty + * @param boolean $allow_zero Allow the use of the value zero. * - * @return The possible periods in an associative array. + * @return array The possible periods in an associative array. */ -function get_periods($custom=true, $show_default=true) +function get_periods($custom=true, $show_default=true, $allow_zero=false) { global $config; @@ -2520,6 +2521,10 @@ function get_periods($custom=true, $show_default=true) if (empty($config['interval_values'])) { if ($show_default) { + if ($allow_zero === true) { + $periods[0] = sprintf(__('%s seconds'), '0'); + } + $periods[SECONDS_5MINUTES] = sprintf(__('%s minutes'), '5'); $periods[SECONDS_30MINUTES] = sprintf(__('%s minutes'), '30 '); $periods[SECONDS_1HOUR] = __('1 hour'); diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index eafea851f7..babe4eb7b3 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -988,20 +988,24 @@ function html_print_extended_select_for_post_process( /** * Render a pair of select for times and text box for set the time more fine. * - * @param string Select form name - * @param variant Current selected value. Can be a single value or an - * array of selected values (in combination with multiple) - * @param string Javascript onChange (select) code. - * @param string Label when nothing is selected. - * @param variant Value when nothing is selected - * @param integer $size Size of the input. - * @param bool Whether to return an output string or echo now (optional, echo by default). - * @param bool Wherter to assign to combo a unique name (to have more than one on same page, like dashboard) - * + * @param string $name Select form name + * @param variant $selected Current selected value. Can be a single value or an array of selected values (in combination with multiple) + * @param string $script Javascript onChange (select) code. + * @param string $nothing Label when nothing is selected. + * @param variant $nothing_value Value when nothing is selected + * @param integer $size Size of the input. + * @param boolean $return Whether to return an output string or echo now (optional, echo by default). + * @param boolean $select_style Wherter to assign to combo a unique name (to have more than one on same page, like dashboard) + * @param boolean $unique_name + * @param string $class + * @param boolean $readonly + * @param string $custom_fields + * @param string $style_icon + * @param boolean $no_change + * @param boolean $allow_zero Allow the use of the value zero. + * @return string HTML code if return parameter is true. */ - - function html_print_extended_select_for_time( $name, $selected='', @@ -1016,14 +1020,15 @@ function html_print_extended_select_for_time( $readonly=false, $custom_fields=false, $style_icon='', - $no_change=false + $no_change=false, + $allow_zero=false ) { global $config; $admin = is_user_admin($config['id_user']); if ($custom_fields) { $fields = $custom_fields; } else { - $fields = get_periods(); + $fields = get_periods(true, true, $allow_zero); } if ($no_change) { @@ -1045,7 +1050,14 @@ function html_print_extended_select_for_time( } } - if (($selected !== false) && (!isset($fields[$selected]) && $selected != 0)) { + // Allow the use of the value zero. + if ($allow_zero === true) { + $selected_zero = true; + } else { + $selected_zero = ($selected != 0) ? true : false; + } + + if (($selected !== false) && (!isset($fields[$selected]) && $selected_zero)) { $fields[$selected] = human_time_description_raw($selected, true); } @@ -1136,7 +1148,7 @@ function html_print_extended_select_for_time( echo '
'; echo " \ No newline at end of file diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php index 1fd9136a2c..21cb4eb378 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php @@ -738,11 +738,16 @@ $servers_to_exec[0] = __('Local console'); if (enterprise_installed()) { enterprise_include_once('include/functions_satellite.php'); - $rows = get_proxy_servers(true); + $rows = get_proxy_servers(); + + // Check if satellite server has remote configuration enabled. + $satellite_remote = config_agents_has_remote_configuration($id_agent); + foreach ($rows as $row) { if ($row['server_type'] != 13) { $s_type = ' (Standard)'; } else { + $id_satellite = $row['id_server']; $s_type = ' (Satellite)'; } @@ -751,7 +756,15 @@ if (enterprise_installed()) { } $table->data[1][2] = ''.__('Server to execute command').''.ui_print_help_icon('agent_snmp_explorer_tab', true); -$table->data[1][3] = html_print_select($servers_to_exec, 'server_to_exec', $server_to_exec, '', '', '', true); +$table->data[1][3] = html_print_select( + $servers_to_exec, + 'server_to_exec', + $server_to_exec, + 'satellite_remote_warn('.$id_satellite.','.$satellite_remote.')', + '', + '', + true +); $snmp_versions['1'] = 'v. 1'; $snmp_versions['2'] = 'v. 2'; @@ -1020,6 +1033,8 @@ ui_require_javascript_file('pandora_modules'); var separator = ''; $(document).ready (function () { + $('#server_to_exec option').trigger('change'); + $("#walk_form").submit(function() { $("#oid_loading").show (); }); 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 50ae676926..40c4e7fc84 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php @@ -734,20 +734,5 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) { "json"); } - -function satellite_remote_warn(id_satellite, remote) -{ - if(!remote) - { - $('#server_to_exec option[value='+id_satellite+']').prop('disabled', true); - $('#satellite_remote_tip').removeAttr("style").show(); - } - else - { - $('#satellite_remote_tip').removeAttr("style").hide(); - } - -} - /* ]]> */ From de1407badcb22e59647f2d22ff855d383552f293 Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Thu, 16 Jan 2020 17:58:50 +0100 Subject: [PATCH 44/67] Update mysqlerr.php --- pandora_console/general/mysqlerr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/general/mysqlerr.php b/pandora_console/general/mysqlerr.php index 1330e9055d..0af7b0c69a 100644 --- a/pandora_console/general/mysqlerr.php +++ b/pandora_console/general/mysqlerr.php @@ -98,7 +98,7 @@ background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%; if ($config['history_db_connection'] === false) { echo __('History database connection failure, please check login credentials or contact the system administration for help.'); } else { - echo __('Failure to connect to Database server, please check the configuration file config.php or contact system administrator if you need assistance.'); + echo __('Failure to connect to historical database, please check the configuration or contact system administrator if you need assistance.'); } ?> From cf4362e4334b6ee5989ffaa24ec073e5f61191ed Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 17 Jan 2020 00:01:10 +0100 Subject: [PATCH 45/67] 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 b201f03df1..b70750c920 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200116 +Version: 7.0NG.742-200117 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 667a916eae..2a8c82809c 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.742-200116" +pandora_version="7.0NG.742-200117" 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 901a25684c..d5b5465198 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.742'; -use constant AGENT_BUILD => '200116'; +use constant AGENT_BUILD => '200117'; # 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 a5ba25309f..63abd0fd51 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.742 -%define release 200116 +%define release 200117 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 9391a8fe18..d59a9e3cab 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.742 -%define release 200116 +%define release 200117 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 33b85b6879..7480951554 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200116" +PI_BUILD="200117" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 462a905312..f083d8932f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200116} +{200117} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 1b90cd4356..4ea963758c 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.742(Build 200116)") +#define PANDORA_VERSION ("7.0NG.742(Build 200117)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 069494b28e..33a888e978 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.742(Build 200116))" + VALUE "ProductVersion", "(7.0NG.742(Build 200117))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a21b22de5f..b09b67c880 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200116 +Version: 7.0NG.742-200117 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 dbe006c507..774b0723c1 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.742-200116" +pandora_version="7.0NG.742-200117" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 391e652262..5524803953 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 = 'PC200116'; +$build_version = 'PC200117'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d42fc41a5f..7451b76d0d 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 52d2982409..7d0e7d34de 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.742 -%define release 200116 +%define release 200117 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index b0c0b3e120..9afa474c1d 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.742 -%define release 200116 +%define release 200117 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index cd6e05391a..a5faa15384 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200116" +PI_BUILD="200117" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 2a7b857f60..239ce908ec 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.742 PS200116"; +my $version = "7.0NG.742 PS200117"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d97ee4766c..ab93d33baa 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.742 PS200116"; +my $version = "7.0NG.742 PS200117"; # save program name for logging my $progname = basename($0); From 2968ce765850c04524c26ed5eed35c1d5f0ab7d4 Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Fri, 17 Jan 2020 10:09:52 +0100 Subject: [PATCH 46/67] update error message --- pandora_console/general/mysqlerr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/general/mysqlerr.php b/pandora_console/general/mysqlerr.php index 0af7b0c69a..539508e7ef 100644 --- a/pandora_console/general/mysqlerr.php +++ b/pandora_console/general/mysqlerr.php @@ -96,9 +96,9 @@ background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%;
From bb4d3abe6b8d7665aff78b02e57106972d1246c6 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Fri, 17 Jan 2020 12:42:29 +0100 Subject: [PATCH 47/67] change config default value --- pandora_console/include/functions_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 2c94d0cb69..9100060e83 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1347,7 +1347,7 @@ function config_update_config() $error_update[] = __('CSV divider'); } - if (!config_update_value('use_data_multiplier', get_parameter('use_data_multiplier', ';'))) { + if (!config_update_value('use_data_multiplier', get_parameter('use_data_multiplier', '1'))) { $error_update[] = __('Use data multiplier'); } break; From 14de9f3c59b6da4d215a8f2064da4eb3f72a1480 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 18 Jan 2020 00:01:15 +0100 Subject: [PATCH 48/67] 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 b70750c920..5d833a7d5e 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200117 +Version: 7.0NG.742-200118 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 2a8c82809c..3f2118b041 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.742-200117" +pandora_version="7.0NG.742-200118" 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 d5b5465198..777a64f78f 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.742'; -use constant AGENT_BUILD => '200117'; +use constant AGENT_BUILD => '200118'; # 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 63abd0fd51..2ca53c1815 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.742 -%define release 200117 +%define release 200118 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 d59a9e3cab..e603100c56 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.742 -%define release 200117 +%define release 200118 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 7480951554..74e234d61e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200117" +PI_BUILD="200118" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f083d8932f..0c178b6a37 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200117} +{200118} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 4ea963758c..1803c820e0 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.742(Build 200117)") +#define PANDORA_VERSION ("7.0NG.742(Build 200118)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 33a888e978..39009d56ef 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.742(Build 200117))" + VALUE "ProductVersion", "(7.0NG.742(Build 200118))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b09b67c880..8c5f1fa035 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200117 +Version: 7.0NG.742-200118 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 774b0723c1..0d88075ad2 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.742-200117" +pandora_version="7.0NG.742-200118" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 5524803953..7d0672fe3c 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 = 'PC200117'; +$build_version = 'PC200118'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 7451b76d0d..82359250e1 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 7d0e7d34de..390717e457 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.742 -%define release 200117 +%define release 200118 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 9afa474c1d..779328419e 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.742 -%define release 200117 +%define release 200118 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index a5faa15384..6554108439 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200117" +PI_BUILD="200118" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 239ce908ec..dfd808d32b 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.742 PS200117"; +my $version = "7.0NG.742 PS200118"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ab93d33baa..d32758ec2c 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.742 PS200117"; +my $version = "7.0NG.742 PS200118"; # save program name for logging my $progname = basename($0); From 8eb77fa6ccce07b1150c03bcff3bc5c6f0727094 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 19 Jan 2020 00:01:07 +0100 Subject: [PATCH 49/67] 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 5d833a7d5e..8e4b6eabf2 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200118 +Version: 7.0NG.742-200119 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 3f2118b041..25d4781206 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.742-200118" +pandora_version="7.0NG.742-200119" 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 777a64f78f..fc0200ef7a 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.742'; -use constant AGENT_BUILD => '200118'; +use constant AGENT_BUILD => '200119'; # 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 2ca53c1815..b782da8800 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.742 -%define release 200118 +%define release 200119 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 e603100c56..b213ca6904 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.742 -%define release 200118 +%define release 200119 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 74e234d61e..c83a314d88 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200118" +PI_BUILD="200119" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 0c178b6a37..12e43eed50 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200118} +{200119} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 1803c820e0..5be28ff485 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.742(Build 200118)") +#define PANDORA_VERSION ("7.0NG.742(Build 200119)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 39009d56ef..a69a12a86c 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.742(Build 200118))" + VALUE "ProductVersion", "(7.0NG.742(Build 200119))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8c5f1fa035..715ea3edeb 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200118 +Version: 7.0NG.742-200119 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 0d88075ad2..38b2c64451 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.742-200118" +pandora_version="7.0NG.742-200119" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 7d0672fe3c..5303c50438 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 = 'PC200118'; +$build_version = 'PC200119'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 82359250e1..e2e8e6a109 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 390717e457..4d4c2a90b7 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.742 -%define release 200118 +%define release 200119 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 779328419e..c437a96145 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.742 -%define release 200118 +%define release 200119 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 6554108439..b1dc221d0f 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200118" +PI_BUILD="200119" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index dfd808d32b..b51a121870 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.742 PS200118"; +my $version = "7.0NG.742 PS200119"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d32758ec2c..4b86aedf56 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.742 PS200118"; +my $version = "7.0NG.742 PS200119"; # save program name for logging my $progname = basename($0); From ba1f0b96b44dc08c45730d0992e9e8bb8c8367e4 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 20 Jan 2020 00:01:08 +0100 Subject: [PATCH 50/67] 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 8e4b6eabf2..d8ebee3f89 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200119 +Version: 7.0NG.742-200120 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 25d4781206..032068cc53 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.742-200119" +pandora_version="7.0NG.742-200120" 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 fc0200ef7a..2615527fc3 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.742'; -use constant AGENT_BUILD => '200119'; +use constant AGENT_BUILD => '200120'; # 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 b782da8800..9a7af67b11 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.742 -%define release 200119 +%define release 200120 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 b213ca6904..1cdee90f24 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.742 -%define release 200119 +%define release 200120 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 c83a314d88..8d3e5341fb 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200119" +PI_BUILD="200120" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 12e43eed50..d7c45e2d24 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200119} +{200120} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5be28ff485..0ddf8f2fcc 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.742(Build 200119)") +#define PANDORA_VERSION ("7.0NG.742(Build 200120)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a69a12a86c..fca979fba0 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.742(Build 200119))" + VALUE "ProductVersion", "(7.0NG.742(Build 200120))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 715ea3edeb..333602f3d4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200119 +Version: 7.0NG.742-200120 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 38b2c64451..c7607d5c68 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.742-200119" +pandora_version="7.0NG.742-200120" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 5303c50438..5ab3f4f407 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 = 'PC200119'; +$build_version = 'PC200120'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e2e8e6a109..05dcd391ee 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 4d4c2a90b7..5a9e5aebc6 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.742 -%define release 200119 +%define release 200120 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index c437a96145..715e26267c 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.742 -%define release 200119 +%define release 200120 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index b1dc221d0f..3bffb0a837 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200119" +PI_BUILD="200120" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index b51a121870..d2f8e35e2c 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.742 PS200119"; +my $version = "7.0NG.742 PS200120"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 4b86aedf56..0bef8b6dd2 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.742 PS200119"; +my $version = "7.0NG.742 PS200120"; # save program name for logging my $progname = basename($0); From 395d45cec9348e8416db3c361bbeceb264c8d54c Mon Sep 17 00:00:00 2001 From: "ismael.moreno" Date: Mon, 20 Jan 2020 14:12:33 +0100 Subject: [PATCH 51/67] remote_cmd_string modules historical data look into tagente_datos_string --- pandora_console/include/functions_modules.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 39cc5b4a49..be8532d070 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -2133,6 +2133,8 @@ function modules_get_agentmodule_data( // remote_snmp_string case 17: // async_string + case 36: + // remote_cmd_string case 23: // Free search is a json with value and exact modifier $freesearch = json_decode($freesearch, true); From 2a170650654059dd24d300df140b8c9ec16d260d Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 21 Jan 2020 00:01:11 +0100 Subject: [PATCH 52/67] 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 d8ebee3f89..92b58d2093 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200120 +Version: 7.0NG.742-200121 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 032068cc53..7949890c7d 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.742-200120" +pandora_version="7.0NG.742-200121" 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 2615527fc3..d8f1f76c61 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.742'; -use constant AGENT_BUILD => '200120'; +use constant AGENT_BUILD => '200121'; # 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 9a7af67b11..0d9d6acdf9 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.742 -%define release 200120 +%define release 200121 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 1cdee90f24..d480d10feb 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.742 -%define release 200120 +%define release 200121 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 8d3e5341fb..ddfdeb96e1 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200120" +PI_BUILD="200121" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index d7c45e2d24..9066521f04 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200120} +{200121} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0ddf8f2fcc..8fa204494b 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.742(Build 200120)") +#define PANDORA_VERSION ("7.0NG.742(Build 200121)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index fca979fba0..2bef7af712 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.742(Build 200120))" + VALUE "ProductVersion", "(7.0NG.742(Build 200121))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 333602f3d4..adce843c8e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200120 +Version: 7.0NG.742-200121 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 c7607d5c68..140f9a248a 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.742-200120" +pandora_version="7.0NG.742-200121" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 5ab3f4f407..8927bde5e3 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 = 'PC200120'; +$build_version = 'PC200121'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 05dcd391ee..365acaad65 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 5a9e5aebc6..d21404f52f 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.742 -%define release 200120 +%define release 200121 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 715e26267c..8f58d7492c 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.742 -%define release 200120 +%define release 200121 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 3bffb0a837..a4dfa0b388 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200120" +PI_BUILD="200121" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index d2f8e35e2c..9b18efac75 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.742 PS200120"; +my $version = "7.0NG.742 PS200121"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 0bef8b6dd2..aa85d0129f 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.742 PS200120"; +my $version = "7.0NG.742 PS200121"; # save program name for logging my $progname = basename($0); From 3d0b71d953352569560ae2c318ae50d0c360a7c6 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Tue, 21 Jan 2020 11:05:49 +0100 Subject: [PATCH 53/67] Added enconding to POST variables --- pandora_console/extensions/realtime_graphs/ajax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/extensions/realtime_graphs/ajax.php b/pandora_console/extensions/realtime_graphs/ajax.php index 73d3c20748..dea94a5753 100644 --- a/pandora_console/extensions/realtime_graphs/ajax.php +++ b/pandora_console/extensions/realtime_graphs/ajax.php @@ -109,6 +109,6 @@ if (empty($data)) { } echo '{ - "label": "'.$graph_title.'", - "data": [["'.time().'", '.$data.']] + "label": "'.htmlspecialchars($graph_title, ENT_QUOTES).'", + "data": [["'.time().'", '.htmlspecialchars($data, ENT_QUOTES).']] }'; From 81fe77d9fdfab85094fc912c064372b6d738ba13 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 21 Jan 2020 16:26:36 +0100 Subject: [PATCH 54/67] Added failover in templates --- pandora_console/general/header.php | 3 +- .../include/functions_reporting.php | 382 +++++++++--------- .../include/functions_reporting_html.php | 41 +- 3 files changed, 226 insertions(+), 200 deletions(-) diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index b0bc0bf1d1..8a29ff44a3 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -703,8 +703,7 @@ if ($config['menu_type'] == 'classic') { }, success: function (data) { $('#result_order').html(data); - console.log(data); - }, + }, error: function (data) { console.error("Fatal error in AJAX call to interpreter order", data) } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 58ead605f7..d3912e7d81 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -6245,237 +6245,220 @@ function reporting_availability($report, $content, $date=false, $time=false) $return['kind_availability'] = 'module'; } - if (empty($content['subitems'])) { - if (is_metaconsole()) { - metaconsole_restore_db(); + if ($content['failover_mode']) { + $availability_graph_data = reporting_availability_graph($report, $content, false, true); + $data = $availability_graph_data['data']; + foreach ($data as $key => $item_data) { + $data[$key]['SLA'] = $item_data['sla_value']; + $data[$key]['availability_item'] = $item_data['module']; } - - $sql = sprintf( - ' - SELECT id_agent_module, id_agent_module_failover, - server_name, operation - FROM treport_content_item - WHERE id_report_content = %d', - $content['id_rc'] - ); - - $items = db_process_sql($sql); } else { - $items = $content['subitems']; - } - - $data = []; - - $avg = 0; - $min = null; - $min_text = ''; - $max = null; - $max_text = ''; - $count = 0; - - $style = io_safe_output($content['style']); - if ($style['hide_notinit_agents']) { - $aux_id_agents = $agents; - $i = 0; - foreach ($items as $item) { - $utimestamp = db_get_value('utimestamp', 'tagente_datos', 'id_agente_modulo', $item['id_agent_module'], true); - if (($utimestamp === false) || (intval($utimestamp) > intval($datetime_to))) { - unset($items[$i]); + if (empty($content['subitems'])) { + if (is_metaconsole()) { + metaconsole_restore_db(); } - $i++; - } - } + $sql = sprintf( + ' + SELECT id_agent_module, id_agent_module_failover, + server_name, operation + FROM treport_content_item + WHERE id_report_content = %d', + $content['id_rc'] + ); + + $items = db_process_sql($sql); + } else { + $items = $content['subitems']; + } + + $data = []; + + $avg = 0; + $min = null; + $min_text = ''; + $max = null; + $max_text = ''; + $count = 0; + + $style = io_safe_output($content['style']); + if ($style['hide_notinit_agents']) { + $aux_id_agents = $agents; + $i = 0; + foreach ($items as $item) { + $utimestamp = db_get_value('utimestamp', 'tagente_datos', 'id_agente_modulo', $item['id_agent_module'], true); + if (($utimestamp === false) || (intval($utimestamp) > intval($datetime_to))) { + unset($items[$i]); + } + + $i++; + } + } + + if (!empty($items)) { + foreach ($items as $item) { + // aaMetaconsole connection + $server_name = $item['server_name']; + if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) { + $connection = metaconsole_get_connection($server_name); + if (metaconsole_load_external_db($connection) != NOERR) { + // ui_print_error_message ("Error connecting to ".$server_name); + continue; + } + } + + if (modules_is_disable_agent($item['id_agent_module']) + || modules_is_not_init($item['id_agent_module']) + ) { + // Restore dbconnection + if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) { + metaconsole_restore_db(); + } - if (!empty($items)) { - foreach ($items as $item) { - // aaMetaconsole connection - $server_name = $item['server_name']; - if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) { - $connection = metaconsole_get_connection($server_name); - if (metaconsole_load_external_db($connection) != NOERR) { - // ui_print_error_message ("Error connecting to ".$server_name); continue; } - } - if (modules_is_disable_agent($item['id_agent_module']) - || modules_is_not_init($item['id_agent_module']) - ) { + $row = []; + + $text = ''; + + $row['data'] = reporting_advanced_sla( + $item['id_agent_module'], + ($report['datetime'] - $content['period']), + $report['datetime'], + null, + // min_value -> dynamic + null, + // max_value -> dynamic + null, + // inverse_interval -> dynamic + [ + '1' => $content['sunday'], + '2' => $content['monday'], + '3' => $content['tuesday'], + '4' => $content['wednesday'], + '5' => $content['thursday'], + '6' => $content['friday'], + '7' => $content['saturday'], + ], + $content['time_from'], + $content['time_to'] + ); + + // HACK it is saved in show_graph field. + // Show interfaces instead the modules + if ($content['show_graph']) { + $text = $row['data']['availability_item'] = agents_get_address( + modules_get_agentmodule_agent($item['id_agent_module']) + ); + + if (empty($text)) { + $text = $row['data']['availability_item'] = __('No Address'); + } + } else { + $text = $row['data']['availability_item'] = modules_get_agentmodule_name( + $item['id_agent_module'] + ); + } + + $row['data']['agent'] = modules_get_agentmodule_agent_alias( + $item['id_agent_module'] + ); + + $text = $row['data']['agent'].' ('.$text.')'; + // Restore dbconnection if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) { metaconsole_restore_db(); } - continue; - } + // find order + $row['data']['order'] = $row['data']['SLA']; - $row = []; - - $text = ''; - - $row['data'] = reporting_advanced_sla( - $item['id_agent_module'], - ($report['datetime'] - $content['period']), - $report['datetime'], - null, - // min_value -> dynamic - null, - // max_value -> dynamic - null, - // inverse_interval -> dynamic - [ - '1' => $content['sunday'], - '2' => $content['monday'], - '3' => $content['tuesday'], - '4' => $content['wednesday'], - '5' => $content['thursday'], - '6' => $content['friday'], - '7' => $content['saturday'], - ], - $content['time_from'], - $content['time_to'] - ); - - // $row['data']= reporting_advanced_sla( - // $item['id_agent_module_failover'], - // ($report['datetime'] - $content['period']), - // $report['datetime'], - // null, - // min_value -> dynamic - // null, - // max_value -> dynamic - // null, - // inverse_interval -> dynamic - // [ - // '1' => $content['sunday'], - // '2' => $content['monday'], - // '3' => $content['tuesday'], - // '4' => $content['wednesday'], - // '5' => $content['thursday'], - // '6' => $content['friday'], - // '7' => $content['saturday'], - // ], - // $content['time_from'], - // $content['time_to'] - // ); - hd($row['data']); - - // HACK it is saved in show_graph field. - // Show interfaces instead the modules - if ($content['show_graph']) { - $text = $row['data']['availability_item'] = agents_get_address( - modules_get_agentmodule_agent($item['id_agent_module']) - ); - - if (empty($text)) { - $text = $row['data']['availability_item'] = __('No Address'); - } - } else { - $text = $row['data']['availability_item'] = modules_get_agentmodule_name( - $item['id_agent_module'] - ); - } - - $row['data']['agent'] = modules_get_agentmodule_agent_alias( - $item['id_agent_module'] - ); - - $text = $row['data']['agent'].' ('.$text.')'; - - // Restore dbconnection - if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) { - metaconsole_restore_db(); - } - - // find order - $row['data']['order'] = $row['data']['SLA']; - - $percent_ok = $row['data']['SLA']; - $avg = ((($avg * $count) + $percent_ok) / ($count + 1)); - if (is_null($min)) { - $min = $percent_ok; - $min_text = $text; - } else { - if ($min > $percent_ok) { + $percent_ok = $row['data']['SLA']; + $avg = ((($avg * $count) + $percent_ok) / ($count + 1)); + if (is_null($min)) { $min = $percent_ok; $min_text = $text; + } else { + if ($min > $percent_ok) { + $min = $percent_ok; + $min_text = $text; + } } - } - if (is_null($max)) { - $max = $percent_ok; - $max_text = $text; - } else { - if ($max < $percent_ok) { + if (is_null($max)) { $max = $percent_ok; $max_text = $text; + } else { + if ($max < $percent_ok) { + $max = $percent_ok; + $max_text = $text; + } } + + $data[] = $row['data']; + $count++; } - $data[] = $row['data']; - $count++; - } + switch ($content['order_uptodown']) { + case REPORT_ITEM_ORDER_BY_AGENT_NAME: + $temp = []; + foreach ($data as $row) { + $i = 0; + foreach ($temp as $t_row) { + if (strcmp($row['data']['agent'], $t_row['agent']) < 0) { + break; + } - switch ($content['order_uptodown']) { - case REPORT_ITEM_ORDER_BY_AGENT_NAME: - $temp = []; - foreach ($data as $row) { - $i = 0; - foreach ($temp as $t_row) { - if (strcmp($row['data']['agent'], $t_row['agent']) < 0) { - break; + $i++; } - $i++; + array_splice($temp, $i, 0, [$row]); } - array_splice($temp, $i, 0, [$row]); - } + $data = $temp; + break; - $data = $temp; - break; + case REPORT_ITEM_ORDER_BY_ASCENDING: + $temp = []; + foreach ($data as $row) { + $i = 0; + foreach ($temp as $t_row) { + if ($row['data']['SLA'] < $t_row['order']) { + break; + } - case REPORT_ITEM_ORDER_BY_ASCENDING: - $temp = []; - foreach ($data as $row) { - $i = 0; - foreach ($temp as $t_row) { - if ($row['data']['SLA'] < $t_row['order']) { - break; + $i++; } - $i++; + array_splice($temp, $i, 0, [$row]); } - array_splice($temp, $i, 0, [$row]); - } + $data = $temp; + break; - $data = $temp; - break; + case REPORT_ITEM_ORDER_BY_DESCENDING: + $temp = []; + foreach ($data as $row) { + $i = 0; + foreach ($temp as $t_row) { + if ($row['data']['SLA'] > $t_row['order']) { + break; + } - case REPORT_ITEM_ORDER_BY_DESCENDING: - $temp = []; - foreach ($data as $row) { - $i = 0; - foreach ($temp as $t_row) { - if ($row['data']['SLA'] > $t_row['order']) { - break; + $i++; } - $i++; + array_splice($temp, $i, 0, [$row]); } - array_splice($temp, $i, 0, [$row]); - } - - $data = $temp; - break; + $data = $temp; + break; + } } } - hd($data); - $return['data'] = $data; $return['resume'] = []; $return['resume']['resume'] = $content['show_resume']; @@ -6498,8 +6481,6 @@ function reporting_availability($report, $content, $date=false, $time=false) $return['fields']['agent_max_value'] = $content['agent_max_value']; $return['fields']['agent_min_value'] = $content['agent_min_value']; - hd(reporting_check_structure_content($return)); - return reporting_check_structure_content($return); } @@ -6513,7 +6494,7 @@ function reporting_availability($report, $content, $date=false, $time=false) * * @return array Generates a structure the report. */ -function reporting_availability_graph($report, $content, $pdf=false) +function reporting_availability_graph($report, $content, $pdf=false, $failover=false) { global $config; $return = []; @@ -6555,7 +6536,7 @@ function reporting_availability_graph($report, $content, $pdf=false) $slas = io_safe_output( db_get_all_rows_field_filter( - 'treport_content_sla_combined', + ($failover) ? 'treport_content_item' : 'treport_content_sla_combined', 'id_report_content', $content['id_rc'] ) @@ -6623,7 +6604,6 @@ function reporting_availability_graph($report, $content, $pdf=false) $slice = ($content['period'] / $module_interval); $data_combined = []; - // hd($sla_failover); foreach ($sla_failover as $k_sla => $v_sla) { $sla_array = data_db_uncompress_module( $v_sla, @@ -6961,9 +6941,19 @@ function prepare_data_for_paint( $alias_agent = modules_get_agentmodule_agent_alias( $sla['id_agent_module'] ); - $name_module = modules_get_agentmodule_name( - $sla['id_agent_module'] - ); + + if ($content['show_graph']) { + $name_module = agents_get_address( + modules_get_agentmodule_agent($sla['id_agent_module']) + ); + if (empty($name_module)) { + $name_module = __('No Address'); + } + } else { + $name_module = modules_get_agentmodule_name( + $sla['id_agent_module'] + ); + } $data['agent'] = $alias_agent; $data['module'] = $name_module; diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index b81024559f..92756b2892 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -3028,6 +3028,10 @@ function reporting_html_availability($table, $item, $pdf=0) $table1->data = []; $table1->head = []; + if (isset($item['data'][0]['failover'])) { + $table1->head[-1] = __('Failover'); + } + $table1->head[0] = __('Agent'); // HACK it is saved in show_graph field. // Show interfaces instead the modules. @@ -3076,6 +3080,10 @@ function reporting_html_availability($table, $item, $pdf=0) $table1->head[8] = __('% Ok'); $table1->headstyle = []; + if (isset($item['data'][0]['failover'])) { + $table1->headstyle[-1] = 'text-align: left'; + } + $table1->headstyle[0] = 'text-align: left'; $table1->headstyle[1] = 'text-align: left'; $table1->headstyle[2] = 'text-align: center'; @@ -3086,6 +3094,10 @@ function reporting_html_availability($table, $item, $pdf=0) $table1->headstyle[7] = 'text-align: right'; $table1->headstyle[8] = 'text-align: right'; + if (isset($item['data'][0]['failover'])) { + $table1->style[-1] = 'text-align: left'; + } + $table1->style[0] = 'text-align: left'; $table1->style[1] = 'text-align: left'; $table1->style[2] = 'text-align: center'; @@ -3101,6 +3113,10 @@ function reporting_html_availability($table, $item, $pdf=0) $table2->data = []; $table2->head = []; + if (isset($item['data'][0]['failover'])) { + $table2->head[-1] = __('Failover'); + } + $table2->head[0] = __('Agent'); // HACK it is saved in show_graph field. // Show interfaces instead the modules. @@ -3135,6 +3151,10 @@ function reporting_html_availability($table, $item, $pdf=0) } $table2->headstyle = []; + if (isset($item['data'][0]['failover'])) { + $table2->headstyle[-1] = 'text-align: left'; + } + $table2->headstyle[0] = 'text-align: left'; $table2->headstyle[1] = 'text-align: left'; $table2->headstyle[2] = 'text-align: right'; @@ -3142,6 +3162,10 @@ function reporting_html_availability($table, $item, $pdf=0) $table2->headstyle[4] = 'text-align: right'; $table2->headstyle[5] = 'text-align: right'; + if (isset($item['data'][0]['failover'])) { + $table2->style[-1] = 'text-align: left'; + } + $table2->style[0] = 'text-align: left'; $table2->style[1] = 'text-align: left'; $table2->style[2] = 'text-align: right'; @@ -3151,8 +3175,17 @@ function reporting_html_availability($table, $item, $pdf=0) foreach ($item['data'] as $row) { $table_row = []; - $table_row[] = $row['agent']; - $table_row[] = $row['availability_item']; + if (isset($row['failover'])) { + $table_row[] = ucfirst($row['failover']); + } + + if (isset($row['failover']) && $row['failover'] === 'result') { + $table_row[] = '--'; + $table_row[] = '--'; + } else { + $table_row[] = $row['agent']; + $table_row[] = $row['availability_item']; + } if ($row['time_total'] != 0 && $item['fields']['total_time']) { $table_row[] = human_time_description_raw( @@ -3229,6 +3262,10 @@ function reporting_html_availability($table, $item, $pdf=0) $table_row[] = ''.sla_truncate($row['SLA'], $config['graph_precision']).'%'; $table_row2 = []; + if (isset($row['failover'])) { + $table_row2[] = ucfirst($row['failover']); + } + $table_row2[] = $row['agent']; $table_row2[] = $row['availability_item']; if ($item['fields']['total_checks']) { From 475517afd7ed17891e43ef50b9d16f48ecee3066 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 22 Jan 2020 00:01:19 +0100 Subject: [PATCH 55/67] 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 92b58d2093..6b18e02935 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200121 +Version: 7.0NG.742-200122 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 7949890c7d..ae2d8c8588 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.742-200121" +pandora_version="7.0NG.742-200122" 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 d8f1f76c61..e96e6fc5ea 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.742'; -use constant AGENT_BUILD => '200121'; +use constant AGENT_BUILD => '200122'; # 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 0d9d6acdf9..999ee63bc7 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.742 -%define release 200121 +%define release 200122 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 d480d10feb..8347c67a70 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.742 -%define release 200121 +%define release 200122 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 ddfdeb96e1..4058d11690 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200121" +PI_BUILD="200122" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 9066521f04..3d4b2368ac 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200121} +{200122} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8fa204494b..253f64cd89 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.742(Build 200121)") +#define PANDORA_VERSION ("7.0NG.742(Build 200122)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2bef7af712..abd4f2fd1e 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.742(Build 200121))" + VALUE "ProductVersion", "(7.0NG.742(Build 200122))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index adce843c8e..7a61edb807 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200121 +Version: 7.0NG.742-200122 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 140f9a248a..fba1f194e0 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.742-200121" +pandora_version="7.0NG.742-200122" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8927bde5e3..4dea2961f4 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 = 'PC200121'; +$build_version = 'PC200122'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 365acaad65..d595b64387 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 d21404f52f..2a11f694e8 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.742 -%define release 200121 +%define release 200122 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 8f58d7492c..c05ae55ec1 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.742 -%define release 200121 +%define release 200122 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index a4dfa0b388..54212a3afd 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200121" +PI_BUILD="200122" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 9b18efac75..1c80e260e5 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.742 PS200121"; +my $version = "7.0NG.742 PS200122"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index aa85d0129f..145072230e 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.742 PS200121"; +my $version = "7.0NG.742 PS200122"; # save program name for logging my $progname = basename($0); From ca35bb64cc9143fa2c142afa5c0704fd7e44bbde Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Wed, 22 Jan 2020 10:17:35 +0100 Subject: [PATCH 56/67] Prepend folder to image to avoid Phar injection --- pandora_console/include/graphs/fgraph.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index 40c79bbf51..11f4db2f43 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -57,6 +57,9 @@ switch ($graph_type) { $out_of_lim_str = io_safe_output(get_parameter('out_of_lim_str', false)); $out_of_lim_image = get_parameter('out_of_lim_image', false); + // Add relative path to avoid phar object injection. + $out_of_lim_image = '../graphs/'.$out_of_lim_image; + $title = get_parameter('title'); $mode = get_parameter('mode', 1); From 32b28bea0c7c708ed60c2d6bf9034ccb1a0a0173 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 22 Jan 2020 11:10:02 +0100 Subject: [PATCH 57/67] Added warning in update manager offline --- .../update_manager/update_manager.offline.php | 11 +++- .../include/javascript/update_manager.js | 50 +++++++++++++++++-- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/update_manager/update_manager.offline.php b/pandora_console/godmode/update_manager/update_manager.offline.php index 8eff08d996..8fb4447772 100644 --- a/pandora_console/godmode/update_manager/update_manager.offline.php +++ b/pandora_console/godmode/update_manager/update_manager.offline.php @@ -46,6 +46,13 @@ if (! check_acl($config['id_user'], 0, 'PM') $baseurl = ui_get_full_url(false, false, false, false); +$current_package = db_get_value( + 'value', + 'tconfig', + 'token', + 'current_package_enterprise' +); + ?> var text1_package_file = "\n"; var text2_package_file = "\n"; + var text1_warning = "\n"; + var text2_warning = "\n"; var applying_mr = "\n"; var cancel_button = "\n"; var ok_button = "\n"; @@ -109,5 +118,5 @@ is not working on the metaconsole and there is no time to fix it --> diff --git a/pandora_console/include/javascript/update_manager.js b/pandora_console/include/javascript/update_manager.js index 0cc385fb95..6f0aeda5c6 100644 --- a/pandora_console/include/javascript/update_manager.js +++ b/pandora_console/include/javascript/update_manager.js @@ -4,7 +4,7 @@ var correct_install_progress = true; -function form_upload(homeurl) { +function form_upload(homeurl, current_package) { var home_url = typeof homeurl !== "undefined" ? homeurl + "/" : ""; //Thanks to: http://tutorialzine.com/2013/05/mini-ajax-file-upload-form/ @@ -164,7 +164,7 @@ function form_upload(homeurl) { .change(); // Begin the installation - install_package(res.package, homeurl); + install_package(res.package, homeurl, current_package); }); } else { // Something has gone wrong! @@ -214,7 +214,7 @@ function formatFileSize(bytes) { return (bytes / 1000).toFixed(2) + " KB"; } -function install_package(package, homeurl) { +function install_package(package, homeurl, current_package) { var home_url = typeof homeurl !== "undefined" ? homeurl + "/" : ""; $( @@ -1235,6 +1235,50 @@ function install_package(package, homeurl) { $("#pkg_apply_dialog").html(dialog_text); $("#pkg_apply_dialog").dialog("open"); + + const number_update = package.match(/package_(\d+).oum/); + + if (number_update === null || number_update[1] != current_package - 0 + 1) { + $( + "
" + ).dialog({ + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: "black" + }, + width: 600, + height: 250, + buttons: [ + { + text: ok_button, + click: function() { + $(this).dialog("close"); + } + } + ] + }); + + var dialog_warning = "
"; + dialog_warning = + dialog_warning + + "

" + + text1_warning + + "

"; + dialog_warning = dialog_warning + "

" + text2_warning + "

"; + dialog_warning = + dialog_warning + + "
"; + dialog_warning = dialog_warning + "
"; + + $("#warning_pkg").html(dialog_warning); + } } function check_install_package(package, homeurl) { From 5c3b6c7a69576ff6eead56807e15d0b6bd8d62d4 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 22 Jan 2020 12:18:11 +0100 Subject: [PATCH 58/67] Fix total check for failover --- .../include/functions_reporting.php | 49 +++++++++++++++---- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index d3912e7d81..e0d4d9cd34 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -6245,12 +6245,50 @@ function reporting_availability($report, $content, $date=false, $time=false) $return['kind_availability'] = 'module'; } + $avg = 0; + $min = null; + $min_text = ''; + $max = null; + $max_text = ''; + $count = 0; + if ($content['failover_mode']) { $availability_graph_data = reporting_availability_graph($report, $content, false, true); $data = $availability_graph_data['data']; + foreach ($data as $key => $item_data) { - $data[$key]['SLA'] = $item_data['sla_value']; - $data[$key]['availability_item'] = $item_data['module']; + $percent_ok = $item_data['sla_value']; + $data[$key]['SLA'] = $percent_ok; + + if ($item_data['failover'] != 'result') { + $data[$key]['availability_item'] = $item_data['module']; + $text = $item_data['agent'].' ('.$item_data['module'].')'; + $avg = ((($avg * $count) + $percent_ok) / ($count + 1)); + if (is_null($min)) { + $min = $percent_ok; + $min_text = $text; + } else { + if ($min > $percent_ok) { + $min = $percent_ok; + $min_text = $text; + } + } + + if (is_null($max)) { + $max = $percent_ok; + $max_text = $text; + } else { + if ($max < $percent_ok) { + $max = $percent_ok; + $max_text = $text; + } + } + + $count++; + } else { + $data[$key]['availability_item'] = '--'; + $data[$key]['agent'] = '--'; + } } } else { if (empty($content['subitems'])) { @@ -6274,13 +6312,6 @@ function reporting_availability($report, $content, $date=false, $time=false) $data = []; - $avg = 0; - $min = null; - $min_text = ''; - $max = null; - $max_text = ''; - $count = 0; - $style = io_safe_output($content['style']); if ($style['hide_notinit_agents']) { $aux_id_agents = $agents; From 18a3a747bd71dc3e45980b028f5072718e51fb2f Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 22 Jan 2020 12:24:15 +0100 Subject: [PATCH 59/67] add wiki url alerts correlation --- pandora_console/include/functions.php | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 3be9676a28..89c53802b4 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -5480,6 +5480,45 @@ function get_help_info($section_name) } else { $result .= 'Discovery&printable=yes'; } + + case 'alert_configure': + if ($es) { + $result .= 'Alerts#Correlation_alert_creation'; + } else { + $result .= 'Alerts#Correlation_alert_creation'; + } + break; + + case 'alert_correlation': + if ($es) { + $result .= 'Alerts#Alert_correlation:_event_and_log_alerts'; + } else { + $result .= 'Alerts#Alert_correlation:_event_and_log_alerts'; + } + break; + + case 'alert_rules': + if ($es) { + $result .= 'Alerts#Rules_within_a_correlation_alert'; + } else { + $result .= 'Alerts#Rules_within_a_correlation_alert'; + } + break; + + case 'alert_fields': + if ($es) { + $result .= 'Alerts#Step_3:_Advanced_fields'; + } else { + $result .= 'Alerts#Step_3:_Advanced_fields'; + } + break; + + case 'alert_triggering': + if ($es) { + $result .= 'Alerts#Configuring_an_alert_template'; + } else { + $result .= 'Alerts#Configuring_an_alert_template'; + } break; } From c44b595c8a2110231cf8e5bc9f65eb98f4c435ef Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Wed, 22 Jan 2020 17:20:13 +0100 Subject: [PATCH 60/67] fixed vulnerability --- pandora_console/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 56782fd9ef..c1c9dd5d35 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1234,9 +1234,13 @@ if ($searchPage) { if (isset($_GET['sec2'])) { $file = $_GET['sec2'].'.php'; + // Make file path absolute to prevent accessing remote files. + $file = __DIR__.'/'.$file; // Translate some secs. $main_sec = get_sec($_GET['sec']); $_GET['sec'] = ($main_sec == false) ? $_GET['sec'] : $main_sec; + + // Third condition is aimed to prevent from traversal attack. if (!file_exists($file) || ($_GET['sec2'] != 'general/logon_ok' && enterprise_hook( 'enterprise_acl', @@ -1247,7 +1251,8 @@ if ($searchPage) { true, isset($_GET['sec3']) ? $_GET['sec3'] : '', ] - ) == false) + ) == false + || strpos(realpath($file), __DIR__) === false) ) { unset($_GET['sec2']); include 'general/noaccess.php'; From 9f9cc9beda4b77aa96636069c8bac5a63a6aadf1 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 23 Jan 2020 10:40:55 +0100 Subject: [PATCH 61/67] Fixed injection sql in chart_generator --- pandora_console/include/lib/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/lib/User.php b/pandora_console/include/lib/User.php index 4eb5853676..8e747a4d9f 100644 --- a/pandora_console/include/lib/User.php +++ b/pandora_console/include/lib/User.php @@ -70,7 +70,7 @@ class User $this->sessions[$data['phpsessionid']] = 1; $info = \db_get_row_filter( 'tsessions_php', - ['id_session' => $data['phpsessionid']] + ['id_session' => io_safe_input($data['phpsessionid'])] ); if ($info !== false) { From ea3a317a1b1a3a123161c94ae310c15f42ade893 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 24 Jan 2020 00:01:33 +0100 Subject: [PATCH 62/67] 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 6b18e02935..5dc083be95 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200122 +Version: 7.0NG.742-200124 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 ae2d8c8588..334c954341 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.742-200122" +pandora_version="7.0NG.742-200124" 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 e96e6fc5ea..a85f85acab 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.742'; -use constant AGENT_BUILD => '200122'; +use constant AGENT_BUILD => '200124'; # 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 999ee63bc7..d9c78539f3 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.742 -%define release 200122 +%define release 200124 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 8347c67a70..ade17eaf05 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.742 -%define release 200122 +%define release 200124 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 4058d11690..1dd9309f0f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200122" +PI_BUILD="200124" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 3d4b2368ac..9249c13df2 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200122} +{200124} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 253f64cd89..d987711c1f 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.742(Build 200122)") +#define PANDORA_VERSION ("7.0NG.742(Build 200124)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index abd4f2fd1e..1d7f984fe8 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.742(Build 200122))" + VALUE "ProductVersion", "(7.0NG.742(Build 200124))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7a61edb807..24bc55140e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200122 +Version: 7.0NG.742-200124 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 fba1f194e0..f3c21ff27e 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.742-200122" +pandora_version="7.0NG.742-200124" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4dea2961f4..7426025688 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 = 'PC200122'; +$build_version = 'PC200124'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d595b64387..fa2b6c51e5 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 2a11f694e8..b28e5f0249 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.742 -%define release 200122 +%define release 200124 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index c05ae55ec1..82570b0bc8 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.742 -%define release 200122 +%define release 200124 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 54212a3afd..373cea67e8 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200122" +PI_BUILD="200124" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 1c80e260e5..d38c45f945 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.742 PS200122"; +my $version = "7.0NG.742 PS200124"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 145072230e..65c5e7d731 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.742 PS200122"; +my $version = "7.0NG.742 PS200124"; # save program name for logging my $progname = basename($0); From aa3bf33607f4e98a6c9a6599fde8a70f0a3a76e8 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 24 Jan 2020 09:28:16 +0100 Subject: [PATCH 63/67] Added treport_content_item in migrate --- .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 bbc07ad08c..5f69bf1b28 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 @@ -2436,6 +2436,21 @@ CREATE TABLE `tagent_repository` ( ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ---------------------------------------------------------------------- +-- Table `treport_content_item` +-- ---------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `treport_content_item` ( + `id` INTEGER UNSIGNED NOT NULL auto_increment, + `id_report_content` INTEGER UNSIGNED NOT NULL, + `id_agent_module` int(10) unsigned NOT NULL, + `id_agent_module_failover` int(10) unsigned NOT NULL DEFAULT 0, + `server_name` text, + `operation` text, + PRIMARY KEY(`id`), + FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE = InnoDB DEFAULT CHARSET=utf8; + -- ---------------------------------------------------------------------- -- Table `tdeployment_hosts` -- ---------------------------------------------------------------------- From b4b1fbb3c1b675e52a399bb2888b8246811ffa87 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 25 Jan 2020 00:01:10 +0100 Subject: [PATCH 64/67] 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 5dc083be95..20c4300965 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200124 +Version: 7.0NG.742-200125 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 334c954341..5ed775c964 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.742-200124" +pandora_version="7.0NG.742-200125" 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 a85f85acab..fd279b49c6 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.742'; -use constant AGENT_BUILD => '200124'; +use constant AGENT_BUILD => '200125'; # 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 d9c78539f3..b2305775af 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.742 -%define release 200124 +%define release 200125 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 ade17eaf05..716de7eae7 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.742 -%define release 200124 +%define release 200125 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 1dd9309f0f..d021a1a26d 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200124" +PI_BUILD="200125" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 9249c13df2..8b44653944 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200124} +{200125} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d987711c1f..90ac49ae76 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.742(Build 200124)") +#define PANDORA_VERSION ("7.0NG.742(Build 200125)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 1d7f984fe8..36cfa474f4 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.742(Build 200124))" + VALUE "ProductVersion", "(7.0NG.742(Build 200125))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 24bc55140e..177af6e589 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200124 +Version: 7.0NG.742-200125 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 f3c21ff27e..ee34ef8aca 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.742-200124" +pandora_version="7.0NG.742-200125" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 7426025688..6ce1037557 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 = 'PC200124'; +$build_version = 'PC200125'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index fa2b6c51e5..d1aa90214b 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 b28e5f0249..4958098b03 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.742 -%define release 200124 +%define release 200125 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 82570b0bc8..0b36f3e972 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.742 -%define release 200124 +%define release 200125 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 373cea67e8..9c31652da7 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200124" +PI_BUILD="200125" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index d38c45f945..b05c383029 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.742 PS200124"; +my $version = "7.0NG.742 PS200125"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 65c5e7d731..f782364755 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.742 PS200124"; +my $version = "7.0NG.742 PS200125"; # save program name for logging my $progname = basename($0); From 5dbb80287eaac01150b248bfb3fd28ebe54cb502 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 26 Jan 2020 00:01:10 +0100 Subject: [PATCH 65/67] 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 20c4300965..e190787174 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200125 +Version: 7.0NG.742-200126 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 5ed775c964..86fd4b79ff 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.742-200125" +pandora_version="7.0NG.742-200126" 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 fd279b49c6..01d9326a0f 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.742'; -use constant AGENT_BUILD => '200125'; +use constant AGENT_BUILD => '200126'; # 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 b2305775af..09f94140c5 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.742 -%define release 200125 +%define release 200126 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 716de7eae7..5f06b1fa85 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.742 -%define release 200125 +%define release 200126 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 d021a1a26d..4fe216f7b4 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200125" +PI_BUILD="200126" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8b44653944..419cc78ec1 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200125} +{200126} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 90ac49ae76..5b0f35889c 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.742(Build 200125)") +#define PANDORA_VERSION ("7.0NG.742(Build 200126)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 36cfa474f4..b2b83b438a 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.742(Build 200125))" + VALUE "ProductVersion", "(7.0NG.742(Build 200126))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 177af6e589..7f86ca89b7 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200125 +Version: 7.0NG.742-200126 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 ee34ef8aca..a33bb02743 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.742-200125" +pandora_version="7.0NG.742-200126" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6ce1037557..45269b8283 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 = 'PC200125'; +$build_version = 'PC200126'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d1aa90214b..4fd7303cbd 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 4958098b03..7d1de9cdbe 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.742 -%define release 200125 +%define release 200126 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 0b36f3e972..43553eba8e 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.742 -%define release 200125 +%define release 200126 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 9c31652da7..909c83ff44 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200125" +PI_BUILD="200126" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index b05c383029..ab92c2bba9 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.742 PS200125"; +my $version = "7.0NG.742 PS200126"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f782364755..d35908cedf 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.742 PS200125"; +my $version = "7.0NG.742 PS200126"; # save program name for logging my $progname = basename($0); From e35edd92b3f7f5209e6394bffa7187c60256e829 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 27 Jan 2020 00:01:09 +0100 Subject: [PATCH 66/67] 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 e190787174..a9a94df621 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.742-200126 +Version: 7.0NG.742-200127 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 86fd4b79ff..e247c70a36 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.742-200126" +pandora_version="7.0NG.742-200127" 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 01d9326a0f..0ab1a0ceb9 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.742'; -use constant AGENT_BUILD => '200126'; +use constant AGENT_BUILD => '200127'; # 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 09f94140c5..1ac19db027 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.742 -%define release 200126 +%define release 200127 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 5f06b1fa85..1cf80874bf 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.742 -%define release 200126 +%define release 200127 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 4fe216f7b4..e63aeaad06 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200126" +PI_BUILD="200127" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 419cc78ec1..28bf962de1 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200126} +{200127} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5b0f35889c..9edd1881d0 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.742(Build 200126)") +#define PANDORA_VERSION ("7.0NG.742(Build 200127)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index b2b83b438a..a93618b724 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.742(Build 200126))" + VALUE "ProductVersion", "(7.0NG.742(Build 200127))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7f86ca89b7..235f5c5260 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200126 +Version: 7.0NG.742-200127 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 a33bb02743..9229f58351 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.742-200126" +pandora_version="7.0NG.742-200127" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 45269b8283..5176bf8fde 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 = 'PC200126'; +$build_version = 'PC200127'; $pandora_version = 'v7.0NG.742'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 4fd7303cbd..23d954d913 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 7d1de9cdbe..2505b9dede 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.742 -%define release 200126 +%define release 200127 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 43553eba8e..6ad589c19d 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.742 -%define release 200126 +%define release 200127 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 909c83ff44..ce2ba2feea 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200126" +PI_BUILD="200127" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index ab92c2bba9..671f66786a 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.742 PS200126"; +my $version = "7.0NG.742 PS200127"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d35908cedf..94f5de381f 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.742 PS200126"; +my $version = "7.0NG.742 PS200127"; # save program name for logging my $progname = basename($0); From c0d6ae1496637bebaf763faa956ed865d3e68ac0 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 27 Jan 2020 09:32:22 +0100 Subject: [PATCH 67/67] Fixed label Failover --- pandora_console/include/functions_reporting_html.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 92756b2892..dc832dd870 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -3176,7 +3176,11 @@ function reporting_html_availability($table, $item, $pdf=0) foreach ($item['data'] as $row) { $table_row = []; if (isset($row['failover'])) { - $table_row[] = ucfirst($row['failover']); + if (strpos($row['failover'], 'failover') !== false) { + $table_row[] = __('Failover'); + } else { + $table_row[] = ucfirst($row['failover']); + } } if (isset($row['failover']) && $row['failover'] === 'result') {