From db590f23677236e6af604d7c4202bd559fb62ec8 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Wed, 21 Jun 2023 10:08:29 +0200 Subject: [PATCH 1/4] #11583 Icons in event view for reports have been adjusted. --- pandora_console/include/functions_events.php | 41 +++++++++++++------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 0fe3e3551c..2e499cfeca 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2679,7 +2679,7 @@ function events_print_type_img( case 'going_down_critical': case 'going_up_critical': // This is to be backwards compatible. - $style .= ' event_module_background_state icon_background_critical'; + $icon = 'images/module_critical.png'; break; case 'going_up_normal': @@ -2731,23 +2731,24 @@ function events_print_type_img( if ($only_url) { $output = $urlImage.'/'.$icon; } else { - $output .= html_print_div( - [ - 'title' => events_print_type_description($type, true), - 'class' => $style, - 'style' => ((empty($icon) === false) ? 'background-image: url('.$icon.'); background-repeat: no-repeat;' : ''), - ], - true - ); /* - $output .= html_print_image( + $output .= html_print_div( + [ + 'title' => events_print_type_description($type, true), + 'class' => $style, + 'style' => ((empty($icon) === false) ? 'background-image: url('.$icon.'); background-repeat: no-repeat;' : ''), + ], + true + ); + */ + $output .= html_print_image( $icon, true, [ 'title' => events_print_type_description($type, true), 'class' => $style, ] - );*/ + ); } if ($return) { @@ -2850,13 +2851,13 @@ function events_print_type_img_pdf( break; case 'new_agent': - $svg = ' + $svg = ' Dark / 20 / agents@svg Created with Sketch. - - + + '; @@ -2874,6 +2875,18 @@ function events_print_type_img_pdf( break; case 'unknown': + break; + + case 'alert_fired': + $svg = ' + Dark / 20 / alert@svg + Created with Sketch. + + + + '; + break; + default: $svg = ' Dark / 20 / event@svg From 8eb11f2b5bba25f1889847f0523d5a2fcdf74942 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Tue, 4 Jul 2023 15:55:54 +0200 Subject: [PATCH 2/4] Fixed icons in node and meta for warning status --- pandora_console/include/functions_events.php | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 2e499cfeca..a9cabc637b 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2689,6 +2689,8 @@ function events_print_type_img( break; case 'going_up_warning': + $icon = 'images/module_warning.png'; + $style .= ' event_module_background_state icon_background_warning'; case 'going_down_warning': $style .= ' event_module_background_state icon_background_warning'; break; @@ -2851,16 +2853,15 @@ function events_print_type_img_pdf( break; case 'new_agent': - $svg = ' - Dark / 20 / agents@svg - Created with Sketch. - - - - - - - '; + $svg = html_print_image( + '/images/agents.svg', + true, + [ + 'class' => 'image_status invert_filter', + 'width' => 16, + 'title' => 'agents', + ] + ); break; case 'configuration_change': From 2aaa21ebffac746a1e6c4bc5ff1deb66d7b4686f Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Tue, 4 Jul 2023 17:34:08 +0200 Subject: [PATCH 3/4] #11583 Fixed the warning module icon in the node --- pandora_console/include/functions_events.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index a9cabc637b..bf28e43bda 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2690,9 +2690,10 @@ function events_print_type_img( case 'going_up_warning': $icon = 'images/module_warning.png'; - $style .= ' event_module_background_state icon_background_warning'; + // $style .= ' event_module_background_state icon_background_warning'; case 'going_down_warning': - $style .= ' event_module_background_state icon_background_warning'; + $icon = 'images/module_warning.png'; + // $style .= ' event_module_background_state icon_background_warning'; break; case 'going_unknown': From 7b9aae83caa72a8cd2060eceaf1d2a13af652fb1 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Fri, 11 Aug 2023 10:47:15 +0200 Subject: [PATCH 4/4] #11583 Fixed agent icon in firefox and chrome browser --- pandora_console/include/functions_events.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index bf28e43bda..7913df9fab 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2685,7 +2685,8 @@ function events_print_type_img( case 'going_up_normal': case 'going_down_normal': // This is to be backwards compatible. - $style .= ' event_module_background_state icon_background_normal'; + // $style .= ' event_module_background_state icon_background_normal'; + $icon = 'images/module_ok.png'; break; case 'going_up_warning': @@ -2697,7 +2698,8 @@ function events_print_type_img( break; case 'going_unknown': - $style .= ' event_module_background_state icon_background_unknown'; + // $style .= ' event_module_background_state icon_background_unknown'; + $icon = 'images/module_unknown.png'; break; case 'alert_fired': @@ -2855,11 +2857,10 @@ function events_print_type_img_pdf( case 'new_agent': $svg = html_print_image( - '/images/agents.svg', + '/images/agent_mc.png', true, [ 'class' => 'image_status invert_filter', - 'width' => 16, 'title' => 'agents', ] );