From a54c074b11340d3f228566fe6e32cf33fe048cd9 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Fri, 25 May 2018 10:29:40 +0200 Subject: [PATCH] [Rebranding] Added hide help on node --- pandora_console/general/header.php | 16 ++++++++++------ .../godmode/agentes/module_manager.php | 13 +++++++------ pandora_console/godmode/setup/setup_visuals.php | 7 +++++++ pandora_console/include/functions_config.php | 10 ++++++++-- pandora_console/include/functions_ui.php | 3 +++ 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index acefd20a2b..ac18da48d1 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -158,7 +158,7 @@ config_check(); data[0]['clippy'] = '' . html_print_image( @@ -307,11 +307,15 @@ config_check(); $table->data[0][3] = $maintenance_img; // Main help icon - $table->data[0][4] = ''.html_print_image("images/header_help.png", - true, array( - "title" => __('Main help'), - "id" => "helpmodal", - "class" => "modalpopup")).''; + if (!$config['disable_help']) { + $table->data[0][4] = + '' . + html_print_image("images/header_help.png", true, array( + "title" => __('Main help'), + "id" => "helpmodal", + "class" => "modalpopup")) . + ''; + } // Logout $table->data[0][5] = ''; diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index 145f7312d5..335bd287fa 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -151,12 +151,13 @@ if (($policy_page) || (isset($agent))) { echo ""; - -echo '
'; -echo ""; -echo "".__("Get more modules on Monitoring Library").""; -echo ""; -echo '
'; +if (!$config['disable_help']) { + echo '
'; + echo ""; + echo "".__("Get more modules on Monitoring Library").""; + echo ""; + echo '
'; +} if (! isset ($id_agente)) return; diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 9131a03b6b..c9ae4d9a0c 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -411,6 +411,13 @@ $table_styles->data[$row][1] .= __('No') . ' ' . html_print_radio_button_extended ('fixed_graph', 0, '', $config["fixed_graph"], $open, '','',true, $open,'visualmodal'); $row++; +$table_styles->data[$row][0] = __('Disable helps'); +$table_styles->data[$row][1] = __('Yes') . ' ' . + html_print_radio_button ('disable_help', 1, '', $config["disable_help"], true) . + '  '; +$table_styles->data[$row][1] .= __('No') . ' ' . + html_print_radio_button ('disable_help', 0, '', $config["disable_help"], true); +$row++; $table_styles->data[$row][0] = __('Fixed header'); $table_styles->data[$row][1] = __('Yes') . ' ' . diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index c60bf4f345..11ab9f3c94 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -585,8 +585,10 @@ function config_update_config () { $error_update[] = __('Autohidden menu'); if (!config_update_value ('visual_animation', get_parameter('visual_animation'))) $error_update[] = __('visual_animation'); + if (!config_update_value ('disable_help', get_parameter('disable_help'))) + $error_update[] = __('Disable help'); if (!config_update_value ('fixed_graph', get_parameter('fixed_graph'))) - $error_update[] = __('Fixed graph'); + $error_update[] = __('Fixed graph'); if (!config_update_value ('fixed_header', get_parameter('fixed_header'))) $error_update[] = __('Fixed header'); if (!config_update_value ('fixed_menu', get_parameter('fixed_menu'))) @@ -1185,7 +1187,11 @@ function config_process_config () { if (!isset ($config["graphviz_bin_dir"])) { config_update_value ('graphviz_bin_dir', ""); } - + + if (!isset ($config["disable_help"])) { + config_update_value ('disable_help', false); + } + if (!isset ($config["fixed_header"])) { config_update_value ('fixed_header', false); } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 42d839b81e..f7142ed889 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1104,6 +1104,9 @@ function ui_print_alert_template_example ($id_alert_template, $return = false, $ function ui_print_help_icon ($help_id, $return = false, $home_url = '', $image = "images/help.png", $is_relative = false) { global $config; + // Do not display the help icon if help is disabled + if ($config['disable_help']) return ''; + if (empty($home_url)) $home_url = "";