mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
#12596 new dialog on baner open version
This commit is contained in:
parent
962111936e
commit
28dc5cada0
@ -455,19 +455,28 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||||||
);
|
);
|
||||||
$header_logout .= '</a></div>';
|
$header_logout .= '</a></div>';
|
||||||
|
|
||||||
|
if (enterprise_installed()) {
|
||||||
|
$subtitle_header = $config['custom_subtitle_header'];
|
||||||
|
$class_header = '';
|
||||||
|
} else {
|
||||||
|
$subtitle_header = __('the Flexible Monitoring System (OpenSource version)');
|
||||||
|
echo '<div id="dialog_why_enterprise" class="invisible"></div>';
|
||||||
|
$class_header = 'underline-hover modal_module_list';
|
||||||
|
}
|
||||||
|
|
||||||
if (is_reporting_console_node() === true) {
|
if (is_reporting_console_node() === true) {
|
||||||
echo '<div class="header_left">';
|
echo '<div class="header_left '.$class_header.'">';
|
||||||
echo '<span class="header_title">';
|
echo '<span class="header_title">';
|
||||||
echo $config['custom_title_header'];
|
echo $config['custom_title_header'];
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
echo '<span class="header_subtitle">';
|
echo '<span class="header_subtitle">';
|
||||||
echo $config['custom_subtitle_header'];
|
echo $subtitle_header;
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div class="header_center"></div>';
|
echo '<div class="header_center"></div>';
|
||||||
echo '<div class="header_right">'.$modal_help, $header_user, $header_logout.'</div>';
|
echo '<div class="header_right">'.$modal_help, $header_user, $header_logout.'</div>';
|
||||||
} else {
|
} else {
|
||||||
echo '<div class="header_left"><span class="header_title">'.$config['custom_title_header'].'</span><span class="header_subtitle">'.$config['custom_subtitle_header'].'</span></div>
|
echo '<div class="header_left '.$class_header.'"><span class="header_title">'.$config['custom_title_header'].'</span><span class="header_subtitle">'.$subtitle_header.'</span></div>
|
||||||
<div class="header_center">'.$header_searchbar.'</div>
|
<div class="header_center">'.$header_searchbar.'</div>
|
||||||
<div class="header_right">'.$header_autorefresh, $header_autorefresh_counter, $header_discovery, $header_welcome, $servers_list, $modal_help, $header_setup, $header_user, $header_logout.'</div>';
|
<div class="header_right">'.$header_autorefresh, $header_autorefresh_counter, $header_discovery, $header_welcome, $servers_list, $modal_help, $header_setup, $header_user, $header_logout.'</div>';
|
||||||
}
|
}
|
||||||
@ -916,6 +925,46 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||||||
|
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
|
|
||||||
|
<?php if (enterprise_installed() === false) { ?>
|
||||||
|
$('.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"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
// Check new notifications on a periodic way
|
// Check new notifications on a periodic way
|
||||||
setInterval(check_new_notifications, 60000);
|
setInterval(check_new_notifications, 60000);
|
||||||
|
|
||||||
|
@ -875,6 +875,7 @@ function menu_pepare_acl_select_data($pages, $sec)
|
|||||||
if (is_ajax()) {
|
if (is_ajax()) {
|
||||||
$about = (bool) get_parameter('about');
|
$about = (bool) get_parameter('about');
|
||||||
$about_operation = (bool) get_parameter('about_operation');
|
$about_operation = (bool) get_parameter('about_operation');
|
||||||
|
$why_enterprise = (bool) get_parameter('why_enterprise');
|
||||||
if ($about) {
|
if ($about) {
|
||||||
global $config;
|
global $config;
|
||||||
global $pandora_version;
|
global $pandora_version;
|
||||||
@ -1370,4 +1371,50 @@ if (is_ajax()) {
|
|||||||
|
|
||||||
echo $dialog;
|
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 = ' <i>'.$config['lts_name'].'</i>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$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 = '
|
||||||
|
<div id="about-tabs" class="overflow-hidden">
|
||||||
|
<div id="tab-general-view">
|
||||||
|
<table class="table-about">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 40%; border: 0px;">
|
||||||
|
<a href="https://pandorafms.com/" target="_blank">
|
||||||
|
<img src="'.$image_about.'" alt="logo" width="50%">
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th style="width: 60%; text-align: left; border: 0px;">
|
||||||
|
<h1>'.$product_name.'</h1>
|
||||||
|
<p><span>'.__('Version').' '.$pandora_version.$lts_name.' - '.(enterprise_installed() ? 'Enterprise' : 'Community').'</span></p>
|
||||||
|
<p>'.__('You are using the free, OpenSource version of Pandora FMS.').'</p>
|
||||||
|
<p>'.__('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.').'</p>
|
||||||
|
<p><span><a href="'.$url_why_enterprise.'">'.__('Click on this link for more information.').'</a></span></p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p class="trademark-copyright">Trademark and copyright 2004 - '.date('Y').' <a href="https://pandorafms.com/" target="_blank">Pandora FMS</a>. All rights reserved</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
';
|
||||||
|
|
||||||
|
echo $dialog;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8764,6 +8764,10 @@ div.graph div.legend table {
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.underline-hover:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
.w105px {
|
.w105px {
|
||||||
width: 105px;
|
width: 105px;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user