From 93200e2af1bd8a454bfc61172b4cbd5d2e5455a8 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Mon, 18 Nov 2019 10:51:09 +0100 Subject: [PATCH 01/11] Changed definition of link in group icon --- pandora_console/operation/agentes/estado_agente.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index ad25765007..c5312ed572 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -821,8 +821,9 @@ foreach ($agents as $agent) { $data[2] = ui_print_os_icon($agent['id_os'], false, true); $data[3] = ''.human_time_description_raw($agent['intervalo']).''; - - $data[4] = ui_print_group_icon($agent['id_grupo'], true); + $data[4] = ''; + $data[4] .= ui_print_group_icon($agent['id_grupo'], true, 'groups_small', '', false); + $data[4] .= ''; $agent['not_init_count'] = $agent['notinit_count']; $data[5] = ui_print_type_agent_icon( From fad70cfdc042d6b31dbc8a38089faab9b2891d80 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 20 Nov 2019 16:34:56 +0100 Subject: [PATCH 02/11] fixed secondary group in events --- pandora_console/include/functions_events.php | 15 ++++++++++----- pandora_console/include/functions_groups.php | 13 ++++++------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index cb8ef39481..9659139cc5 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1042,6 +1042,8 @@ function events_get_all( } } + $user_admin_group_all = ($user_is_admin && $groups == 0) ? '' : 'tasg.'; + // TAgs ACLS. if (check_acl($config['id_user'], 0, 'ER')) { $tags_acls_condition = tags_get_acl_tags( @@ -1066,7 +1068,7 @@ function events_get_all( // Table tag for id_grupo. 'te.', // Alt table tag for id_grupo. - 'tasg.' + $user_admin_group_all ); // FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)". } else if (check_acl($config['id_user'], 0, 'EW')) { @@ -1092,7 +1094,7 @@ function events_get_all( // Table tag for id_grupo. 'te.', // Alt table tag for id_grupo. - 'tasg.' + $user_admin_group_all ); // FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)". } else if (check_acl($config['id_user'], 0, 'EM')) { @@ -1118,7 +1120,7 @@ function events_get_all( // Table tag for id_grupo. 'te.', // Alt table tag for id_grupo. - 'tasg.' + $user_admin_group_all ); // FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)". } @@ -1228,8 +1230,11 @@ function events_get_all( } // Secondary groups. - db_process_sql('SET group_concat_max_len = 9999999'); - $event_lj = events_get_secondary_groups_left_join($table); + $event_lj = ''; + if (!$user_is_admin || ($user_is_admin && isset($groups) && $groups > 0)) { + db_process_sql('SET group_concat_max_len = 9999999'); + $event_lj = events_get_secondary_groups_left_join($table); + } $group_selects = ''; if ($group_by != '') { diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index a1448e37f2..50c8cb36ee 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -308,14 +308,13 @@ function groups_get_children($parent, $ignorePropagate=false) static $groups; if (empty($groups)) { + $aux_groups = []; $groups = db_get_all_rows_in_table('tgrupo'); - $groups = array_reduce( - $groups, - function ($carry, $item) { - $carry[$item['id_grupo']] = $item; - return $carry; - } - ); + foreach ($groups as $key => $value) { + $aux_groups[$value['id_grupo']] = $value; + } + + $groups = $aux_groups; } $return = []; From 23e64ab781406bf8a8062444b483217c4a34aaf6 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 21 Nov 2019 00:01:18 +0100 Subject: [PATCH 03/11] 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 dc7c29158e..e5cccf6c23 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.740-191120 +Version: 7.0NG.740-191121 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 d4afa7ca58..b77eaa48c4 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.740-191120" +pandora_version="7.0NG.740-191121" 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 920de93113..9625518306 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.740'; -use constant AGENT_BUILD => '191120'; +use constant AGENT_BUILD => '191121'; # 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 71df1f7a63..a308bf9350 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.740 -%define release 191120 +%define release 191121 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 ca17af03f4..6f71dee5b5 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.740 -%define release 191120 +%define release 191121 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 49311f02c6..099ed7b6ca 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.740" -PI_BUILD="191120" +PI_BUILD="191121" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 89ecc97888..1bedee5bc5 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{191120} +{191121} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 19188f93a6..607cbf8e5a 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.740(Build 191120)") +#define PANDORA_VERSION ("7.0NG.740(Build 191121)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index eb380b96d6..e5099414d0 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.740(Build 191120))" + VALUE "ProductVersion", "(7.0NG.740(Build 191121))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 87c3db41f8..77d4392c10 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.740-191120 +Version: 7.0NG.740-191121 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 d795d849fd..ae2e4c9102 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.740-191120" +pandora_version="7.0NG.740-191121" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index b23e983004..455ff2b831 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 = 'PC191120'; +$build_version = 'PC191121'; $pandora_version = 'v7.0NG.740'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f548cfa8de..3b674bd766 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 9e5de06ee7..0dab5db6bd 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.740 -%define release 191120 +%define release 191121 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 93d1109f65..bcdfb0af1f 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.740 -%define release 191120 +%define release 191121 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index d3d28dda20..15903c26e3 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.740" -PI_BUILD="191120" +PI_BUILD="191121" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a8976331b7..061929e609 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.740 PS191120"; +my $version = "7.0NG.740 PS191121"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 6c1031f654..9ce7ce21a5 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.740 PS191120"; +my $version = "7.0NG.740 PS191121"; # save program name for logging my $progname = basename($0); From 41e818334e1b597a36e606441f144f345616fc06 Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 21 Nov 2019 11:14:50 +0100 Subject: [PATCH 04/11] Ent 4954 urls documentacion soporte al fallar base datos --- pandora_console/general/login_page.php | 38 ++++++++++++++++-------- pandora_console/general/mysqlerr.php | 10 +++++-- pandora_console/include/functions_ui.php | 8 ++--- pandora_console/install.php | 5 ++++ 4 files changed, 43 insertions(+), 18 deletions(-) diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 7d4ebe7e04..816533aab0 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -95,6 +95,8 @@ $custom_fields = [ 'custom_title1_login', 'custom_title2_login', 'rb_product_name', + 'custom_docs_url', + 'custom_support_url', ]; foreach ($custom_fields as $field) { @@ -112,21 +114,33 @@ $support_logo = ui_get_support_logo(); echo '
'; echo '
'; - echo '