From 36308b1be0102d6ccc21dd327a45a4e366ea38de Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 14 Feb 2023 16:41:24 +0100 Subject: [PATCH] Minor visual fixes --- .../godmode/users/configure_user.php | 2 +- pandora_console/godmode/users/user_list.php | 15 +++++++-- .../godmode/wizards/Wizard.main.php | 2 +- pandora_console/include/class/HTML.class.php | 2 +- pandora_console/include/functions_ui.php | 33 ++++++++++++++----- pandora_console/include/styles/discovery.css | 4 ++- pandora_console/include/styles/pandora.css | 12 ++++--- 7 files changed, 49 insertions(+), 21 deletions(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 52697bee97..6aa95574c6 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -59,7 +59,7 @@ if ($enterprise_include === true) { $id = get_parameter('id', get_parameter('id_user', '')); // Check if we are the same user for edit or we have a proper profile for edit users. if ($id !== $config['id_user']) { - if ((bool) check_acl($config['id_user'], 0, 'UM') === false) { + if ((is_centralized() === true) || (bool) check_acl($config['id_user'], 0, 'UM') === false) { db_pandora_audit( AUDIT_LOG_ACL_VIOLATION, 'Trying to access User Management' diff --git a/pandora_console/godmode/users/user_list.php b/pandora_console/godmode/users/user_list.php index 60fb457a6d..085e90ac25 100644 --- a/pandora_console/godmode/users/user_list.php +++ b/pandora_console/godmode/users/user_list.php @@ -337,8 +337,11 @@ if ($delete_user === true) { ); if (isset($private_dashboards) === true) { - db_process_sql_delete('tdashboard', ['id_user' => $id_user]); - header('Refresh:1'); + $dashboardRemoveResult = db_process_sql_delete('tdashboard', ['id_user' => $id_user]); + // Refresh the view when delete private dashboards. For review. + if ($dashboardRemoveResult === false || (int) $dashboardRemoveResult > 0) { + header('Refresh:1'); + } } $result = delete_user($id_user); @@ -720,7 +723,13 @@ foreach ($info as $user_id => $user_info) { || isset($group_um[0]) || (isset($user_info['edit']) && $user_info['edit'])))) ) { - $data[0] = ''.$user_id.''; + $data[0] = html_print_anchor( + [ + 'href' => ui_get_full_url('index.php?sec=gusuarios&sec2=godmode/users/configure_user&edit_user=1&pure=0&id_user='.$user_id), + 'content' => $user_id, + ], + true + ); } else { $data[0] = $user_id; } diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index c80c338918..22521c0af0 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -338,7 +338,7 @@ class Wizard public function printBreadcrum() { return implode( - ' / ', + ' / ', $this->breadcrum ); } diff --git a/pandora_console/include/class/HTML.class.php b/pandora_console/include/class/HTML.class.php index c90a72b06c..b91cfdb2fc 100644 --- a/pandora_console/include/class/HTML.class.php +++ b/pandora_console/include/class/HTML.class.php @@ -311,7 +311,7 @@ class HTML public function printBreadcrum() { return implode( - ' / ', + ' / ', $this->breadcrum ); } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 6430031ce8..5b41b5985f 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -4213,8 +4213,8 @@ function ui_toggle( $toggle_class='', $container_class='white-box-content', $main_class='box-flat white_table_graph', - $img_a='images/arrow_down_green.png', - $img_b='images/arrow_right_green.png', + $img_a='images/arrow@svg.svg', + $img_b='images/arrow@svg.svg', $clean=false, $reverseImg=false, $switch=false, @@ -4231,18 +4231,25 @@ function ui_toggle( $image_a = html_print_image( $img_a, true, - [ 'style' => 'object-fit: contain;' ], + [ + 'style' => 'rotate: 45deg;', + 'class' => 'main_menu_icon', + ], true ); } else { $image_a = ''; } + hd($image_a, true); if (empty($img_b) === false) { $image_b = html_print_image( $img_b, true, - [ 'style' => 'object-fit: contain;' ], + [ + 'style' => 'rotate: 90deg;', + 'class' => 'main_menu_icon', + ], true ); } else { @@ -4252,10 +4259,12 @@ function ui_toggle( // Options. $style = 'overflow:hidden;width: -webkit-fill-available;width: -moz-fill-available;'; $style = 'overflow:hidden;'; - if ($hidden_default) { + if ($hidden_default === true) { + $imageRotate = '90deg'; $style .= 'height:0;position:absolute;'; $original = $img_b; } else { + $imageRotate = '180deg'; $style .= 'height:auto;position:relative;'; $original = $img_a; } @@ -4303,15 +4312,15 @@ function ui_toggle( $original, true, [ - 'class' => 'float-left', - 'style' => 'object-fit: contain; margin-right:10px;', + 'class' => 'float-left main_menu_icon', + 'style' => 'object-fit: contain; margin-right:10px; rotate:'.$imageRotate, 'title' => $title, 'id' => 'image_'.$uniqid, ] ); } - $output .= ''.$name.''; + $output .= $name; } else { $output .= $name; if ($switch === true) { @@ -4335,7 +4344,8 @@ function ui_toggle( $original, true, [ - 'style' => 'object-fit: contain; float:right; margin-right:10px;', + 'class' => 'main_menu_icon', + 'style' => 'object-fit: contain; float:right; margin-right:10px; rotate:'.$imageRotate, 'title' => $title, 'id' => 'image_'.$uniqid, ] @@ -4359,6 +4369,7 @@ function ui_toggle( $output .= ' var is_metaconsole = '.(int) is_metaconsole().";\n"; $output .= ' /*