diff --git a/pandora_console/godmode/um_client/index.php b/pandora_console/godmode/um_client/index.php index 156e76a0f2..f3e48f9f3d 100644 --- a/pandora_console/godmode/um_client/index.php +++ b/pandora_console/godmode/um_client/index.php @@ -91,7 +91,7 @@ if ($license_data !== ENTERPRISE_NOT_HOOK && $license !== 'PANDORA-ENTERPRISE-FR $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( __( '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.', diff --git a/pandora_console/update_manager_client/lib/UpdateManager/Client.php b/pandora_console/update_manager_client/lib/UpdateManager/Client.php index 4dd1b81d0e..3a2aef5dd9 100644 --- a/pandora_console/update_manager_client/lib/UpdateManager/Client.php +++ b/pandora_console/update_manager_client/lib/UpdateManager/Client.php @@ -654,6 +654,17 @@ class Client } + /** + * Return license. + * + * @return string|null + */ + public function getLicense() + { + return $this->license; + } + + /** * Executes a curl request. * diff --git a/pandora_console/update_manager_client/lib/UpdateManager/UI/Manager.php b/pandora_console/update_manager_client/lib/UpdateManager/UI/Manager.php index 8dd12e745f..76b8897979 100644 --- a/pandora_console/update_manager_client/lib/UpdateManager/UI/Manager.php +++ b/pandora_console/update_manager_client/lib/UpdateManager/UI/Manager.php @@ -292,21 +292,23 @@ class Manager */ public function register() { - View::render( - 'register', - [ - 'version' => $this->umc->getVersion(), - 'mr' => $this->umc->getMR(), - 'error' => $this->umc->getLastError(), - 'asset' => function ($rp) { - echo $this->getUrl($rp); - }, - 'authCode' => $this->authCode, - 'ajax' => $this->ajaxUrl, - 'ajaxPage' => $this->ajaxPage, - 'mode' => self::MODE_REGISTER, - ] - ); + if ($this->umc->getLicense() !== 'PANDORA-ENTERPRISE-FREE') { + View::render( + 'register', + [ + 'version' => $this->umc->getVersion(), + 'mr' => $this->umc->getMR(), + 'error' => $this->umc->getLastError(), + 'asset' => function ($rp) { + echo $this->getUrl($rp); + }, + 'authCode' => $this->authCode, + 'ajax' => $this->ajaxUrl, + 'ajaxPage' => $this->ajaxPage, + 'mode' => self::MODE_REGISTER, + ] + ); + } } diff --git a/pandora_console/update_manager_client/resources/styles/um.css b/pandora_console/update_manager_client/resources/styles/um.css index 056a2bc926..d7bf314192 100644 --- a/pandora_console/update_manager_client/resources/styles/um.css +++ b/pandora_console/update_manager_client/resources/styles/um.css @@ -451,6 +451,10 @@ span.warning { align-items: center; justify-content: space-between; } + +.ui-dialog-content.ui-widget-content#register_dialog_message { + display: inherit; +} /*.ui-dialog-content.ui-widget-content p { font-size: 10pt; word-break: keep-all;