From d0aaadcbcfb85fc890e3553d79117467da964c95 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Mon, 29 May 2023 14:38:59 +0200 Subject: [PATCH] #11346 The information shown in the tooltips is adjusted, according to the view --- pandora_console/include/functions_clippy.php | 16 ++++++++++++++-- .../help/clippy/data_configuration_module.php | 11 ++++++++++- .../include/help/clippy/interval_agent_min.php | 11 ++++++++++- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_clippy.php b/pandora_console/include/functions_clippy.php index db6d0f7704..3e3362733c 100644 --- a/pandora_console/include/functions_clippy.php +++ b/pandora_console/include/functions_clippy.php @@ -297,6 +297,8 @@ function clippy_context_help($help=null) $code = str_replace('{clippy_obj}', 'intro_'.$id, $code); if ($help === 'module_unknow') { + $title = __('You have unknown modules in this agent.'); + $intro = __('Unknown modules are modules which receive data normally at least in one occassion, but at this time are not receving data. Please check our troubleshoot help page to help you determine why you have unknown modules.'); $img = html_print_image( 'images/info-warning.svg', true, @@ -305,6 +307,16 @@ function clippy_context_help($help=null) 'style' => 'margin-left: -25px;', ] ); + } else if ($help === 'interval_agent_min') { + $clippy_interval_agent_min = clippy_interval_agent_min(); + $title = $clippy_interval_agent_min['tours']['interval_agent_min']['steps'][0]['title']; + $intro = $clippy_interval_agent_min['tours']['interval_agent_min']['steps'][0]['intro']; + $img = $clippy_interval_agent_min['tours']['interval_agent_min']['steps'][0]['img']; + } else if ($help === 'data_configuration_module') { + $clippy_data_configuration_module = clippy_data_configuration_module(); + $title = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['title']; + $intro = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['intro']; + $img = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['img']; } else { $img = html_print_image( 'images/info-warning.svg', @@ -318,8 +330,8 @@ function clippy_context_help($help=null) function show_'.$id.'() { confirmDialog({ - title: "'.__('You have unknown modules in this agent.').'", - message: "'.('Unknown modules are modules which receive data normally at least in one occassion, but at this time are not receving data. Please check our troubleshoot help page to help you determine why you have unknown modules.').'", + title: "'.$title.'", + message: "'.$intro.'", strOKButton: "'.__('Close').'", hideCancelButton: true, size: 675, diff --git a/pandora_console/include/help/clippy/data_configuration_module.php b/pandora_console/include/help/clippy/data_configuration_module.php index d912191e19..d2618e392b 100644 --- a/pandora_console/include/help/clippy/data_configuration_module.php +++ b/pandora_console/include/help/clippy/data_configuration_module.php @@ -32,7 +32,16 @@ function clippy_data_configuration_module() $return_tours['tours']['data_configuration_module']['steps'] = []; $return_tours['tours']['data_configuration_module']['steps'][] = [ 'init_step_context' => true, - 'intro' => ''.''.''.''.''.''.''.''.''.'
'.__('Data Configuration Module.').'
'.__('Please note that information provided here affects how the agent collect information and generate the data XML. Any data/configuration reported by the agent, different from data or description is discarded, and the configuration shown in the console prevails over any configuration coming from the agent, this applies for example for crit/warn thresholds, interval, module group, min/max value, tags, etc.').'
'.__('Information imported FIRST time from the XML will fill the information you can see in the console, but after the first import, system will ignore any update coming from the XML/Agent.').'
', + 'intro' => __('Please note that information provided here affects how the agent collect information and generate the data XML. Any data/configuration reported by the agent, different from data or description is discarded, and the configuration shown in the console prevails over any configuration coming from the agent, this applies for example for crit/warn thresholds, interval, module group, min/max value, tags, etc.').__('Information imported FIRST time from the XML will fill the information you can see in the console, but after the first import, system will ignore any update coming from the XML/Agent.'), + 'title' => __('Data Configuration Module.'), + 'img' => html_print_image( + 'images/info-warning.svg', + true, + [ + 'class' => 'main_menu_icon invert_filter', + 'style' => 'margin-left: 5px;', + ] + ), ]; $return_tours['tours']['data_configuration_module']['conf'] = []; $return_tours['tours']['data_configuration_module']['conf']['autostart'] = false; diff --git a/pandora_console/include/help/clippy/interval_agent_min.php b/pandora_console/include/help/clippy/interval_agent_min.php index e936c63212..d8dae98a09 100644 --- a/pandora_console/include/help/clippy/interval_agent_min.php +++ b/pandora_console/include/help/clippy/interval_agent_min.php @@ -32,7 +32,16 @@ function clippy_interval_agent_min() $return_tours['tours']['interval_agent_min']['steps'] = []; $return_tours['tours']['interval_agent_min']['steps'][] = [ 'init_step_context' => true, - 'intro' => ''.''.''.''.''.''.''.'
'.__('Interval Agent.').'
'.__('Please note that having agents with a monitoring interval below 300 seconds is not recommended. This will impact seriously in the performance of the server. For example, having 200 agents with one minute interval, is the same than having 1000 agents with a 5 minute interval. The probability of getting unknown modules is higher, and the impact on the server is higher because it requires a shorter response time.').'
', + 'intro' => __('Please note that having agents with a monitoring interval below 300 seconds is not recommended. This will impact seriously in the performance of the server. For example, having 200 agents with one minute interval, is the same than having 1000 agents with a 5 minute interval. The probability of getting unknown modules is higher, and the impact on the server is higher because it requires a shorter response time.'), + 'title' => __('Interval Agent.'), + 'img' => html_print_image( + 'images/info-warning.svg', + true, + [ + 'class' => 'main_menu_icon invert_filter', + 'style' => 'margin-left: 5px;', + ] + ), ]; $return_tours['tours']['interval_agent_min']['conf'] = []; $return_tours['tours']['interval_agent_min']['conf']['autostart'] = false;