From 97cda17560eb94f01da989c18f6831e8cbff5897 Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 11 Feb 2020 12:00:04 +0100 Subject: [PATCH 01/30] remove help_event_alert.php --- .../include/help/en/help_event_alert.php | 66 ------------------- .../include/help/es/help_event_alert.php | 64 ------------------ 2 files changed, 130 deletions(-) delete mode 100644 pandora_console/include/help/en/help_event_alert.php delete mode 100644 pandora_console/include/help/es/help_event_alert.php diff --git a/pandora_console/include/help/en/help_event_alert.php b/pandora_console/include/help/en/help_event_alert.php deleted file mode 100644 index 04cf373b38..0000000000 --- a/pandora_console/include/help/en/help_event_alert.php +++ /dev/null @@ -1,66 +0,0 @@ - - -

Event Alerts

- -It is possible to define alerts on events, that allows to work from a completely new approach much more flexible. This is an Enterprise feature.
- -To create the new event alerts, click on the Create button in the Event alerts menu from the Administration menu.

- - -

- - - '250px']); ?> - - -
-An event alert is composed by different rules, linked between them by logical operators (and, or, xor, nand, nor, nxor). -

- - '550px']); ?> - -
-To could work easier with them, the configuration parameters of an event alert are identical to the module alert. Here could be find a detailed explanation of any of them. There are only two specific parameters of the event alerts: -

- Rule evaluation mode: There are two options Pass and Drop. Pass means that if a event fullfilled with a alert the alerts bellow are evaluated. Drop means that if a event fullfilled with a alert the alerts bellow stop to evaluated. -

- Group by: Allows to group the rules by agent, module, alert or group. For example, if a rule is configured to it fires when we receive two critical events, and it's grouped by agent, there should arrive two critical events from the same agent. It's possible to switch off. -

-Each rule is configured to fire with an specific kind of event. The alert will be fired when the logical equation defined by the rules and its operators is fulfilled -

- - - '550px']); ?> - -
- -The configuration parameters of one rule that are possible are: -

- Name: Name of the rule.
- User comment: Free comment.
- Event: Regular expression that matches with the event text.
- Window: The events that have been generated out of the time window will be rejected
- Count: Number of events that have to match with the rule to it could be fired.
- Agent: Regular expression that matches with the name of the agent that generated the event.
- Module: Regular expression that matches with the name of the module that generated the event.
- Module alerts: Regular expression that matches with the name of the alert that generated the event.
- Group: Group the agent belongs to.
- Criticity: Event criticity.
- Tag: Tags associated to the event.
- User: User associated to the event.
- Event type: Kind of event.

- -For example, we could configure a rule that matches with the events generated by any module that is named cpu_load of any agent of the Servers group that has associated the tag System when the module goes to critical status: -

- - - '550px']); ?> - -
-

Given the high number of events that the database could store, the server works on an event window that is defined in the pandora_server.conf configuration file through the parameter event_window. The events that have been generated out of this time window won't be processed by the server, so it doesn't make sense to specify in a rule a time window higher to the one configured in the server

- - diff --git a/pandora_console/include/help/es/help_event_alert.php b/pandora_console/include/help/es/help_event_alert.php deleted file mode 100644 index 5c326796dd..0000000000 --- a/pandora_console/include/help/es/help_event_alert.php +++ /dev/null @@ -1,64 +0,0 @@ - - -

Alerta de evento

- -Desde la versión 4.0 de se pueden definir alertas sobre los eventos, lo que permite trabajar desde una perspectiva completamente nueva y mucho más flexible. Esta es una característica Enterprise.

- -Las Alertas de evento nuevas se crean pinchando en el botón Create en el menú Event alerts en el menú de Administración. -

- - - '250px']); ?> - - -
-Una alerta de eventos está compuesta por distintas reglas, relacionadas entre sí por operadores lógicos (and, or, xor, nand, nor, nxor). -

- - '550px']); ?> - -
-Para hacer más fácil trabajar con ellas, los parámetros de configuración de una alerta de eventos son idénticos a los de una alerta de módulo. Aquí se puede encontrar una explicación detallada de cada uno de ellos. Únicamente existen dos parámetros específicos de las alertas de eventos: -

- Rule evaluation mode: Hay dos opciones Pass y Drop. Pass significa que en caso de que un evento coincida con una alerta se sigan evaluando el resto de alertas. Drop significa que en caso de que un evento coincida con una alerta no se evaluen el resto de alertas. -

- Group by: Permite agrupar las reglas por agente, módulo, alerta o grupo. Por ejemplo, si se configura una regla para que salte cuando se reciban dos eventos críticos y se agrupa por agente, deberán llegar dos eventos críticos de un mismo agente. Se puede desactivar. -

-Cada regla se configura para saltar ante un determinado tipo de evento, cuando se cumple la ecuación lógica definida por las reglas y sus operadores, la alerta se dispara. -

- - - '550px']); ?> - -
- -Los posibles parámetros de configuración de una regla son: -

- Name: Nombre de la regla.
- User comment: Comentario libre.
- Event: Expresión regular que casa con el texto del evento.
- Window: Los eventos que se hayan generado fuera de la ventana de tiempo serán descartados.
- Count: Número de eventos que tienen que casar con la regla para que ésta se dispare.
- Agent: Expresión regular que casa con el nombre del agente que generó el evento.
- Module: Expresión regular que casa con el nombre del módulo que generó el evento.
- Module alerts: Expresión regular que casa con el nombre de la alerta que generó el evento.
- Group: Grupo al que pertenece el Agente.
- Criticity: Criticidad del evento.
- Tag: Tags asociados al evento.
- User: Usuario asociado al evento.
- Event type: Tipo de evento.

- -Por ejemplo, podríamos configurar una regla que case con los eventos generados por cualquier módulo que se llame cpu_load de cualquier agente del grupo Servers que lleve asociado el tag System cuando el módulo pasa al estado crítico: -

- - - '550px']); ?> - -
-

Dado el elevado número de eventos que puede llegar a albergar la base de datos de , el servidor trabaja sobre una ventana de eventos que se define en el fichero de configuración pandora_server.conf mediante el parámetro event_window. Los eventos que se hayan generado fuera de esta ventana de tiempo no serán procesados por el servidor, de modo que no tiene sentido especificar en una regla una ventana de tiempo superior a la configurada en el servidor

- - From 34b361e21ad3ccb7a97b1d39e81ed97574646b3a Mon Sep 17 00:00:00 2001 From: Calvo Date: Wed, 7 Apr 2021 17:38:38 +0200 Subject: [PATCH 02/30] Fixed CLI update_agent adding duplicate agent address references --- pandora_server/util/pandora_manage.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d84e8a8bd4..19a61be9f7 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -3095,10 +3095,16 @@ sub cli_agent_update() { # Add the address to the agent if (defined $use_alias and $use_alias eq 'use_alias') { foreach my $id (@id_agents) { - add_new_address_agent ($dbh, $address_id, $id->{'id_agente'}); + my $ag_addr_id = get_agent_addr_id($dbh, $address_id, $id->{'id_agente'}); + if($ag_addr_id == -1) { + add_new_address_agent ($dbh, $address_id, $id->{'id_agente'}); + } } } else { - add_new_address_agent ($dbh, $address_id, $id_agent); + my $ag_addr_id = get_agent_addr_id($dbh, $address_id, $id_agent); + if($ag_addr_id == -1) { + add_new_address_agent ($dbh, $address_id, $id_agent); + } } $field = 'direccion'; From 5dd5a9aeee28791db57044f7ae4ef9cba3e0dae3 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 4 May 2021 12:54:21 +0200 Subject: [PATCH 03/30] Fixed Cross-Site Scripting --- pandora_console/general/login_page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 9629bb8c75..2ca4bda9bf 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -210,7 +210,7 @@ switch ($login_screen) { case 'login': if (!empty($page) && !empty($sec)) { foreach ($_POST as $key => $value) { - html_print_input_hidden(io_safe_input($key), $value); + html_print_input_hidden(io_safe_input($key), io_safe_input($value)); } } From f8f6016c215b9bee8d45dede127d6ddbca64e5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Tue, 4 May 2021 19:07:18 +0200 Subject: [PATCH 04/30] Solved issues with double quotes and improve the code --- .../include/class/ExternalTools.class.php | 52 ++++++++++++++----- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/pandora_console/include/class/ExternalTools.class.php b/pandora_console/include/class/ExternalTools.class.php index 403cd72fa6..5918f05459 100644 --- a/pandora_console/include/class/ExternalTools.class.php +++ b/pandora_console/include/class/ExternalTools.class.php @@ -98,8 +98,12 @@ class ExternalTools extends HTML // Define array for host the command/parameters pair data. $this->pathCustomComm[$customValue] = []; // Ensure the information. - $this->pathCustomComm[$customValue]['command_custom'] = (string) get_parameter('command_custom_'.$customCommandId); - $this->pathCustomComm[$customValue]['params_custom'] = (string) get_parameter('params_custom_'.$customCommandId); + $this->pathCustomComm[$customValue]['command_custom'] = (string) get_parameter( + 'command_custom_'.$customCommandId + ); + $this->pathCustomComm[$customValue]['params_custom'] = (string) get_parameter( + 'params_custom_'.$customCommandId + ); } } } @@ -139,7 +143,7 @@ class ExternalTools extends HTML global $config; $i = 0; - $sounds = $this->get_sounds(); + $sounds = $this->getSounds(); if ($this->updatePaths === true) { $external_tools_config = []; @@ -170,7 +174,9 @@ class ExternalTools extends HTML if ($result === true) { $result = config_update_value( 'external_tools_config', - json_encode($external_tools_config) + io_safe_input( + json_encode($external_tools_config) + ) ); } @@ -181,8 +187,12 @@ class ExternalTools extends HTML ); } else { if (isset($config['external_tools_config']) === true) { - $external_tools_config_output = io_safe_output($config['external_tools_config']); - $external_tools_config = json_decode($external_tools_config_output, true); + $external_tools_config = json_decode( + io_safe_output( + $config['external_tools_config'] + ), + true + ); // Setting paths. $this->pathTraceroute = $external_tools_config['traceroute_path']; $this->pathPing = $external_tools_config['ping_path']; @@ -686,16 +696,32 @@ class ExternalTools extends HTML // Only perform an execution if command is passed. Avoid errors. if (empty($command) === false) { + $resultCode = 0; ob_start(); - system($command); + system(io_safe_output($command), $resultCode); $output .= ob_get_clean(); } else { - $output .= __('No command for perform'); + $output .= __('Command not response'); } $output .= ''; + + if ($resultCode !== 0) { + throw new Exception( + sprintf( + '%s %s', + __('The command failed and obtained the return code:'), + $resultCode + ), + 1 + ); + } } catch (\Throwable $th) { - $output = __('Something went wrong while perform the execution. Please check the configuration.'); + $output = sprintf( + '%s %s', + $th->getMessage(), + __('Something went wrong while perform the execution. Please check the configuration.') + ); } echo $output; @@ -888,7 +914,7 @@ class ExternalTools extends HTML * * @return string Path. */ - private function get_sounds() + private function getSounds() { global $config; @@ -958,11 +984,13 @@ class ExternalTools extends HTML if (parseInt(separatedId[2]) === 0) { $("#text-command_custom_"+fieldLines, "#"+thisNewId) .attr("name", "command_custom_"+fieldLinesAdded) - .attr("id", "text-command_custom_"+fieldLinesAdded); + .attr("id", "text-command_custom_"+fieldLinesAdded) + .val(''); } else if (parseInt(separatedId[2]) === 1) { $("#text-params_custom_"+fieldLines, "#"+thisNewId) .attr("id", "text-params_custom_"+fieldLinesAdded) - .attr("name", "params_custom_"+fieldLinesAdded); + .attr("name", "params_custom_"+fieldLinesAdded) + .val(''); } else if (parseInt(separatedId[2]) === 2) { $("#img_delete_button_custom_"+fieldLines, "#"+thisNewId) .attr("id", "img_delete_button_custom_"+fieldLinesAdded); From a869e0749c419f29da09b5c1c629c09c1a1af0aa Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 13 May 2021 10:11:58 +0200 Subject: [PATCH 05/30] #7505 fixed fixed Hirearchy --- pandora_console/include/javascript/pandora_dashboards.js | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js index efefaf1195..6371d8c84b 100644 --- a/pandora_console/include/javascript/pandora_dashboards.js +++ b/pandora_console/include/javascript/pandora_dashboards.js @@ -843,6 +843,7 @@ function processTreeSearch(settings) { filters.searchModule = settings.searchModule; filters.statusModule = settings.statusModule; filters.groupID = settings.searchGroup; + filters.searchHirearchy = 1; $.ajax({ type: "POST", From 7617330e931767fff637885853d07bfd647a1df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Mon, 17 May 2021 13:31:46 +0200 Subject: [PATCH 06/30] Added agent regex to console task template send email --- pandora_console/include/functions_cron.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index aebeeb7e42..f4c7597a08 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -552,11 +552,24 @@ function cron_list_table() continue; } - $agents_id = $args[1]; - $id_group = $args[2]; + if (empty($args[0]) === false || (string) $args[1] !== '0') { + $agents_id = $args[1]; + } else { + if (empty($args[2]) === false) { + $agents_id = sprintf( + '(%s) %s', + __('regex'), + $args[2] + ); + } else { + $agents_id = __('None'); + } + } + + $id_group = $args[3]; $report_per_agent = $args[0]; - $report_name = $args[3]; - $email = $args[4]; + $report_name = $args[4]; + $email = $args[5]; $data[2] .= '
- '.__('Template').': '; $data[2] .= ''; $data[2] .= $template['name'].''; From 9559a63c3b9a15dc59dcbb16511c2f752dee1fcb Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 19 May 2021 17:11:41 +0200 Subject: [PATCH 07/30] #7555 fixed module_search with filter --- .../include/lib/Dashboard/Widgets/events_list.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pandora_console/include/lib/Dashboard/Widgets/events_list.php b/pandora_console/include/lib/Dashboard/Widgets/events_list.php index 388c8e34c9..5f5f732128 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/events_list.php +++ b/pandora_console/include/lib/Dashboard/Widgets/events_list.php @@ -535,6 +535,15 @@ class EventsListWidget extends Widget $filter['tag_without'] = base64_encode( json_encode($filter['tag_without']) ); + + if (!empty($filter['id_agent_module'])) { + $name = \modules_get_modules_name( + ' FROM tagente_modulo', + ' WHERE id_agente_modulo = '.$filter['id_agent_module'], + is_metaconsole() + ); + $filter['module_search'] = $name[0]['nombre']; + } } else { // Filtering. $filter['event_view_hr'] = $hours; From 52bad0e53c5fb67d1d638751c7e9852399a1d956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Fri, 21 May 2021 13:59:54 +0200 Subject: [PATCH 08/30] Added CSRF validation --- pandora_console/general/login_page.php | 3 + pandora_console/index.php | 135 ++++++++++++++++--------- 2 files changed, 92 insertions(+), 46 deletions(-) diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 9629bb8c75..f529e62abb 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -334,6 +334,9 @@ if ($config['enterprise_installed']) { } } +// CSRF validation. +html_print_csrf_hidden(); + echo ''; echo ''; echo ' '; +
'.html_print_input_text('name_file', '', '', 30, 50, true).html_print_submit_button(__('Create'), 'create', false, 'class="sub next"', true).html_print_input_hidden('real_directory', $real_directory, true).html_print_input_hidden('directory', $relative_directory, true).html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['server_unique_identifier']), true).html_print_input_hidden('umask', $umask, true).html_print_input_hidden('create_text_file', 1, true).'
'; echo "
"; diff --git a/pandora_console/include/get_file.php b/pandora_console/include/get_file.php index f5ccaecd99..8de031a79b 100644 --- a/pandora_console/include/get_file.php +++ b/pandora_console/include/get_file.php @@ -35,7 +35,7 @@ $file = base64_decode(urldecode($file_raw)); $hash = get_parameter('hash', null); -if ($file === '' || $hash === '' || $hash !== md5($file_raw.$config['dbpass']) || !isset($_SERVER['HTTP_REFERER'])) { +if ($file === '' || $hash === '' || $hash !== md5($file_raw.$config['server_unique_identifier']) || !isset($_SERVER['HTTP_REFERER'])) { echo "

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

'; } else { $downloadable_file = ''; From b3aa47877d5743b3de973367ab79e7371ec21f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Fri, 11 Jun 2021 15:54:04 +0200 Subject: [PATCH 16/30] Fixed issue with meta --- pandora_console/include/functions_cron.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index f4c7597a08..4469bb50f8 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -552,7 +552,9 @@ function cron_list_table() continue; } - if (empty($args[0]) === false || (string) $args[1] !== '0') { + hd($args, true); + hd('cron', true); + if (empty($args[1]) === false && (string) $args[1] !== '0') { $agents_id = $args[1]; } else { if (empty($args[2]) === false) { @@ -566,8 +568,7 @@ function cron_list_table() } } - $id_group = $args[3]; - $report_per_agent = $args[0]; + $report_per_agent = $args[3]; $report_name = $args[4]; $email = $args[5]; $data[2] .= '
- '.__('Template').': '; From e17b63e6fc8ed11120d342d2c3995ef2f4b818f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Mon, 14 Jun 2021 08:16:35 +0200 Subject: [PATCH 17/30] Fixed issue with single line --- pandora_console/include/class/ExternalTools.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/class/ExternalTools.class.php b/pandora_console/include/class/ExternalTools.class.php index 5918f05459..43648f92d7 100644 --- a/pandora_console/include/class/ExternalTools.class.php +++ b/pandora_console/include/class/ExternalTools.class.php @@ -1004,6 +1004,10 @@ class ExternalTools extends HTML if (parseInt(lineNumber) >= 1 && lineCount > 1) { $("#custom_row_" + lineNumber).remove(); + } else if (lineCount === 1) { + $("#custom_row_" + lineNumber).find('input').each(function() { + $(this).val(''); + }); } if (lineCount === 1) { From 38ad3574f3087faf273f6924a0ae3d1f5850a57a Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 15 Jun 2021 15:57:13 +0200 Subject: [PATCH 18/30] scape meta characters --- pandora_server/lib/PandoraFMS/Goliat/GoliatCURL.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_server/lib/PandoraFMS/Goliat/GoliatCURL.pm b/pandora_server/lib/PandoraFMS/Goliat/GoliatCURL.pm index 63fe5ca5de..bd63fb5449 100755 --- a/pandora_server/lib/PandoraFMS/Goliat/GoliatCURL.pm +++ b/pandora_server/lib/PandoraFMS/Goliat/GoliatCURL.pm @@ -254,6 +254,8 @@ sub g_http_task { utf8::decode($match_string); } + $match_string = quotemeta($match_string); + if ( $as_string =~ m/$match_string/i ){ $total_valid_requests++; } else { From 39f3e1987eeb10c26467b0ee659489ece976277e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Wed, 16 Jun 2021 10:15:53 +0200 Subject: [PATCH 19/30] Fixed bye bye --- pandora_console/general/login_page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index f529e62abb..08b8e3fb33 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -689,7 +689,7 @@ html_print_div(['id' => 'forced_title_layer', 'class' => 'forced_title_layer', ' }); $("#submit-hide-login-logout").click (function () { - $("#login_logout").dialog('close'); + document.location = ""; }); }); break; From 43cd308ef15197e2dd5df22118fe1343e0f472d6 Mon Sep 17 00:00:00 2001 From: marcos Date: Fri, 18 Jun 2021 12:37:06 +0200 Subject: [PATCH 20/30] fixed conflicts and add removed files in delete_files.txt --- pandora_console/extras/delete_files/delete_files.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt index 9221d762aa..d4c3b0adb8 100644 --- a/pandora_console/extras/delete_files/delete_files.txt +++ b/pandora_console/extras/delete_files/delete_files.txt @@ -89,4 +89,9 @@ godmode/update_manager/update_manager.offline.php godmode/update_manager/update_manager.online.php include/javascript/update_manager.js enterprise/include/functions_update_manager.php -include/ajax/rolling_release.ajax.php \ No newline at end of file +include/ajax/rolling_release.ajax.php +pandora_console/include/help/en/help_event_alert.php +pandora_console/include/help/es/help_event_alert.php +pandora_console/enterprise/godmode/alerts/alert_events.php +pandora_console/enterprise/godmode/alerts/alert_events_list.php +pandora_console/enterprise/godmode/alerts/alert_events_rules.php \ No newline at end of file From 682a977ef17cf71f218ddf2e95c28f06e37db57d Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 19 Jun 2021 01:00:49 +0200 Subject: [PATCH 21/30] 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 fe2025d954..63016c6b38 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.755-210618 +Version: 7.0NG.755-210619 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 c8f5fe07e5..885b930e39 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.755-210618" +pandora_version="7.0NG.755-210619" 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 343695c0a0..48ae32df20 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.755'; -use constant AGENT_BUILD => '210618'; +use constant AGENT_BUILD => '210619'; # 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 7dc09fa34a..77412949ac 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.755 -%define release 210618 +%define release 210619 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 347dd6993d..b06923ad84 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.755 -%define release 210618 +%define release 210619 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 77642cb05b..c5b1656038 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.755" -PI_BUILD="210618" +PI_BUILD="210619" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c6db424c17..fdfe417c76 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210618} +{210619} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index a6dac6f2e6..25819d56c1 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.755 Build 210618") +#define PANDORA_VERSION ("7.0NG.755 Build 210619") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 8e62900067..135fe37268 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.755(Build 210618))" + VALUE "ProductVersion", "(7.0NG.755(Build 210619))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8054509121..bc5025c785 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.755-210618 +Version: 7.0NG.755-210619 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 f006f0b474..d01f58de67 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.755-210618" +pandora_version="7.0NG.755-210619" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index ddcfc0ddad..8944c9ba6d 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 = 'PC210618'; +$build_version = 'PC210619'; $pandora_version = 'v7.0NG.755'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 4684286100..de054561a1 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 4c24a764bb..599b012ed1 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.755 -%define release 210618 +%define release 210619 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f0a5cbc220..22b78030f7 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.755 -%define release 210618 +%define release 210619 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 7b751eacfd..26be6e56b4 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.755" -PI_BUILD="210618" +PI_BUILD="210619" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 3c4e7f4b83..851de53332 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.755 Build 210618"; +my $version = "7.0NG.755 Build 210619"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 6fde19f1ab..99a9f940fb 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.755 Build 210618"; +my $version = "7.0NG.755 Build 210619"; # save program name for logging my $progname = basename($0); From dd5e7e550dc9f071a18a95b5b19c8d825ae6f01d Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 20 Jun 2021 01:00:37 +0200 Subject: [PATCH 22/30] 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 63016c6b38..ce931e19db 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.755-210619 +Version: 7.0NG.755-210620 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 885b930e39..6b6e85c6ec 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.755-210619" +pandora_version="7.0NG.755-210620" 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 48ae32df20..43c3cbd926 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.755'; -use constant AGENT_BUILD => '210619'; +use constant AGENT_BUILD => '210620'; # 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 77412949ac..bed539ee98 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.755 -%define release 210619 +%define release 210620 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 b06923ad84..9eec4f18ca 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.755 -%define release 210619 +%define release 210620 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 c5b1656038..01ee9a1b37 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.755" -PI_BUILD="210619" +PI_BUILD="210620" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index fdfe417c76..07f98b6d14 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210619} +{210620} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 25819d56c1..b5ec0a3c68 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.755 Build 210619") +#define PANDORA_VERSION ("7.0NG.755 Build 210620") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 135fe37268..3308198995 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.755(Build 210619))" + VALUE "ProductVersion", "(7.0NG.755(Build 210620))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index bc5025c785..9f611e7018 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.755-210619 +Version: 7.0NG.755-210620 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 d01f58de67..de34a2f1f0 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.755-210619" +pandora_version="7.0NG.755-210620" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8944c9ba6d..9b7460e7ec 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 = 'PC210619'; +$build_version = 'PC210620'; $pandora_version = 'v7.0NG.755'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index de054561a1..876c79ea89 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 599b012ed1..7d4e4dae74 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.755 -%define release 210619 +%define release 210620 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 22b78030f7..ad4006ae4b 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.755 -%define release 210619 +%define release 210620 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 26be6e56b4..069ef7b7f5 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.755" -PI_BUILD="210619" +PI_BUILD="210620" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 851de53332..9d71b7c723 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.755 Build 210619"; +my $version = "7.0NG.755 Build 210620"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 99a9f940fb..a230176eed 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.755 Build 210619"; +my $version = "7.0NG.755 Build 210620"; # save program name for logging my $progname = basename($0); From 447d46351854b8766a350b71127975f2f42a3e34 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 21 Jun 2021 01:00:36 +0200 Subject: [PATCH 23/30] 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 ce931e19db..fd9a4b3081 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.755-210620 +Version: 7.0NG.755-210621 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 6b6e85c6ec..955cdea764 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.755-210620" +pandora_version="7.0NG.755-210621" 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 43c3cbd926..10e754c2a6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.755'; -use constant AGENT_BUILD => '210620'; +use constant AGENT_BUILD => '210621'; # 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 bed539ee98..3a22b0fec6 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.755 -%define release 210620 +%define release 210621 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 9eec4f18ca..4b35373120 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.755 -%define release 210620 +%define release 210621 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 01ee9a1b37..bf9d1f259b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.755" -PI_BUILD="210620" +PI_BUILD="210621" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 07f98b6d14..3a426ab723 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210620} +{210621} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b5ec0a3c68..0543906fba 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.755 Build 210620") +#define PANDORA_VERSION ("7.0NG.755 Build 210621") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3308198995..2cd6706c03 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.755(Build 210620))" + VALUE "ProductVersion", "(7.0NG.755(Build 210621))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9f611e7018..107017cec5 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.755-210620 +Version: 7.0NG.755-210621 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 de34a2f1f0..fac68dcb19 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.755-210620" +pandora_version="7.0NG.755-210621" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9b7460e7ec..6eef0c344d 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 = 'PC210620'; +$build_version = 'PC210621'; $pandora_version = 'v7.0NG.755'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 876c79ea89..2af7534dd1 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 7d4e4dae74..0ff9f342e1 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.755 -%define release 210620 +%define release 210621 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index ad4006ae4b..362b042917 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.755 -%define release 210620 +%define release 210621 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 069ef7b7f5..06453ddfe2 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.755" -PI_BUILD="210620" +PI_BUILD="210621" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 9d71b7c723..f17dc0988c 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.755 Build 210620"; +my $version = "7.0NG.755 Build 210621"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a230176eed..fa9077087e 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.755 Build 210620"; +my $version = "7.0NG.755 Build 210621"; # save program name for logging my $progname = basename($0); From 827524e6d24e6f4f1a130c36f5059296342b5403 Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Mon, 21 Jun 2021 06:12:55 +0000 Subject: [PATCH 24/30] Update delete_files.txt --- pandora_console/extras/delete_files/delete_files.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt index d4c3b0adb8..2ff6363b64 100644 --- a/pandora_console/extras/delete_files/delete_files.txt +++ b/pandora_console/extras/delete_files/delete_files.txt @@ -90,8 +90,8 @@ godmode/update_manager/update_manager.online.php include/javascript/update_manager.js enterprise/include/functions_update_manager.php include/ajax/rolling_release.ajax.php -pandora_console/include/help/en/help_event_alert.php -pandora_console/include/help/es/help_event_alert.php -pandora_console/enterprise/godmode/alerts/alert_events.php -pandora_console/enterprise/godmode/alerts/alert_events_list.php -pandora_console/enterprise/godmode/alerts/alert_events_rules.php \ No newline at end of file +include/help/en/help_event_alert.php +include/help/es/help_event_alert.php +enterprise/godmode/alerts/alert_events.php +enterprise/godmode/alerts/alert_events_list.php +enterprise/godmode/alerts/alert_events_rules.php From 10059822cd7920081d33a9a126a3c495b8cd9270 Mon Sep 17 00:00:00 2001 From: Luis Date: Mon, 21 Jun 2021 10:17:12 +0000 Subject: [PATCH 25/30] Ent 7488 pantallazo blanco config.php installer activo --- pandora_console/include/config_process.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index eb8c92e364..21f32b4187 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -93,6 +93,8 @@ if (!isset($config['dbport'])) { require_once $ownDir.'constants.php'; require_once $ownDir.'functions_db.php'; require_once $ownDir.'functions.php'; +require_once $ownDir.'functions_io.php'; + // We need a timezone BEFORE calling config_process_config. // If not we will get ugly warnings. Set Europe/Madrid by default From ebceaebb58cf4a7404751dddfcbd66a3c5be799e Mon Sep 17 00:00:00 2001 From: Luis Date: Mon, 21 Jun 2021 13:41:14 +0000 Subject: [PATCH 26/30] Ent 7253 opcion formato envio informes templates --- .../unix/Darwin/dmg/resources/text/conclusion.html | 2 +- .../unix/Darwin/dmg/resources/text/license.html | 2 +- pandora_console/extras/mr/48.sql | 12 ++++++++++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 8 ++++++++ .../include/ajax/planned_downtime.ajax.php | 5 ++++- pandora_console/include/functions_cron.php | 5 +++-- 6 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 pandora_console/extras/mr/48.sql diff --git a/pandora_agents/unix/Darwin/dmg/resources/text/conclusion.html b/pandora_agents/unix/Darwin/dmg/resources/text/conclusion.html index 8122d2d23d..2b333eafc8 100644 --- a/pandora_agents/unix/Darwin/dmg/resources/text/conclusion.html +++ b/pandora_agents/unix/Darwin/dmg/resources/text/conclusion.html @@ -6,4 +6,4 @@ You can manage the service with: sudo launchctl start com.pandorafms.pandorafms to start it, and sudo launchctl stop com.pandorafms.pandorafms -to stop it. \ No newline at end of file +to stop it. diff --git a/pandora_agents/unix/Darwin/dmg/resources/text/license.html b/pandora_agents/unix/Darwin/dmg/resources/text/license.html index e8ffe8166d..6fd06ecf29 100644 --- a/pandora_agents/unix/Darwin/dmg/resources/text/license.html +++ b/pandora_agents/unix/Darwin/dmg/resources/text/license.html @@ -90,4 +90,4 @@ NO WARRANTY 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -END OF TERMS AND CONDITIONS \ No newline at end of file +END OF TERMS AND CONDITIONS diff --git a/pandora_console/extras/mr/48.sql b/pandora_console/extras/mr/48.sql new file mode 100644 index 0000000000..7319c0ca19 --- /dev/null +++ b/pandora_console/extras/mr/48.sql @@ -0,0 +1,12 @@ +START TRANSACTION; + +UPDATE pandora.tuser_task +SET parameters='a:7:{i:0;a:7:{s:11:"description";s:30:"Template pending to be created";s:5:"table";s:16:"treport_template";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:8:"required";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:7:{s:11:"description";s:6:"Agents";s:5:"table";s:7:"tagente";s:8:"field_id";s:9:"id_agente";s:10:"field_name";s:6:"nombre";s:8:"multiple";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_grupo";}i:2;a:2:{s:11:"description";s:16:"Report per agent";s:10:"select_two";b:1;}i:3;a:2:{s:11:"description";s:11:"Report name";s:4:"type";s:6:"string";}i:4;a:2:{s:11:"description";s:47:"Send to e-mail addresses (separated by a comma)";s:4:"type";s:4:"text";}i:5;a:2:{s:11:"description";s:7:"Subject";s:8:"optional";i:1;}i:6;a:3:{s:11:"description";s:7:"Message";s:4:"type";s:4:"text";s:8:"optional";i:1;}}i:7;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}' +WHERE id=2; + +UPDATE `tuser_task_scheduled` SET + `args` = REPLACE (`args`, 'a:8', 'a:9'), + `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:7;s:3:"PDF";s:15:"first_execution"') + WHERE `id_user_task` = 2; + +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 21657b5ebb..64d13d5370 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 @@ -2562,6 +2562,8 @@ ALTER TABLE `tnetflow_filter` MODIFY COLUMN `router_ip` text NOT NULL; UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report"; INSERT IGNORE INTO tuser_task VALUES (8, 'cron_task_generate_csv_log', 'a:1:{i:0;a:2:{s:11:"description";s:14:"Send to e-mail";s:4:"type";s:4:"text";}}', 'Send csv log'); UPDATE `tuser_task` SET `parameters`='a:4:{i:0;a:6:{s:11:"description";s:28:"Report pending to be created";s:5:"table";s:7:"treport";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:2:{s:11:"description";s:426:"Save to disk in pathThe Apache user should have read-write access on this folder. E.g. /var/www/html/pandora_console/attachment";s:4:"type";s:6:"string";}i:2;a:2:{s:11:"description";s:16:"File nane prefix";s:4:"type";s:6:"string";}i:3;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}' WHERE `id`=3; +UPDATE pandora.tuser_task +SET parameters='a:7:{i:0;a:7:{s:11:"description";s:30:"Template pending to be created";s:5:"table";s:16:"treport_template";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:8:"required";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:7:{s:11:"description";s:6:"Agents";s:5:"table";s:7:"tagente";s:8:"field_id";s:9:"id_agente";s:10:"field_name";s:6:"nombre";s:8:"multiple";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_grupo";}i:2;a:2:{s:11:"description";s:16:"Report per agent";s:10:"select_two";b:1;}i:3;a:2:{s:11:"description";s:11:"Report name";s:4:"type";s:6:"string";}i:4;a:2:{s:11:"description";s:47:"Send to e-mail addresses (separated by a comma)";s:4:"type";s:4:"text";}i:5;a:2:{s:11:"description";s:7:"Subject";s:8:"optional";i:1;}i:6;a:3:{s:11:"description";s:7:"Message";s:4:"type";s:4:"text";s:8:"optional";i:1;}}i:7;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}' WHERE id=2; DELETE FROM `tuser_task` WHERE id = 6; -- Migrate old tasks @@ -2576,6 +2578,12 @@ UPDATE `tuser_task_scheduled` SET `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:3;s:3:"XML";s:15:"first_execution"') WHERE `id_user_task` = 6; + UPDATE `tuser_task_scheduled` SET + `args` = REPLACE (`args`, 'a:8', 'a:9'), + `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:7;s:3:"PDF";s:15:"first_execution"') + WHERE `id_user_task` = 2; + + -- ---------------------------------------------------------------------- -- ADD message in table 'tnews' -- ---------------------------------------------------------------------- diff --git a/pandora_console/include/ajax/planned_downtime.ajax.php b/pandora_console/include/ajax/planned_downtime.ajax.php index f1496dd64a..277ba77411 100644 --- a/pandora_console/include/ajax/planned_downtime.ajax.php +++ b/pandora_console/include/ajax/planned_downtime.ajax.php @@ -65,7 +65,10 @@ if ($get_modules_downtime) { $downtime_module_ids = extract_column($downtime_modules, 'id_agent_module'); $downtime_modules = array_fill_keys($downtime_module_ids, true); - $filter = ['id_agente' => $id_agent, 'delete_pending' => 0]; + $filter = [ + 'id_agente' => $id_agent, + 'delete_pending' => 0, + ]; $modules = db_get_all_rows_filter('tagente_modulo', $filter); if (empty($modules)) { $modules = []; diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index 4469bb50f8..ae434e286c 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -552,8 +552,6 @@ function cron_list_table() continue; } - hd($args, true); - hd('cron', true); if (empty($args[1]) === false && (string) $args[1] !== '0') { $agents_id = $args[1]; } else { @@ -568,6 +566,7 @@ function cron_list_table() } } + $report_type = $args[7]; $report_per_agent = $args[3]; $report_name = $args[4]; $email = $args[5]; @@ -578,6 +577,8 @@ function cron_list_table() $data[2] .= '
- '.__('Report per agent').': '.$report_per_agent.''; $data[2] .= '
- '.__('Report name').': '.$report_name.''; $data[2] .= '
- '.__('Email').": ".$email.''; + $data[2] .= '
- '.__('Report type').': '.$report_type; + break; case 'cron_task_execute_custom_script': From 878a5321e8e5773fef815dba2dee317c46973420 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 21 Jun 2021 14:01:32 +0000 Subject: [PATCH 27/30] Ent 7547 tree view no filtra bien dashboard --- pandora_console/include/class/Tree.class.php | 1 + .../lib/Dashboard/Widgets/tree_view.php | 44 ++++++++++--------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 6050bffa2e..8ff384a8fc 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -1126,6 +1126,7 @@ class Tree $agent_search_filter $agent_status_filter $module_search_filter + $module_status_filter $tag_condition GROUP BY tam.id_agente_modulo ORDER BY tam.nombre ASC, tam.id_agente_modulo ASC"; diff --git a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php index edb843bda0..cbeba60d3f 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php +++ b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php @@ -418,28 +418,30 @@ class TreeViewWidget extends Widget AGENT_MODULE_STATUS_NOT_INIT => __('Not init'), ]; - $inputs[] = [ - 'label' => __('Modules status'), - 'arguments' => [ - 'type' => 'select', - 'fields' => $fields, - 'name' => 'moduleStatus', - 'selected' => $values['moduleStatus'], - 'return' => true, - ], - ]; + if (is_metaconsole() === false) { + $inputs[] = [ + 'label' => __('Modules status'), + 'arguments' => [ + 'type' => 'select', + 'fields' => $fields, + 'name' => 'moduleStatus', + 'selected' => $values['moduleStatus'], + 'return' => true, + ], + ]; - // Filter modules. - $inputs[] = [ - 'label' => __('Filter modules'), - 'arguments' => [ - 'name' => 'filterModule', - 'type' => 'text', - 'value' => $values['filterModule'], - 'return' => true, - 'size' => 0, - ], - ]; + // Filter modules. + $inputs[] = [ + 'label' => __('Filter modules'), + 'arguments' => [ + 'name' => 'filterModule', + 'type' => 'text', + 'value' => $values['filterModule'], + 'return' => true, + 'size' => 0, + ], + ]; + } return $inputs; } From 104dfdd92eda5caaf369352e60edfb3d65430cc5 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 21 Jun 2021 14:04:11 +0000 Subject: [PATCH 28/30] Ent 7142 consola visual me oculta los botones --- pandora_console/include/functions_graph.php | 11 ++++++++--- .../models/VisualConsole/Items/DonutGraph.php | 8 ++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 923138e88e..a5463283db 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1412,6 +1412,14 @@ function graphic_combined_module( $labels = []; $modules = []; foreach ($sources as $source) { + $id_agent = agents_get_module_id( + $source['id_agent_module'] + ); + + if (!$id_agent) { + continue; + } + if (is_metaconsole() === true) { metaconsole_restore_db(); $server = metaconsole_get_connection_by_id($source['id_server']); @@ -1428,9 +1436,6 @@ function graphic_combined_module( array_push($modules, $modulepush); array_push($weights, $source['weight']); if ($source['label'] != '' || $params_combined['labels']) { - $id_agent = agents_get_module_id( - $source['id_agent_module'] - ); $agent_description = agents_get_description($id_agent); $agent_group = agents_get_agent_group($id_agent); $agent_address = agents_get_address($id_agent); diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/DonutGraph.php b/pandora_console/include/rest-api/models/VisualConsole/Items/DonutGraph.php index f73806967e..6774dd7fbd 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/DonutGraph.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/DonutGraph.php @@ -157,6 +157,14 @@ final class DonutGraph extends Item if ($isString === true) { $graphData = \get_donut_module_data($moduleId); + if (empty($graphData) || $graphData === null) { + $aux = []; + $aux[0]['tag_name'] = 'No data to show'; + $aux[0]['color'] = '#aa3333'; + $aux[0]['value'] = 1; + $aux[0]['percent'] = 100; + $graphData = $aux; + } $data['html'] = \d3_donut_graph( (int) $data['id'], From d6ecce1ce9abfc556a7a0fa89225b804a40d8174 Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Mon, 21 Jun 2021 14:06:29 +0000 Subject: [PATCH 29/30] fixed visual error --- pandora_console/godmode/setup/setup_general.php | 4 ++-- pandora_console/include/styles/pandora.css | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index 25165996c7..972075f61c 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -644,14 +644,14 @@ echo ''.__('Mail configuration').''; $table_mail_test->class = 'databox filters'; $table_mail_test->data = []; $table_mail_test->style[0] = 'font-weight: bold;'; - $table_mail_test->style[1] = 'font-weight: bold;display: flex;height: 54px;align-items: center;'; + $table_mail_test->style[1] = 'font-weight: bold;display: flex;height: 54px;align-items: center;padding-left: 15px;'; $table_mail_test->data[0][0] = __('Address'); $table_mail_test->data[0][1] = html_print_input_text( 'email_test_address', '', '', - 40, + 35, 100, true ); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 32d559abce..3b37291fe4 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -2563,7 +2563,6 @@ select { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; - font-size: 10pt; font-family: inherit; } From 51844da01b74df6492b063285c6de69ea9565f1e Mon Sep 17 00:00:00 2001 From: Luis Date: Mon, 21 Jun 2021 14:07:03 +0000 Subject: [PATCH 30/30] Ent 6990 copiar informes --- .../godmode/reporting/reporting_builder.php | 99 +++++++++++++++- pandora_console/include/functions_reports.php | 110 +++++++++++++++++- 2 files changed, 203 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index c52639d99f..d06549518b 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -160,7 +160,7 @@ $pure = get_parameter('pure', 0); $schedule_report = get_parameter('schbutton', ''); $pagination = (int) get_parameter('pagination', $config['block_size']); -if ($action == 'edit' && $idReport > 0) { +if ($action === 'edit' && $idReport > 0) { $report_group = db_get_value( 'id_group', 'treport', @@ -512,6 +512,7 @@ switch ($action) { } break; + case 'copy_report': case 'delete_report': case 'list': $buttons = [ @@ -657,6 +658,81 @@ switch ($action) { ); } + if ($action === 'copy_report') { + $copy = false; + switch ($type_access_selected) { + case 'group_view': + if ($config['id_user'] == $report['id_user'] + || is_user_admin($config['id_user']) + ) { + $copy = true; + // Owner can delete. + } else { + $copy = check_acl( + $config['id_user'], + $report['id_group'], + 'RM' + ); + } + break; + + case 'group_edit': + if ($config['id_user'] == $report['id_user'] + || is_user_admin($config['id_user']) + ) { + $copy = true; + // Owner can delete. + } else { + $copy = check_acl( + $config['id_user'], + $report['id_group'], + 'RM' + ); + } + break; + + case 'user_edit': + if ($config['id_user'] == $report['id_user'] + || is_user_admin($config['id_user']) + ) { + $copy = true; + } + break; + + default: + // Default. + break; + } + + if (! $copy && !empty($type_access_selected)) { + db_pandora_audit( + 'ACL Violation', + 'Trying to access report builder copy' + ); + include 'general/noaccess.php'; + exit; + } + + $result = reports_copy_report($idReport); + if ($result !== false) { + db_pandora_audit( + 'Report management', + 'Copy report #'.$idReport + ); + } else { + db_pandora_audit( + 'Report management', + 'Fail try to copy report #'.$idReport + ); + } + + ui_print_result_message( + $result, + __('Successfully copied'), + __('Could not be copied') + ); + } + $id_group = (int) get_parameter('id_group', 0); $search = trim(get_parameter('search', '')); @@ -1092,6 +1168,27 @@ switch ($action) { $data[$next] .= ''; } + $data[$next] .= '
'; + $data[$next] .= html_print_input_hidden( + 'id_report', + $report['id_report'], + true + ); + $data[$next] .= html_print_input_hidden( + 'action', + 'copy_report', + true + ); + $data[$next] .= html_print_input_image( + 'dup', + 'images/copy.png', + 1, + '', + true, + ['title' => __('Duplicate')] + ); + $data[$next] .= '
'; + if ($delete) { $data[$next] .= '
'; $data[$next] .= html_print_input_image( diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php index fbf647d392..58ef05edc4 100755 --- a/pandora_console/include/functions_reports.php +++ b/pandora_console/include/functions_reports.php @@ -275,13 +275,12 @@ function reports_get_content($id_report_content, $filter=false, $fields=false) /** - * Get all the contents of a report. + * Creates the contents of a report. * * @param int Report id to get contents. - * @param array Extra filters for the contents. - * @param array Fields to be fetched. All fields by default + * @param array values to be created. * - * @return array All the contents of a report. + * @return boolean true id succed, false otherwise. */ function reports_create_content($id_report, $values) { @@ -305,7 +304,11 @@ function reports_create_content($id_report, $values) switch ($config['dbtype']) { case 'mysql': - unset($values['`order`']); + if (isset($values['`order`'])) { + unset($values['`order`']); + } else { + unset($values['order']); + } $order = (int) db_get_value('MAX(`order`)', 'treport_content', 'id_report', $id_report); $values['`order`'] = ($order + 1); @@ -900,3 +903,100 @@ function reports_get_report_types($template=false, $not_editor=false) return $types; } + + +function reports_copy_report($id_report) +{ + $report = reports_get_report($id_report); + + // Unset original report id_report. + unset($report['id_report']); + + $original_name = $report['name']; + $original_group = $report['id_group']; + + $copy_name = io_safe_input(sprintf(__('copy of %s'), io_safe_output($original_name))); + + $copy_report = reports_create_report($copy_name, $original_group, $report); + + if ($copy_report !== false) { + $original_contents = reports_get_contents($id_report); + if (empty($original_contents) === false) { + foreach ($original_contents as $original_content) { + $original_content['id_report'] = $copy_report; + $original_id_rc = $original_content['id_rc']; + unset($original_content['id_rc']); + $result_content = db_process_sql_insert('treport_content', $original_content); + + if ($result_content === false) { + $result = false; + break; + } + + switch (io_safe_output($original_content['type'])) { + case 'SLA': + case 'SLA_monthly': + case 'SLA_weekly': + case 'SLA_hourly': + case 'availability_graph': + + $slas = db_get_all_rows_field_filter('treport_content_sla_combined', 'id_report_content', $original_id_rc); + if ($slas === false) { + $slas = []; + } + + foreach ($slas as $sla) { + unset($sla['id']); + + // Set id report to copy id. + $sla['id_report_content'] = $result_content; + $sla_copy = db_process_sql_insert('treport_content_sla_combined', $sla); + + if ($sla_copy === false) { + reports_delete_content($result_content); + $result = false; + break; + } + } + break; + + case 'general': + case 'top_n': + case 'availability': + case 'exception': + + $items = db_get_all_rows_field_filter('treport_content_item', 'id_report_content', $original_id_rc); + if ($items === false) { + $items = []; + } + + foreach ($items as $item) { + unset($item['id']); + + // Set id report to copy id. + $item['id_report_content'] = $result_content; + $item_copy = db_process_sql_insert('treport_content_item', $item); + + if ($item_copy === false) { + reports_delete_content($result_content); + $result = false; + break; + } + } + break; + + default: + // Empty default. + break; + } + } + } + } + + if ($result === false) { + reports_delete_report($copy_report); + return false; + } + + return true; +}