From 93200e2af1bd8a454bfc61172b4cbd5d2e5455a8 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Mon, 18 Nov 2019 10:51:09 +0100 Subject: [PATCH 1/6] 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 2/6] 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 41e818334e1b597a36e606441f144f345616fc06 Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 21 Nov 2019 11:14:50 +0100 Subject: [PATCH 3/6] 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 '