From 64b612faea0c5ff58e1dacd9e2e692cf2980e93e Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Wed, 29 Nov 2023 09:40:34 +0100 Subject: [PATCH] #11494 Add tip and fix MTRS bug --- pandora_console/include/functions_modules.php | 4 ++++ .../include/lib/Dashboard/Widgets/service_level.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 4104d2660f..12fc5ec828 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -4871,6 +4871,10 @@ function service_level_module_data($datetime_from, $datetime_to, $id_agentmodule $mtrs_array[] = 0; } else { foreach ($normal_event as $key => $value) { + if (isset($failed_event[$key]) === false) { + $failed_event[$key] = end($failed_event); + } + if (($failed_event[$key] - $normal_event[$key]) < 0) { $mtrs_array[] = ($normal_event[$key] - $failed_event[$key]); } else { diff --git a/pandora_console/include/lib/Dashboard/Widgets/service_level.php b/pandora_console/include/lib/Dashboard/Widgets/service_level.php index 7f3add7c08..8184495587 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/service_level.php +++ b/pandora_console/include/lib/Dashboard/Widgets/service_level.php @@ -533,8 +533,8 @@ class ServiceLevelWidget extends Widget $table->head[1] = __('% Av.'); $table->head[2] = __('MTBF'); $table->head[3] = __('MTRS'); - $table->head[4] = __('Crit. Events'); - $table->head[5] = __('Warn. Events'); + $table->head[4] = __('Crit. Events').ui_print_help_tip(__('Counted only critical events generated automatic by the module'), true); + $table->head[5] = __('Warn. Events').ui_print_help_tip(__('Counted only warning events generated automatic by the module'), true); $table->head[6] = __('Last change'); $table->data = []; $table->cellstyle = [];