From 5dc9843e89f99eefccb128656925263456533ad6 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Tue, 19 Nov 2019 16:53:12 +0100 Subject: [PATCH 1/3] Fixed bug with shape in fictional nodes in network maps --- pandora_console/include/class/NetworkMap.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index 505d057665..53333cdd81 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -1655,7 +1655,6 @@ class NetworkMap $node['style']['label'] = $node['name']; } - $node['style']['shape'] = 'circle'; if (isset($source_data['color'])) { $item['color'] = $source_data['color']; } else { @@ -2957,7 +2956,7 @@ class NetworkMap '', 0, true - ).' '; + ).' '; $table->data['node_name'][0] = __('Name'); $table->data['node_name'][1] = html_print_input_text( 'edit_name_node', From 2c019f04ee2af72a61bfa3ea40d72752f45c4368 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 8 Jan 2020 11:37:44 +0100 Subject: [PATCH 2/3] Fixed bug in auto combined graph --- pandora_console/include/functions_graph.php | 17 ++++++++-- .../include/functions_reporting.php | 31 +++++++++++++------ 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index e98fd2a319..42f848b649 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1446,9 +1446,20 @@ function graphic_combined_module( $data_module_graph['agent_name'] = modules_get_agentmodule_agent_name( $agent_module_id ); - $data_module_graph['agent_alias'] = modules_get_agentmodule_agent_alias( - $agent_module_id - ); + + if (is_metaconsole()) { + $data_module_graph['agent_alias'] = db_get_value( + 'alias', + 'tagente', + 'id_agente', + (int) $module_data['id_agente'] + ); + } else { + $data_module_graph['agent_alias'] = modules_get_agentmodule_agent_alias( + $agent_module_id + ); + } + $data_module_graph['agent_id'] = $module_data['id_agente']; $data_module_graph['module_name'] = $module_data['nombre']; $data_module_graph['id_module_type'] = $module_data['id_tipo_modulo']; diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index d774e51e81..7bffd6087d 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -325,6 +325,17 @@ function reporting_make_reporting_data( $content['id_agent'] ); + // This is for metaconsole. It is an array with modules and server (id node). + if (is_array($content['id_agent_module'])) { + $modules_server_array = $content['id_agent_module']; + $modules_array = []; + foreach ($modules_server_array as $value) { + $modules_array[] = $value['module']; + } + + $content['id_agent_module'] = $modules_array; + } + $modules = agents_get_modules( $agent_value, [ @@ -7599,16 +7610,18 @@ function reporting_custom_graph( $content['name'] = __('Simple graph'); } - $module_source = db_get_all_rows_sql( - 'SELECT id_agent_module - FROM tgraph_source - WHERE id_graph = '.$content['id_gs'] - ); + if ($type_report != 'automatic_graph') { + $module_source = db_get_all_rows_sql( + 'SELECT id_agent_module + FROM tgraph_source + WHERE id_graph = '.$content['id_gs'] + ); - if (isset($module_source) && is_array($module_source)) { - $modules = []; - foreach ($module_source as $key => $value) { - $modules[$key] = $value['id_agent_module']; + if (isset($module_source) && is_array($module_source)) { + $modules = []; + foreach ($module_source as $key => $value) { + $modules[$key] = $value['id_agent_module']; + } } } From d8b97885a977055918241f8d779895054fbb2d5e Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 9 Jan 2020 00:01:13 +0100 Subject: [PATCH 3/3] 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 37b2c8e329..d205bf753f 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-200108 +Version: 7.0NG.742-200109 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 a1b4728047..accd15794d 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-200108" +pandora_version="7.0NG.742-200109" 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 03d80acda7..1bd8a562b7 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 => '200108'; +use constant AGENT_BUILD => '200109'; # 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 23c28162e5..261bb655ea 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 200108 +%define release 200109 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 f6e70b2de6..356572f6f6 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 200108 +%define release 200109 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 9a5c66a6f2..1a18f90d4c 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="200108" +PI_BUILD="200109" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c94e8d4333..3f99bcf457 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200108} +{200109} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 40bdd444e5..2c6214ad10 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 200108)") +#define PANDORA_VERSION ("7.0NG.742(Build 200109)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f590c417b6..356c8d7455 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 200108))" + VALUE "ProductVersion", "(7.0NG.742(Build 200109))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 789c1d5744..830e1824c4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.742-200108 +Version: 7.0NG.742-200109 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 be3de30f74..63bd6b56df 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-200108" +pandora_version="7.0NG.742-200109" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4bd2a87c5a..a6d4bae08d 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 = 'PC200108'; +$build_version = 'PC200109'; $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 5eb4ef7673..8086bab36b 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 ee51547909..f8f9025ba2 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 200108 +%define release 200109 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1fffacee26..790a0443d0 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 200108 +%define release 200109 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 7f79251bf4..bcaefc91c7 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.742" -PI_BUILD="200108" +PI_BUILD="200109" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 0078b849af..c45e570839 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 PS200108"; +my $version = "7.0NG.742 PS200109"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index b0b886215a..31aebde0ef 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 PS200108"; +my $version = "7.0NG.742 PS200109"; # save program name for logging my $progname = basename($0);