From 3d635449398886bf4392cdd6ead6422744211480 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Thu, 7 Dec 2023 14:14:12 +0100 Subject: [PATCH 01/25] get data in file count from module --- .../include/class/ConsoleSupervisor.php | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 83208256fb..e34740711e 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -27,6 +27,7 @@ */ use PandoraFMS\Tools\Files; +use PandoraFMS\Agent; global $config; @@ -1162,11 +1163,20 @@ class ConsoleSupervisor $this->cleanNotifications('NOTIF.WRITABLE.ATTACHMENT'); } - $filecount = $this->countFiles( - $config['attachment_store'], - '', - $config['num_files_attachment'] - ); + $agentId = db_get_value('id_agente', 'tagente', 'nombre', 'pandora.internals'); + if ($agentId !== false) { + $agent = new Agent($agentId); + + $moduleId = $agent->searchModules( + ['nombre' => 'Data_in_files'], + 1 + )->toArray()['id_agente_modulo']; + + if ($moduleId > 0) { + $filecount = (int) modules_get_last_value($moduleId); + } + } + if ($filecount > $config['num_files_attachment']) { $this->notify( [ From 2eae64407d4645cd8bc4eeb73a14005c4aac62fe Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Thu, 7 Dec 2023 14:17:42 +0100 Subject: [PATCH 02/25] get data in file count from module --- pandora_console/include/class/ConsoleSupervisor.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index e34740711e..a7676d4b40 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -1163,6 +1163,8 @@ class ConsoleSupervisor $this->cleanNotifications('NOTIF.WRITABLE.ATTACHMENT'); } + $filecount = 0; + $agentId = db_get_value('id_agente', 'tagente', 'nombre', 'pandora.internals'); if ($agentId !== false) { $agent = new Agent($agentId); From 678972bc587a9938cf7931b938ee7545125db77b Mon Sep 17 00:00:00 2001 From: "felix.suarez" Date: Tue, 9 Jan 2024 16:01:00 -0600 Subject: [PATCH 03/25] Add monitoring types --- pandora_agents/unix/pandora_agent | 59 ++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 65e217abf7..c56ccf33aa 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -3889,7 +3889,8 @@ sub module_logger ($) { my $status = grep_logs( $module->{'name'}, $module->{'params'}, - $module->{'filter'} + $module->{'filter'}, + $module->{'type'} ); return $status; @@ -3926,20 +3927,25 @@ my $encode_sub = defined(&MIME::Base64::encode_base64) ? \&MIME::Base64::encode_ }; sub grep_logs { - my ($str_name, $str_file, $str_regex) = @_; + my ($module_name, $log_file, $reg_exp, $module_type) = @_; - if(!$str_name){ + if(!$module_name){ log_message("module_logger", "Missing module name"); return; } - if(!$str_file){ + if(!$log_file){ log_message("module_logger", "Missing file name"); return; } - if(!$str_regex){ - $str_regex = '.*'; + if(!$module_type){ + log_message("module_logger", "Missing module type"); + return; + } + + if(!$reg_exp){ + $reg_exp = '.*'; } my $idx_dir = '/tmp/'; @@ -3947,9 +3953,6 @@ sub grep_logs { my $idx_pos = 0; my $idx_size = 0; my $idx_ino = ''; - my $module_name = $str_name; - my $log_file = $str_file; - my $reg_exp = $str_regex; # Check that log file exists if (! -e $log_file) { @@ -3975,7 +3978,7 @@ sub grep_logs { return if load_idx(\$idx_pos, \$idx_ino, \$idx_file, \$idx_size) == 1; my @data = parse_log(\$idx_pos, \$idx_ino, \$idx_file, \$log_file, \$module_name, \$reg_exp, \$idx_size); - my $output = create_log($module_name, @data); + my $output = create_log($module_name, $module_type, @data); return $output; } @@ -4090,19 +4093,26 @@ sub grep_logs { } sub create_log { - my ($module_name, @data) = @_; + my ($module_name, $module_type, @data) = @_; # No data - if ($#data < 0) { + if ($#data < 0 && $module_type ne "generic_proc") { return; } # Log module my $output = "\n"; - $output .= "\n"; - $output .= "base64\n"; - $output .= "\n"; + $output .= " \n"; + + my $data_content = process_log_monitoring($module_type, @data); + + if($module_type eq "log"){ + $output .= " base64\n"; + } + + $output .= " \n"; $output .= "\n"; @@ -4111,6 +4121,23 @@ sub grep_logs { } +sub process_log_monitoring { + my ($module_type, @data) = @_; + my $output = ""; + + if ($module_type eq "log"){ + $output = &$encode_sub(join('', @data), ''); + } elsif ($module_type eq "generic_data") { + $output = scalar @data; + } elsif ($module_type eq "generic_proc"){ + $output = scalar @data > 0 ? 1 : 0; + } elsif ($module_type eq "generic_data_string" || $module_type eq "async_string"){ + $output = join('', @data); + } + + return $output; +} + ################################################################################ # TERM Handler ################################################################################ From 1882c7a624642d429434b58db2932502e1023996 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 30 Jan 2024 17:58:41 +0100 Subject: [PATCH 04/25] #12833 fixed critical value in bulk operation --- pandora_console/godmode/massive/massive_edit_modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 9b11b86916..79cd0233da 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -768,7 +768,7 @@ $table_critical->tdid[0][0] = 'edit1-3-min'; $table_critical->data[0][0] = html_print_label_input_block( __('Min.'), html_print_input_text( - 'min_warning', + 'min_critical', '', '', false, @@ -781,7 +781,7 @@ $table_critical->tdid[0][1] = 'edit1-3-max'; $table_critical->data[0][1] = html_print_label_input_block( __('Max.'), html_print_input_text( - 'max_warning', + 'max_critical', '', '', false, From 656eed0536d9758a862ef5e3ac0658dfac3ad587 Mon Sep 17 00:00:00 2001 From: rafael Date: Wed, 31 Jan 2024 11:17:36 +0100 Subject: [PATCH 05/25] remove chkconfig from redhat9 agent --- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index b21d106a96..49f7def432 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -13,17 +13,17 @@ Name: %{name} Version: %{version} Release: %{release} License: GPL -Vendor: ArticaST +Vendor: PandoraFMS Source0: %{source_name}-%{version}.tar.gz -URL: http://pandorafms.org +URL: https://pandorafms.com Group: System/Monitoring -Packager: Sancho Lerena +Packager: PandoraFMS Prefix: /usr/share BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildArch: x86_64 Requires(pre): shadow-utils -Requires(post): chkconfig /bin/ln -Requires(preun): chkconfig /bin/rm /usr/sbin/userdel +Requires(post): /bin/ln +Requires(preun): /bin/rm /usr/sbin/userdel Requires: coreutils unzip Requires: util-linux procps grep Requires: /sbin/ip /bin/awk From 53fbd10ef89a03b08a975aa59948e8dcedb31449 Mon Sep 17 00:00:00 2001 From: rafael Date: Wed, 31 Jan 2024 13:33:53 +0100 Subject: [PATCH 06/25] test for systemd configuration --- .../unix/pandora_agent.redhat_bin.el9.spec | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 49f7def432..d72e66739f 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -29,7 +29,6 @@ Requires: util-linux procps grep Requires: /sbin/ip /bin/awk Requires: perl-interpreter Requires: perl-IO-Compress -Requires: libnsl Requires: libxcrypt-compat AutoReq: 0 Provides: %{name}-%{version} @@ -50,7 +49,7 @@ mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_agent/ mkdir -p $RPM_BUILD_ROOT/usr/bin/ mkdir -p $RPM_BUILD_ROOT/usr/sbin/ mkdir -p $RPM_BUILD_ROOT/etc/pandora/ -mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/ +#mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/ mkdir -p $RPM_BUILD_ROOT/var/log/pandora/ mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ @@ -58,7 +57,7 @@ cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/ -cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/init.d/pandora_agent_daemon +#cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/init.d/pandora_agent_daemon cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/ @@ -119,21 +118,11 @@ then cp -f /usr/share/pandora_agent/pandora_agent_daemon.service /usr/lib/systemd/system/ chmod -x /usr/lib/systemd/system/pandora_agent_daemon.service # Enable the services on SystemD + systemctl daemon reload systemctl enable pandora_agent_daemon.service -else - /sbin/chkconfig --add pandora_agent_daemon - /sbin/chkconfig pandora_agent_daemon on -fi - -if [ "$1" -gt 1 ] -then - - echo "If Pandora Agent daemon was running with init.d script," - echo "please stop it manually and start the service with systemctl" fi - %preun # Upgrading @@ -141,8 +130,7 @@ if [ "$1" = "1" ]; then exit 0 fi -/sbin/chkconfig --del pandora_agent_daemon -/etc/rc.d/init.d/pandora_agent_daemon stop >/dev/null 2>&1 || : +systemctl stop pandora_agent_daemon.service > /dev/null 2>&1 || : # Remove symbolic links pushd /etc/pandora @@ -162,7 +150,6 @@ exit 0 %defattr(755,root,root) /usr/bin/pandora_agent_exec /usr/bin/tentacle_client -/etc/rc.d/init.d/pandora_agent_daemon %defattr(644,root,root) /usr/share/man/man1/pandora_agent.1.gz From cdb02a32a246243392c741b7181976fed3372b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Wed, 31 Jan 2024 11:56:52 -0600 Subject: [PATCH 07/25] Changes on XML creation. --- pandora_agents/unix/pandora_agent | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index c56ccf33aa..eb1cefb1ec 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -3678,11 +3678,6 @@ sub write_module_xml ($@) { return; } - if ($module->{'func'} == \&module_logger) { - $Xml .= $data[0]; - return - } - # Critical section $Sem->down () if (defined ($Sem)); @@ -3690,7 +3685,9 @@ sub write_module_xml ($@) { " {'name'} . "]]>\n" . " {'description'} . "]]>\n" . " " . $module->{'type'} . "\n"; - + + $Xml .= " base64\n" if($module->{'type'} eq "log"); + # Interval $Xml .= " " . $module->{'interval'} . "\n"; @@ -4095,28 +4092,9 @@ sub grep_logs { sub create_log { my ($module_name, $module_type, @data) = @_; - # No data - if ($#data < 0 && $module_type ne "generic_proc") { - return; - } - - # Log module - my $output = "\n"; - $output .= " \n"; - $output .= " \n"; - my $data_content = process_log_monitoring($module_type, @data); - if($module_type eq "log"){ - $output .= " base64\n"; - } - - $output .= " \n"; - $output .= "\n"; - - return $output; + return $data_content; } } From 9b57534f2a497dc0d93fe9891742e2895ad5fabc Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 1 Feb 2024 11:41:19 +0100 Subject: [PATCH 08/25] #12751 fixed vul --- pandora_console/godmode/servers/plugin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 39acc45c21..d8bc3b47b9 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -262,7 +262,9 @@ if ($filemanager) { $contentFile = str_replace("\n", "\r\n", $contentFile); } - $result = file_put_contents($location_file, $contentFile); + if (empty($location_file) === false && file_exists($location_file) === true) { + $result = file_put_contents($location_file, $contentFile); + } } $id_plugin = (int) get_parameter('id_plugin', 0); From ba38f2e8276e0661827a38b65dd0bad9dc40b7fd Mon Sep 17 00:00:00 2001 From: rafael Date: Thu, 1 Feb 2024 15:39:39 +0100 Subject: [PATCH 09/25] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c8ee8180a7..fc321bd3b3 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.775-240126 +Version: 7.0NG.775-240201 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 fa783cc923..fd5399eea0 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.775-240126" +pandora_version="7.0NG.775-240201" 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 129151ca0f..dbcc96f4f3 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.775'; -use constant AGENT_BUILD => '240126'; +use constant AGENT_BUILD => '240201'; # 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 5c05e6110e..99c353d2d7 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240126 +%define release 240201 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 78383784e9..c87b2c7fe9 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240126 +%define release 240201 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index d72e66739f..ee82aaa6a8 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240126 +%define release 240201 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 7a15966693..b637ed1855 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240126 +%define release 240201 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 337a0ec5f3..1048b23a4b 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240126 +%define release 240201 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 2f6e9c4d3d..bf3857d3aa 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.775" -PI_BUILD="240126" +PI_BUILD="240201" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 95fa0dd4a3..e2443b3983 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240126} +{240201} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f3961807fe..8da6ebb9d9 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.775 Build 240126") +#define PANDORA_VERSION ("7.0NG.775 Build 240201") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 1bb160a879..e74c57cbf7 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.775(Build 240126))" + VALUE "ProductVersion", "(7.0NG.775(Build 240201))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 466722a50b..20355292e2 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.775-240126 +Version: 7.0NG.775-240201 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 a47efa89c2..b1985ea805 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.775-240126" +pandora_version="7.0NG.775-240201" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a721e82c12..779b6e2b35 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 = 'PC240126'; +$build_version = 'PC240201'; $pandora_version = 'v7.0NG.775'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index c6329db34e..cae9aa0457 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e7e972a801..f42c7cb639 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.775 -%define release 240126 +%define release 240201 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f443bc4b03..e6a627d54b 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.775 -%define release 240126 +%define release 240201 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index bc5676b742..cb0fd3c455 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.775" -PI_BUILD="240126" +PI_BUILD="240201" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f079a42194..59ccfeeaae 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.775 Build 240126"; +my $version = "7.0NG.775 Build 240201"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index e7921bff4a..583fee59af 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.775 Build 240126"; +my $version = "7.0NG.775 Build 240201"; # save program name for logging my $progname = basename($0); From ebff3ff753410488dfce436c1e1beb71539ff740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Thu, 1 Feb 2024 08:52:50 -0600 Subject: [PATCH 10/25] Keep old log Monitoring XML generation --- pandora_agents/unix/pandora_agent | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index eb1cefb1ec..9b758246bb 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -3678,6 +3678,26 @@ sub write_module_xml ($@) { return; } + # Is it an extraction log module? + if($module->{'type'} eq "log"){ + $Xml .="\n"; + $Xml .= " {'name'} . "]]>\n"; + $Xml .= " {'type'} . "]]>\n"; + $Xml .= " base64\n"; + + # Data list + if ($#data > 0) { + $Xml .= " \n"; + # Single data + } else { + chomp ($data[0]); + $Xml .= " \n"; + } + + $Xml .= "\n"; + return; + } + # Critical section $Sem->down () if (defined ($Sem)); @@ -3685,9 +3705,7 @@ sub write_module_xml ($@) { " {'name'} . "]]>\n" . " {'description'} . "]]>\n" . " " . $module->{'type'} . "\n"; - - $Xml .= " base64\n" if($module->{'type'} eq "log"); - + # Interval $Xml .= " " . $module->{'interval'} . "\n"; From 44e546af395430be71a0078e48945127d3244b83 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Thu, 1 Feb 2024 17:34:42 +0100 Subject: [PATCH 11/25] minor fix --- .../include/class/ConsoleSupervisor.php | 41 ++++++++----------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index a7676d4b40..c01be47c4f 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -1145,7 +1145,7 @@ class ConsoleSupervisor public function checkAttachment() { global $config; - +hd("dadsada", true); if (is_writable($config['attachment_store']) !== true) { $this->notify( [ @@ -1163,22 +1163,6 @@ class ConsoleSupervisor $this->cleanNotifications('NOTIF.WRITABLE.ATTACHMENT'); } - $filecount = 0; - - $agentId = db_get_value('id_agente', 'tagente', 'nombre', 'pandora.internals'); - if ($agentId !== false) { - $agent = new Agent($agentId); - - $moduleId = $agent->searchModules( - ['nombre' => 'Data_in_files'], - 1 - )->toArray()['id_agente_modulo']; - - if ($moduleId > 0) { - $filecount = (int) modules_get_last_value($moduleId); - } - } - if ($filecount > $config['num_files_attachment']) { $this->notify( [ @@ -1292,17 +1276,28 @@ class ConsoleSupervisor $MAX_FILES_DATA_IN = 1000; $MAX_BADXML_FILES_DATA_IN = 150; - $filecount = $this->countFiles( - $remote_config_dir, - '', - $MAX_FILES_DATA_IN - ); + $filecount = 0; + + $agentId = db_get_value('id_agente', 'tagente', 'nombre', 'pandora.internals'); + if ($agentId !== false) { + $agent = new Agent($agentId); + + $moduleId = $agent->searchModules( + ['nombre' => 'Data_in_files'], + 1 + )->toArray()['id_agente_modulo']; + + if ($moduleId > 0) { + $filecount = (int) modules_get_last_value($moduleId); + } + } +hd($filecount, true); // If cannot open directory, count is '-1', skip. if ($filecount > $MAX_FILES_DATA_IN) { $this->notify( [ 'type' => 'NOTIF.FILES.DATAIN', - 'title' => __('There are too much files in spool').'.', + 'title' => __('There are too many files in spool').'.', 'message' => __( 'There are more than %d files in %s. Consider checking DataServer performance', $MAX_FILES_DATA_IN, From 05af441f19dd440bd440f12893e60f8898e4b03a Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Thu, 1 Feb 2024 17:36:21 +0100 Subject: [PATCH 12/25] minor fix --- pandora_console/include/class/ConsoleSupervisor.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index c01be47c4f..af41d60a67 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -1145,7 +1145,7 @@ class ConsoleSupervisor public function checkAttachment() { global $config; -hd("dadsada", true); + if (is_writable($config['attachment_store']) !== true) { $this->notify( [ @@ -1163,6 +1163,12 @@ hd("dadsada", true); $this->cleanNotifications('NOTIF.WRITABLE.ATTACHMENT'); } + $filecount = $this->countFiles( + $config['attachment_store'], + '', + $config['num_files_attachment'] + ); + if ($filecount > $config['num_files_attachment']) { $this->notify( [ @@ -1291,7 +1297,7 @@ hd("dadsada", true); $filecount = (int) modules_get_last_value($moduleId); } } -hd($filecount, true); + // If cannot open directory, count is '-1', skip. if ($filecount > $MAX_FILES_DATA_IN) { $this->notify( From da1c74e9dbfa6da94aa144777a19af8ba3c90e70 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Fri, 2 Feb 2024 14:04:37 +0100 Subject: [PATCH 13/25] #12751 fixed path with spaces and vul --- pandora_console/godmode/servers/plugin.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index d8bc3b47b9..991ed52855 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -215,7 +215,7 @@ if ($create != '') { // ===================================================================== if ($filemanager) { if ($edit_file) { - $location_file = get_parameter('location_file', ''); + $location_file = io_safe_output(get_parameter('location_file', '')); $filename = array_pop(explode('/', $location_file)); $file = file_get_contents($location_file); echo '

'.__('Edit file').' '.$filename.'

'; @@ -250,7 +250,7 @@ if ($filemanager) { echo ''; } else { if ($update_file) { - $location_file = get_parameter('location_file', ''); + $location_file = io_safe_output(get_parameter('location_file', '')); $contentFile = io_safe_output(get_parameter('content_file', '')); $compatibility = get_parameter('compatibility', 'unix'); $is_win_compatible = strpos($contentFile, "\r\n"); @@ -262,7 +262,10 @@ if ($filemanager) { $contentFile = str_replace("\n", "\r\n", $contentFile); } - if (empty($location_file) === false && file_exists($location_file) === true) { + if (empty($location_file) === false + && strpos($location_file, realpath('attachment/plugin')) !== false + && file_exists($location_file) === true + ) { $result = file_put_contents($location_file, $contentFile); } } From b9070d3a8e5d524297f762ca982eaaa79ed2aadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Fri, 2 Feb 2024 08:56:39 -0600 Subject: [PATCH 14/25] Fix on empty log extraction --- pandora_agents/unix/pandora_agent | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 9b758246bb..59004de345 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -3680,20 +3680,17 @@ sub write_module_xml ($@) { # Is it an extraction log module? if($module->{'type'} eq "log"){ + my $output = join('', @data); + + if ($output eq "") { + return; + } + $Xml .="\n"; $Xml .= " {'name'} . "]]>\n"; $Xml .= " {'type'} . "]]>\n"; $Xml .= " base64\n"; - - # Data list - if ($#data > 0) { - $Xml .= " \n"; - # Single data - } else { - chomp ($data[0]); - $Xml .= " \n"; - } - + $Xml .= " \n"; $Xml .= "\n"; return; } From 64f6825d65ad26115ae4daf74e33ade3845439bb Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 5 Feb 2024 09:21:33 +0100 Subject: [PATCH 15/25] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c8ee8180a7..84a05c32a5 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.775-240126 +Version: 7.0NG.775-240205 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 fa783cc923..27fab585af 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.775-240126" +pandora_version="7.0NG.775-240205" 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 129151ca0f..8d7ef558ba 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.775'; -use constant AGENT_BUILD => '240126'; +use constant AGENT_BUILD => '240205'; # 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 5c05e6110e..da53dbfb8c 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240126 +%define release 240205 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 78383784e9..ec0ce5c951 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240126 +%define release 240205 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index b21d106a96..be65e38e09 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240126 +%define release 240205 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 7a15966693..fa35c6ef76 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240126 +%define release 240205 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 337a0ec5f3..28f1955691 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240126 +%define release 240205 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 2f6e9c4d3d..9afdcb76ef 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.775" -PI_BUILD="240126" +PI_BUILD="240205" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 95fa0dd4a3..65eb14e1c0 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240126} +{240205} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f3961807fe..da37bd947d 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.775 Build 240126") +#define PANDORA_VERSION ("7.0NG.775 Build 240205") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 1bb160a879..85fa9ba06c 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.775(Build 240126))" + VALUE "ProductVersion", "(7.0NG.775(Build 240205))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 466722a50b..8f91474f4c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.775-240126 +Version: 7.0NG.775-240205 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 a47efa89c2..38ecdae5ba 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.775-240126" +pandora_version="7.0NG.775-240205" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a721e82c12..171156b287 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 = 'PC240126'; +$build_version = 'PC240205'; $pandora_version = 'v7.0NG.775'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index c6329db34e..cda7eb03b6 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e7e972a801..24e400c112 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.775 -%define release 240126 +%define release 240205 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f443bc4b03..a560bbde3e 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.775 -%define release 240126 +%define release 240205 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index bc5676b742..7a7158534a 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.775" -PI_BUILD="240126" +PI_BUILD="240205" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f079a42194..bd25b9ad98 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.775 Build 240126"; +my $version = "7.0NG.775 Build 240205"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 288c0dadd3..76154a1097 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.775 Build 240126"; +my $version = "7.0NG.775 Build 240205"; # save program name for logging my $progname = basename($0); From 599db12dabfa2cebbad66f63884aa5dfb18ad79f Mon Sep 17 00:00:00 2001 From: rafael Date: Mon, 5 Feb 2024 12:02:34 +0100 Subject: [PATCH 16/25] 12769 fixing typo on systemctl daemon-reload --- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index b24d7e66c1..f83e8f610b 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -118,7 +118,7 @@ then cp -f /usr/share/pandora_agent/pandora_agent_daemon.service /usr/lib/systemd/system/ chmod -x /usr/lib/systemd/system/pandora_agent_daemon.service # Enable the services on SystemD - systemctl daemon reload + systemctl daemon-reload systemctl enable pandora_agent_daemon.service fi From 21fe027a62cd2f0667c7d3f00e5b9d661271a4eb Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 5 Feb 2024 14:34:43 +0100 Subject: [PATCH 17/25] #12488 tips window move for clicks --- .../include/javascript/tipsWindow.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pandora_console/include/javascript/tipsWindow.js b/pandora_console/include/javascript/tipsWindow.js index f066f65c49..33cb9d46d1 100644 --- a/pandora_console/include/javascript/tipsWindow.js +++ b/pandora_console/include/javascript/tipsWindow.js @@ -82,6 +82,7 @@ function removeInputImage(e) { } } function render({ title, text, url, files, method }) { + var positionButtonsBefore = $(".ui-dialog-buttonset").offset().top; $("#title_tip").html(title); $("#text_tip").html(text); if (url) { @@ -123,6 +124,7 @@ function render({ title, text, url, files, method }) { } }); activeCarousel(); + checkPositionButtons(positionButtonsBefore); } function close_dialog() { @@ -429,3 +431,18 @@ function validateImages() { }); return validate; } + +function checkPositionButtons(positionButtonsBefore) { + // posicion actual botones + var buttonsNow = $(".ui-dialog-buttonset").offset().top; + // Position of dialog + var dialogPosition = $(".dialog_tips").position().top; + var positionFinal; + if (positionButtonsBefore > buttonsNow) { + positionFinal = dialogPosition + (positionButtonsBefore - buttonsNow); + $(".dialog_tips").css("top", positionFinal); + } else if (positionButtonsBefore < buttonsNow) { + positionFinal = dialogPosition - (buttonsNow - positionButtonsBefore); + $(".dialog_tips").css("top", positionFinal); + } +} From c984da1ac71ce5181a912a56ca7a0dbfd4dce51e Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 5 Feb 2024 15:35:38 +0100 Subject: [PATCH 18/25] #12848 reload when new credentials --- pandora_console/include/class/CredentialStore.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/class/CredentialStore.class.php b/pandora_console/include/class/CredentialStore.class.php index 94036c7ad8..dd3f484d5e 100644 --- a/pandora_console/include/class/CredentialStore.class.php +++ b/pandora_console/include/class/CredentialStore.class.php @@ -1637,7 +1637,7 @@ class CredentialStore extends Wizard $(".ui-dialog-content").dialog("close"); $('.info').hide(); cleanupDOM(); - dt_keystore.draw(false); + window.location.reload(); } else { $(this).dialog('close'); } From 80c0f487742aa2befa24f1d8aa58874ec02062f3 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 5 Feb 2024 16:05:16 +0100 Subject: [PATCH 19/25] #12488 when px lower 0 default 100 --- pandora_console/include/javascript/tipsWindow.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/include/javascript/tipsWindow.js b/pandora_console/include/javascript/tipsWindow.js index 33cb9d46d1..fc48de0c1c 100644 --- a/pandora_console/include/javascript/tipsWindow.js +++ b/pandora_console/include/javascript/tipsWindow.js @@ -440,9 +440,11 @@ function checkPositionButtons(positionButtonsBefore) { var positionFinal; if (positionButtonsBefore > buttonsNow) { positionFinal = dialogPosition + (positionButtonsBefore - buttonsNow); + positionFinal = positionFinal < 0 ? "100" : positionFinal; $(".dialog_tips").css("top", positionFinal); } else if (positionButtonsBefore < buttonsNow) { positionFinal = dialogPosition - (buttonsNow - positionButtonsBefore); + positionFinal = positionFinal < 0 ? "100" : positionFinal; $(".dialog_tips").css("top", positionFinal); } } From 5f00166b7457264d773ad73a67d6ad2efc2abaf6 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 5 Feb 2024 16:52:12 +0100 Subject: [PATCH 20/25] #12847 remove entities title and name --- pandora_console/godmode/reporting/visual_console_favorite.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_favorite.php b/pandora_console/godmode/reporting/visual_console_favorite.php index 0be52d89bc..68db1582c2 100644 --- a/pandora_console/godmode/reporting/visual_console_favorite.php +++ b/pandora_console/godmode/reporting/visual_console_favorite.php @@ -247,7 +247,7 @@ if ($favorite_array == false) { $url = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$favourite_v['id']; } - echo "
  • "; + echo "
  • "; echo "
    "; echo html_print_image( 'images/'.groups_get_icon($favourite_v['id_group']), @@ -256,7 +256,7 @@ if ($favorite_array == false) { ); echo '
    '; echo "
    "; - echo $favourite_v['name']; + echo io_safe_output($favourite_v['name']); echo '
    '; echo '
  • '; } From 59fd298215eb9f625e593530b053c7d53e6d11dc Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 5 Feb 2024 17:24:52 +0100 Subject: [PATCH 21/25] #12845 fix styles events --- .../include/class/WelcomeWindow.class.php | 6 +++--- .../include/javascript/pandora_events.js | 20 ++----------------- .../include/styles/js/jquery-ui_custom.css | 8 ++------ 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/pandora_console/include/class/WelcomeWindow.class.php b/pandora_console/include/class/WelcomeWindow.class.php index 378a194e32..4a157540c5 100644 --- a/pandora_console/include/class/WelcomeWindow.class.php +++ b/pandora_console/include/class/WelcomeWindow.class.php @@ -1257,8 +1257,8 @@ class WelcomeWindow extends Wizard draggable: true, modal: true, close: false, - height: 375, - width: 480, + height: 400, + width: 500, overlay: { opacity: 0.5, background: "black" @@ -1274,7 +1274,7 @@ class WelcomeWindow extends Wizard draggable: true, modal: true, close: false, - height: 265, + height: 300, width: 480, overlay: { opacity: 0.5, diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index 936c4a0cfb..fc6485a4fe 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -1601,9 +1601,7 @@ $(document).ajaxSend(function(event, jqXHR, ajaxOptions) { // Add the minimize icon to the minimize button $("", { - class: "ui-button-icon ui-icon", - style: - "background-color: rgb(51, 51, 51); -webkit-mask: url('images/arrow-down-white.png') no-repeat / contain !important;" + class: "ui-button-icon ui-icon" }).appendTo(minimizeButton); $("", { @@ -1617,23 +1615,9 @@ $(document).ajaxSend(function(event, jqXHR, ajaxOptions) { class: "ui-corner-all ui-widget ui-button-icon-only ui-dialog-titlebar-disengage disengage-buttom-image", type: "button", - title: "Disengage", - style: "float: right; position:relative;" + title: "Disengage" }).insertBefore(minimizeButton); - // Add the disengage icon to the disengage button - $("", { - class: "ui-button-icon ui-icon", - style: - "background-color: rgb(51, 51, 51); -webkit-mask: url('images/dashboard.menu.png') no-repeat center / contain !important;" - }).appendTo(disengageButton); - - $("", { - class: "ui-button-icon-space" - }) - .html(" ") - .appendTo(disengageButton); - minimizeButton.click(function(e) { if ($("#minimize_arrow_event_sound").hasClass("arrow_menu_up")) { $("#minimize_arrow_event_sound").removeClass("arrow_menu_up"); diff --git a/pandora_console/include/styles/js/jquery-ui_custom.css b/pandora_console/include/styles/js/jquery-ui_custom.css index 440540ab05..5bf343ee60 100644 --- a/pandora_console/include/styles/js/jquery-ui_custom.css +++ b/pandora_console/include/styles/js/jquery-ui_custom.css @@ -61,15 +61,11 @@ } .ui-dialog .ui-dialog-titlebar-disengage { - position: absolute !important; - right: 50px; - top: -3px; - width: 40px; margin: 0px 0 0 0; padding: 1px; - height: 40px; + height: 20px; bottom: 30%; - background-color: #fff !important; + background-color: white; } .ui-dialog .ui-dialog-titlebar-disengage:hover { From 7dc0acf6da3ef211ced9db8d2e30a01501ffc40a Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 6 Feb 2024 01:00:25 +0100 Subject: [PATCH 22/25] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 84a05c32a5..92e8734a32 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.775-240205 +Version: 7.0NG.775-240206 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 27fab585af..738dd64358 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.775-240205" +pandora_version="7.0NG.775-240206" 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 129151ca0f..92a66e7771 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.775'; -use constant AGENT_BUILD => '240126'; +use constant AGENT_BUILD => '240206'; # 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 da53dbfb8c..121b7808f7 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240205 +%define release 240206 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index ec0ce5c951..d8720c7d60 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240205 +%define release 240206 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index f83e8f610b..a4cf082998 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240205 +%define release 240206 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index fa35c6ef76..d63f607f95 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240205 +%define release 240206 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 28f1955691..c8f4533848 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240205 +%define release 240206 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 9afdcb76ef..93c45c81bd 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.775" -PI_BUILD="240205" +PI_BUILD="240206" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 65eb14e1c0..ac7a06c6c3 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240205} +{240206} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index da37bd947d..c1f50c66ec 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.775 Build 240205") +#define PANDORA_VERSION ("7.0NG.775 Build 240206") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 85fa9ba06c..09faeae8b7 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.775(Build 240205))" + VALUE "ProductVersion", "(7.0NG.775(Build 240206))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8f91474f4c..8d272f6e67 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.775-240205 +Version: 7.0NG.775-240206 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 38ecdae5ba..7c15a6b8d3 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.775-240205" +pandora_version="7.0NG.775-240206" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 171156b287..534a6e2b3e 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 = 'PC240205'; +$build_version = 'PC240206'; $pandora_version = 'v7.0NG.775'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index cda7eb03b6..d9f4e9c438 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 24e400c112..d85e93fef9 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.775 -%define release 240205 +%define release 240206 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index a560bbde3e..077f7f18e7 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.775 -%define release 240205 +%define release 240206 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 7a7158534a..08c6a22142 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.775" -PI_BUILD="240205" +PI_BUILD="240206" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index bd25b9ad98..af2a34805e 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.775 Build 240205"; +my $version = "7.0NG.775 Build 240206"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 76154a1097..e7280ee070 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.775 Build 240205"; +my $version = "7.0NG.775 Build 240206"; # save program name for logging my $progname = basename($0); From e402f713c7636ea1f76eff10348567ee6283f685 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 6 Feb 2024 11:35:28 +0100 Subject: [PATCH 23/25] #12845 fix play image --- pandora_console/include/styles/events.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index ea31dfeecc..c3c6f73f5d 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -585,3 +585,7 @@ div.container-filter-buttons { margin-right: 10px !important; } } + +#button-start-search { + width: 115px; +} From 644308db4f42f2c9098478e25e1399894d25afe4 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 6 Feb 2024 14:34:34 +0100 Subject: [PATCH 24/25] #12845 fix style hover --- pandora_console/include/ajax/events.php | 15 ++++++--------- .../include/javascript/pandora_events.js | 8 ++++++++ pandora_console/include/styles/pandora.css | 4 ++-- pandora_console/include/styles/sound_events.css | 12 ++---------- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 851a22040b..72e77e73dc 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -2542,15 +2542,12 @@ if ($drawConsoleSound === true) { $output .= '
    '; $output .= '
    '; $output .= '
    '; - $output .= html_print_input( - [ - 'label' => __('Start'), - 'type' => 'button', - 'name' => 'start-search', - 'attributes' => [ 'class' => 'play secondary' ], - 'return' => true, - ], - 'div', + $output .= html_print_button( + __('Start'), + 'start-search', + false, + '', + ['icon' => 'play'], true ); $output .= '
    '; diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index fc6485a4fe..369ecff1f3 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -1261,6 +1261,10 @@ function action_events_sound(mode, settings) { $("#button-start-search") .removeClass("play") .addClass("stop"); + $("#button-start-search") + .find("div") + .removeClass("play") + .addClass("stop"); // Change value button. $("#button-start-search").val(settings.stop); $("#button-start-search > span").text(settings.stop); @@ -1277,6 +1281,10 @@ function action_events_sound(mode, settings) { $("#button-start-search") .removeClass("stop") .addClass("play"); + $("#button-start-search") + .find("div") + .removeClass("stop") + .addClass("play"); // Change value button. $("#button-start-search").val(settings.start); $("#button-start-search > span").text(settings.start); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 1453289d08..a1f76eef71 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -12819,9 +12819,9 @@ div.agents_custom_fields #datatables_wrapper div.bottom { .actions-sound-modal .buttons-sound-modal button.play, .actions-sound-modal .buttons-sound-modal input[type="button"].play { - background: url(../../images/play-white.png), transparent !important; + /*background: url(../../images/play-white.png), transparent !important; background-repeat: no-repeat !important; - background-position: 82px 14px !important; + background-position: 82px 14px !important;*/ color: #ffffff; padding-left: 20px; border: 0; diff --git a/pandora_console/include/styles/sound_events.css b/pandora_console/include/styles/sound_events.css index a572c219f3..a8068a8308 100644 --- a/pandora_console/include/styles/sound_events.css +++ b/pandora_console/include/styles/sound_events.css @@ -1,9 +1,6 @@ /* * Css Modal Sound events. */ -div.container-button-play > button#button-start-search { - transition: none !important; -} .wizard { text-align: left; } @@ -217,9 +214,9 @@ div.container-button-play > button#button-start-search { .actions-sound-modal .buttons-sound-modal button.play, .actions-sound-modal .buttons-sound-modal input[type="button"].play { - background: url(../../images/play-white.png), transparent !important; + /*background: url(../../images/play-white.png), transparent !important; background-repeat: no-repeat !important; - background-position: 82px 14px !important; + background-position: 82px 14px !important;*/ color: #ffffff !important; padding-left: 20px; border: 0; @@ -263,11 +260,6 @@ button#button-no-alerts.silence-alerts:hover { background-position: 138px 4px !important; } -.actions-sound-modal .container-button-play { - background-color: var(--primary-color); - border-radius: 8px; -} - .actions-sound-modal .container-button-alert.fired { background: #ee2132; border-radius: 8px; From 4912a4051f1f3d50a84028dab53e86ecf0d9dabd Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 7 Feb 2024 01:00:50 +0100 Subject: [PATCH 25/25] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 92e8734a32..ee0f6d119d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.775-240206 +Version: 7.0NG.775-240207 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 738dd64358..157318b744 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.775-240206" +pandora_version="7.0NG.775-240207" 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 e23e9c1249..417ff01de6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.775'; -use constant AGENT_BUILD => '240206'; +use constant AGENT_BUILD => '240207'; # 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 121b7808f7..0daaad573f 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240206 +%define release 240207 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index d8720c7d60..f17d3385b7 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240206 +%define release 240207 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index a4cf082998..fd8eaa717c 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240206 +%define release 240207 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index d63f607f95..77ffa9603e 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240206 +%define release 240207 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index c8f4533848..df8a8298ab 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240206 +%define release 240207 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 93c45c81bd..af838ca3e9 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.775" -PI_BUILD="240206" +PI_BUILD="240207" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ac7a06c6c3..20ceb59ecc 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240206} +{240207} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index c1f50c66ec..5d63022c43 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.775 Build 240206") +#define PANDORA_VERSION ("7.0NG.775 Build 240207") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 09faeae8b7..f4a25d4253 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.775(Build 240206))" + VALUE "ProductVersion", "(7.0NG.775(Build 240207))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8d272f6e67..6db9add67d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.775-240206 +Version: 7.0NG.775-240207 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 7c15a6b8d3..da77fff309 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.775-240206" +pandora_version="7.0NG.775-240207" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 534a6e2b3e..265c84b75c 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 = 'PC240206'; +$build_version = 'PC240207'; $pandora_version = 'v7.0NG.775'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d9f4e9c438..5b2aec429c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index d85e93fef9..c054404add 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.775 -%define release 240206 +%define release 240207 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 077f7f18e7..af9312b5b4 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.775 -%define release 240206 +%define release 240207 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 08c6a22142..aaa17e341c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.775" -PI_BUILD="240206" +PI_BUILD="240207" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index af2a34805e..47e0213732 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.775 Build 240206"; +my $version = "7.0NG.775 Build 240207"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index e7280ee070..af8c48e0ad 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.775 Build 240206"; +my $version = "7.0NG.775 Build 240207"; # save program name for logging my $progname = basename($0);