#13312 new free/trial license 6

This commit is contained in:
Daniel Maya 2024-05-14 10:33:13 +02:00
parent c633ca28b4
commit e696567ada
4 changed files with 33 additions and 16 deletions

View File

@ -91,7 +91,7 @@ if ($license_data !== ENTERPRISE_NOT_HOOK && $license !== 'PANDORA-ENTERPRISE-FR
$limit = db_get_value('count(*)', 'tagente_modulo', 'disabled', 0); $limit = db_get_value('count(*)', 'tagente_modulo', 'disabled', 0);
} }
if ($limit > $license_data['limit']) { if (($limit * 1.1) > $license_data['limit']) {
ui_print_warning_message( ui_print_warning_message(
__( __(
'You cannot use update manager %s. You are exceding monitoring limits by %s elements. Please update your license or disable enterprise section by moving enterprise directory to another location and try again.', 'You cannot use update manager %s. You are exceding monitoring limits by %s elements. Please update your license or disable enterprise section by moving enterprise directory to another location and try again.',

View File

@ -654,6 +654,17 @@ class Client
} }
/**
* Return license.
*
* @return string|null
*/
public function getLicense()
{
return $this->license;
}
/** /**
* Executes a curl request. * Executes a curl request.
* *

View File

@ -292,6 +292,7 @@ class Manager
*/ */
public function register() public function register()
{ {
if ($this->umc->getLicense() !== 'PANDORA-ENTERPRISE-FREE') {
View::render( View::render(
'register', 'register',
[ [
@ -308,6 +309,7 @@ class Manager
] ]
); );
} }
}
/** /**

View File

@ -451,6 +451,10 @@ span.warning {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.ui-dialog-content.ui-widget-content#register_dialog_message {
display: inherit;
}
/*.ui-dialog-content.ui-widget-content p { /*.ui-dialog-content.ui-widget-content p {
font-size: 10pt; font-size: 10pt;
word-break: keep-all; word-break: keep-all;