#13312 fixed limit and about message 2

This commit is contained in:
Daniel Maya 2024-05-16 17:44:51 +02:00
parent 8e967bea36
commit cfde0cd8bb
2 changed files with 27 additions and 2 deletions

View File

@ -1082,6 +1082,21 @@ class ConsoleSupervisor
global $config;
if (license_enterprise_free() === true) {
if (isset($config['limit_exceeded']) === true && (int) $config['limit_exceeded'] === 1) {
update_config_token('limit_exceeded', 0);
$message = __('When the limit is exceeded the system automatically deactivates the latest agents and modules exceeding license.');
$this->notify(
[
'type' => 'NOTIF.LICENSE.LIMITED',
'title' => __('You have exceeded the limit of the free version'),
'message' => $message,
'url' => '__url__/index.php?sec=gagente&sec2=godmode/agentes/modificar_agente',
]
);
}
return true;
}

View File

@ -909,6 +909,11 @@ if (is_ajax()) {
$license_expired = true;
}
$text = (enterprise_installed()) ? 'Enterprise' : 'Community';
if ($license === 'PANDORA-ENTERPRISE-FREE') {
$text = 'FREE';
}
include_once $config['homedir'].'/include/class/Diagnostics.class.php';
$d = new Diagnostics;
$db_health = json_decode($d->getDatabaseHealthStatus());
@ -971,7 +976,7 @@ if (is_ajax()) {
</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>'.__('Version').' '.$pandora_version.$lts_name.' - '.$text.'</span></p>
<p><span>'.__('Current package').'</span> '.$config['current_package'].'</p>
<p><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
<p><span>Build</span>'.$build_version.'</p>';
@ -1292,6 +1297,11 @@ if (is_ajax()) {
$license_expired = true;
}
$text = (enterprise_installed()) ? 'Enterprise' : 'Community';
if ($license === 'PANDORA-ENTERPRISE-FREE') {
$text = 'FREE';
}
$lts_name = '';
if (empty($config['lts_name']) === false) {
$lts_name = ' <i>'.$config['lts_name'].'</i>';
@ -1317,7 +1327,7 @@ if (is_ajax()) {
</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>'.__('Version').' '.$pandora_version.$lts_name.' - '.$text.'</span></p>
<p><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
<p><span>Build</span>'.$build_version.'</p>';
if (enterprise_installed() === true && $license !== 'PANDORA-ENTERPRISE-FREE') {