mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch 'ent-11567-ventana-about' into 'develop'
Ent 11567 ventana about See merge request artica/pandorafms!6138
This commit is contained in:
commit
cd668590bd
@ -349,7 +349,7 @@ echo '</div>';
|
|||||||
const id = table_hover[0].id;
|
const id = table_hover[0].id;
|
||||||
const classes = $(`#${id}`).attr('class');
|
const classes = $(`#${id}`).attr('class');
|
||||||
|
|
||||||
if (id === 'icon_about') {
|
if (id === 'icon_about' || id === 'icon_about_operation') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,8 +458,9 @@ function menu_print_menu(&$menu)
|
|||||||
($main['sec2'] ?? null),
|
($main['sec2'] ?? null),
|
||||||
]
|
]
|
||||||
) === false
|
) === false
|
||||||
|
|| $mainsec === 'about_operation'
|
||||||
) {
|
) {
|
||||||
if ($count_sub_access > 0) {
|
if ($count_sub_access > 0 || $mainsec === 'about_operation') {
|
||||||
// If any susection have access but main section not, we change main link to first subsection found
|
// If any susection have access but main section not, we change main link to first subsection found
|
||||||
$main['sec2'] = $first_sub_sec2;
|
$main['sec2'] = $first_sub_sec2;
|
||||||
} else {
|
} else {
|
||||||
@ -484,7 +485,7 @@ function menu_print_menu(&$menu)
|
|||||||
if ($menuTypeClass === 'collapsed') {
|
if ($menuTypeClass === 'collapsed') {
|
||||||
$div = '<div class="icon_'.$id.' w100p"></div><span class="w55p" style="display: none">'.$main['text'].'</span><div class="arrow_menu_down w30p" style="display: none"></div>';
|
$div = '<div class="icon_'.$id.' w100p"></div><span class="w55p" style="display: none">'.$main['text'].'</span><div class="arrow_menu_down w30p" style="display: none"></div>';
|
||||||
} else {
|
} else {
|
||||||
if ($id === 'about') {
|
if ($id === 'about' || $id === 'about_operation') {
|
||||||
$div = '<div class="icon_'.$id.' w15p"></div><span class="w55p">'.$main['text'].'</span>';
|
$div = '<div class="icon_'.$id.' w15p"></div><span class="w55p">'.$main['text'].'</span>';
|
||||||
} else {
|
} else {
|
||||||
$div = '<div class="icon_'.$id.' w15p"></div><span class="w55p">'.$main['text'].'</span><div class="arrow_menu_down w30p"></div>';
|
$div = '<div class="icon_'.$id.' w15p"></div><span class="w55p">'.$main['text'].'</span><div class="arrow_menu_down w30p"></div>';
|
||||||
@ -861,12 +862,18 @@ 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');
|
||||||
if ($about) {
|
if ($about) {
|
||||||
global $config;
|
global $config;
|
||||||
global $pandora_version;
|
global $pandora_version;
|
||||||
global $build_version;
|
global $build_version;
|
||||||
$product_name = io_safe_output(get_product_name());
|
$product_name = io_safe_output(get_product_name());
|
||||||
$license_expiry_date = substr($config['license_expiry_date'], 0, 4).'/'.substr($config['license_expiry_date'], 4, 2).'/'.substr($config['license_expiry_date'], 6, 2);
|
$license_expiry_date = substr($config['license_expiry_date'], 0, 4).'/'.substr($config['license_expiry_date'], 4, 2).'/'.substr($config['license_expiry_date'], 6, 2);
|
||||||
|
$license_expired = false;
|
||||||
|
$timestamp = strtotime($license_expiry_date);
|
||||||
|
if ($timestamp < time() || enterprise_installed() === false) {
|
||||||
|
$license_expired = true;
|
||||||
|
}
|
||||||
|
|
||||||
include_once $config['homedir'].'/include/class/Diagnostics.class.php';
|
include_once $config['homedir'].'/include/class/Diagnostics.class.php';
|
||||||
$d = new Diagnostics;
|
$d = new Diagnostics;
|
||||||
@ -954,14 +961,28 @@ if (is_ajax()) {
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 40%; border: 0px;">
|
<th style="width: 40%; border: 0px;">
|
||||||
<img src="'.$image_about.'" alt="logo" width="70%">
|
<a href="https://pandorafms.com/" target="_blank">
|
||||||
|
<img src="'.$image_about.'" alt="logo" width="70%">
|
||||||
|
</a>
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 60%; text-align: left; border: 0px;">
|
<th style="width: 60%; text-align: left; border: 0px;">
|
||||||
<h1>'.$product_name.'</h1>
|
<h1>'.$product_name.'</h1>
|
||||||
<p><span>'.__('Version').' '.$pandora_version.$lts_name.' - '.(enterprise_installed() ? 'Enterprise' : 'Community').'</span></p>
|
<p><span>'.__('Version').' '.$pandora_version.$lts_name.' - '.(enterprise_installed() ? 'Enterprise' : 'Community').'</span></p>
|
||||||
<p><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
|
<p><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
|
||||||
<p><span>Build</span>'.$build_version.'</p>
|
<p><span>Build</span>'.$build_version.'</p>';
|
||||||
<p style="margin-bottom: 20px!important;"><span>'.__('Support expires').'</span>'.$license_expiry_date.'</p>';
|
if (enterprise_installed() === true) {
|
||||||
|
$dialog .= '<p><span>'.__('Support expires').'</span>'.$license_expiry_date.'</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($license_expired === false) {
|
||||||
|
$dialog .= '<p>'.__('This system has official support, warranty and official updates.').'</p>';
|
||||||
|
} else if (enterprise_installed() === true) {
|
||||||
|
$dialog .= '<p><span>'.__('This system has no active support contract, and has no support, upgrades or warranty.').'</span></p>';
|
||||||
|
$dialog .= '<p><b><a href="https://pandorafms.com/contact/" target="_blank">'.__('Contact Pandora FMS for expand your support contract.').'</a></b></p>';
|
||||||
|
} else {
|
||||||
|
$dialog .= '<p><span>'.__('The OpenSource version has no support or warranty of any kind.').'</span></p>';
|
||||||
|
$dialog .= '<p><b><a href="https://pandorafms.com/contact/" target="_blank">'.__('Contact Pandora FMS for official support contract.').'</a></b></p>';
|
||||||
|
}
|
||||||
|
|
||||||
if (((bool) check_acl($config['id_user'], 0, 'PM') === true) && (is_metaconsole() === false)) {
|
if (((bool) check_acl($config['id_user'], 0, 'PM') === true) && (is_metaconsole() === false)) {
|
||||||
$dialogButtons = [];
|
$dialogButtons = [];
|
||||||
@ -1004,7 +1025,7 @@ if (is_ajax()) {
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p class="trademark-copyright">Trademark and copyright 2004 - '.date('Y').' Pandora FMS. All rights reserved</p>
|
<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>
|
||||||
<div id="tab-database" class="div-scroll">
|
<div id="tab-database" class="div-scroll">
|
||||||
<table class="table-about">
|
<table class="table-about">
|
||||||
@ -1224,4 +1245,104 @@ if (is_ajax()) {
|
|||||||
|
|
||||||
echo $dialog;
|
echo $dialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($about_operation) {
|
||||||
|
global $config;
|
||||||
|
global $pandora_version;
|
||||||
|
global $build_version;
|
||||||
|
$product_name = io_safe_output(get_product_name());
|
||||||
|
$license_expiry_date = substr($config['license_expiry_date'], 0, 4).'/'.substr($config['license_expiry_date'], 4, 2).'/'.substr($config['license_expiry_date'], 6, 2);
|
||||||
|
$license_expired = false;
|
||||||
|
$timestamp = strtotime($license_expiry_date);
|
||||||
|
if ($timestamp < time() || enterprise_installed() === false) {
|
||||||
|
$license_expired = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$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.png', false, false, false);
|
||||||
|
if (enterprise_installed() === false) {
|
||||||
|
if ($config['style'] === 'pandora_black') {
|
||||||
|
$image_about = 'images/custom_logo/'.HEADER_LOGO_BLACK_CLASSIC;
|
||||||
|
} else if ($config['style'] === 'pandora') {
|
||||||
|
$image_about = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_CLASSIC;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($config['style'] === 'pandora_black' && $config['custom_logo'] === HEADER_LOGO_DEFAULT_CLASSIC) {
|
||||||
|
$config['custom_logo'] = HEADER_LOGO_BLACK_CLASSIC;
|
||||||
|
} else if ($config['style'] === 'pandora' && $config['custom_logo'] === HEADER_LOGO_BLACK_CLASSIC) {
|
||||||
|
$config['custom_logo'] = HEADER_LOGO_DEFAULT_CLASSIC;
|
||||||
|
}
|
||||||
|
|
||||||
|
$image_about = 'images/custom_logo/'.$config['custom_logo'];
|
||||||
|
|
||||||
|
if (file_exists(ENTERPRISE_DIR.'/'.$image_about) === true) {
|
||||||
|
$image_about = ENTERPRISE_DIR.'/'.$image_about;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$image_about = ui_get_full_url('/enterprise/images/custom_logo/pandoraFMS_metaconsole_full.svg', false, false, false);
|
||||||
|
|
||||||
|
if ($config['meta_custom_logo'] === 'pandoraFMS_metaconsole_full.svg') {
|
||||||
|
$image_about = 'images/custom_logo/'.$config['meta_custom_logo'];
|
||||||
|
} else {
|
||||||
|
$image_about = '../images/custom_logo/'.$config['meta_custom_logo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_exists(ENTERPRISE_DIR.'/'.$image_about) === true) {
|
||||||
|
$image_about = $image_about;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$dialog = '
|
||||||
|
<div id="about-tabs" class="invisible overflow-hidden">
|
||||||
|
<ul>
|
||||||
|
<li class="ui-tabs-close-button" style="float:right!important;">
|
||||||
|
<img id="about-close" style="cursor: pointer;" src="'.ui_get_full_url('/include/styles/images/dialog-titlebar-close.png', false, false, false).'" alt="'.__('Close').'" title="'.__('Close').'" width="25px">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<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="70%">
|
||||||
|
</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><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
|
||||||
|
<p><span>Build</span>'.$build_version.'</p>';
|
||||||
|
if (enterprise_installed() === true) {
|
||||||
|
$dialog .= '<p><span>'.__('Support expires').'</span>'.$license_expiry_date.'</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($license_expired === false) {
|
||||||
|
$dialog .= '<p>'.__('This system has official support, warranty and official updates.').'</p>';
|
||||||
|
} else if (enterprise_installed() === true) {
|
||||||
|
$dialog .= '<p><span>'.__('This system has no active support contract, and has no support, upgrades or warranty.').'</span></p>';
|
||||||
|
$dialog .= '<p><b><a href="https://pandorafms.com/contact/" target="_blank">'.__('Contact Pandora FMS for expand your support contract.').'</a></b></p>';
|
||||||
|
} else {
|
||||||
|
$dialog .= '<p><span>'.__('The OpenSource version has no support or warranty of any kind.').'</span></p>';
|
||||||
|
$dialog .= '<p><b><a href="https://pandorafms.com/contact/" target="_blank">'.__('Contact Pandora FMS for official support contract.').'</a></b></p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$dialog .= '</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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2308,16 +2308,21 @@ var formatterDataVerticalBar = function(value, ctx) {
|
|||||||
|
|
||||||
// Show about section
|
// Show about section
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#icon_about").click(function() {
|
$("[id^='icon_about']").click(function() {
|
||||||
$("#icon_about").addClass("selected");
|
$("[id^='icon_about']").addClass("selected");
|
||||||
// Hidden tips modal.
|
// Hidden tips modal.
|
||||||
$(".window").css("display", "none");
|
$(".window").css("display", "none");
|
||||||
|
|
||||||
|
var type_about = "about_operation";
|
||||||
|
if ($(this).attr("id") === "icon_about") {
|
||||||
|
type_about = "about";
|
||||||
|
}
|
||||||
|
|
||||||
jQuery.post(
|
jQuery.post(
|
||||||
"ajax.php",
|
"ajax.php",
|
||||||
{
|
{
|
||||||
page: "include/functions_menu",
|
page: "include/functions_menu",
|
||||||
about: "true"
|
[type_about]: "true"
|
||||||
},
|
},
|
||||||
function(data) {
|
function(data) {
|
||||||
$("div.ui-dialog").remove();
|
$("div.ui-dialog").remove();
|
||||||
@ -2331,35 +2336,66 @@ $(document).ready(function() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
function openAbout() {
|
function openAbout(section = "management") {
|
||||||
$("#about-tabs").dialog({
|
if (section === "management") {
|
||||||
// title: "About",
|
$("#about-tabs").dialog({
|
||||||
resizable: false,
|
// title: "About",
|
||||||
draggable: false,
|
resizable: false,
|
||||||
modal: true,
|
draggable: false,
|
||||||
show: {
|
modal: true,
|
||||||
effect: "fade",
|
show: {
|
||||||
duration: 200
|
effect: "fade",
|
||||||
},
|
duration: 200
|
||||||
hide: {
|
},
|
||||||
effect: "fade",
|
hide: {
|
||||||
duration: 200
|
effect: "fade",
|
||||||
},
|
duration: 200
|
||||||
closeOnEscape: true,
|
},
|
||||||
width: 700,
|
closeOnEscape: true,
|
||||||
height: 450,
|
width: 700,
|
||||||
|
height: 450,
|
||||||
|
|
||||||
create: function() {
|
create: function() {
|
||||||
$("#about-tabs").tabs({});
|
$("#about-tabs").tabs({});
|
||||||
$(".ui-dialog-titlebar").remove();
|
$(".ui-dialog-titlebar").remove();
|
||||||
|
|
||||||
$("#about-close").click(function() {
|
$("#about-close").click(function() {
|
||||||
$("#about-tabs").dialog("close");
|
$("#about-tabs").dialog("close");
|
||||||
$("div.ui-dialog").remove();
|
$("div.ui-dialog").remove();
|
||||||
$("#icon_about").removeClass("selected");
|
$("#icon_about").removeClass("selected");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else if (section === "operation") {
|
||||||
|
$("#about-tabs").dialog({
|
||||||
|
// title: "About",
|
||||||
|
resizable: false,
|
||||||
|
draggable: false,
|
||||||
|
modal: true,
|
||||||
|
show: {
|
||||||
|
effect: "fade",
|
||||||
|
duration: 200
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
effect: "fade",
|
||||||
|
duration: 200
|
||||||
|
},
|
||||||
|
closeOnEscape: true,
|
||||||
|
width: 700,
|
||||||
|
height: 450,
|
||||||
|
|
||||||
|
create: function() {
|
||||||
|
$("#about-tabs").tabs({});
|
||||||
|
$(".ui-dialog-titlebar").remove();
|
||||||
|
|
||||||
|
$("#about-close").click(function() {
|
||||||
|
$("#about-tabs").dialog("close");
|
||||||
|
$("div.ui-dialog").remove();
|
||||||
|
$("#icon_about_operation").removeClass("selected");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -357,6 +357,11 @@
|
|||||||
background-size: 18px;
|
background-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon_about_operation {
|
||||||
|
background: url(../../images/menu/about.svg) no-repeat 50% 50%;
|
||||||
|
background-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
#menu_container {
|
#menu_container {
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -825,9 +825,10 @@ if ($access_console_node === true) {
|
|||||||
// ~ }
|
// ~ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$menu_operation['about_operation']['text'] = __('About');
|
||||||
|
$menu_operation['about_operation']['id'] = 'about_operation';
|
||||||
|
|
||||||
|
// Save operation menu array to use in operation/extensions.php view.
|
||||||
// Save operation menu array to use in operation/extensions.php view
|
|
||||||
$operation_menu_array = $menu_operation;
|
$operation_menu_array = $menu_operation;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user