diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 28311371bf..7879ab665f 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -455,19 +455,28 @@ echo sprintf('
', $menuTypeClass); ); $header_logout .= '
'; + if (enterprise_installed()) { + $subtitle_header = $config['custom_subtitle_header']; + $class_header = ''; + } else { + $subtitle_header = __('the Flexible Monitoring System (OpenSource version)'); + echo ''; + $class_header = 'underline-hover modal_module_list'; + } + if (is_reporting_console_node() === true) { - echo '
'; + echo '
'; echo ''; echo $config['custom_title_header']; echo ''; echo ''; - echo $config['custom_subtitle_header']; + echo $subtitle_header; echo ''; echo '
'; echo '
'; echo '
'.$modal_help, $header_user, $header_logout.'
'; } else { - echo '
'.$config['custom_title_header'].''.$config['custom_subtitle_header'].'
+ echo '
'.$config['custom_title_header'].''.$subtitle_header.'
'.$header_searchbar.'
'.$header_autorefresh, $header_autorefresh_counter, $header_discovery, $header_welcome, $servers_list, $modal_help, $header_setup, $header_user, $header_logout.'
'; } @@ -916,6 +925,46 @@ echo sprintf('
', $menuTypeClass); $(document).ready (function () { + + $('.header_left').on('click', function(){ + // Hidden tips modal. + $(".window").css("display", "none"); + jQuery.post( + "ajax.php", + { + page: "include/functions_menu", + 'why_enterprise': "true" + }, + function(data) { + if (data) { + $("#dialog_why_enterprise").html(data); + // Open dialog + $("#dialog_why_enterprise").dialog({ + resizable: false, + draggable: false, + modal: true, + show: { + effect: "fade", + duration: 200 + }, + hide: { + effect: "fade", + duration: 200 + }, + closeOnEscape: true, + width: 700, + height: 450, + close: function(){ + $('#dialog_why_enterprise').html(''); + } + }); + } + }, + "html" + ); + }); + + // Check new notifications on a periodic way setInterval(check_new_notifications, 60000); diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 66b14a2776..fa87941b8e 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -875,6 +875,7 @@ function menu_pepare_acl_select_data($pages, $sec) if (is_ajax()) { $about = (bool) get_parameter('about'); $about_operation = (bool) get_parameter('about_operation'); + $why_enterprise = (bool) get_parameter('why_enterprise'); if ($about) { global $config; global $pandora_version; @@ -1370,4 +1371,50 @@ if (is_ajax()) { echo $dialog; } + + if ($why_enterprise) { + global $config; + global $pandora_version; + $product_name = io_safe_output(get_product_name()); + + $lts_name = ''; + if (empty($config['lts_name']) === false) { + $lts_name = ' '.$config['lts_name'].''; + } + + $image_about = ui_get_full_url('/images/custom_logo/logo-default-pandorafms-collapsed.svg', false, false, false); + $url_why_enterprise = 'https://pandorafms.com/en/why-enterprise/'; + $lang = users_get_user_by_id($config['id_user'])['language']; + if ($lang === 'es') { + $url_why_enterprise = 'https://pandorafms.com/es/por-que-pandora-fms-enterprise/'; + } + + $dialog = ' +
+
+ + + + + + + +
+ + logo + + +

'.$product_name.'

+

'.__('Version').' '.$pandora_version.$lts_name.' - '.(enterprise_installed() ? 'Enterprise' : 'Community').'

+

'.__('You are using the free, OpenSource version of Pandora FMS.').'

+

'.__('This version has no official support or warranty, you can purchase the Enterprise version, which offers support, warranty and additional features to the Opensource version.').'

+

'.__('Click on this link for more information.').'

+
+ +
+
+ '; + + echo $dialog; + } } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index d8f7dd9416..6b35f1682d 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -8764,6 +8764,10 @@ div.graph div.legend table { text-decoration: underline; } +.underline-hover:hover { + text-decoration: underline; +} + .w105px { width: 105px; }