|
|
@@ -65,32 +65,9 @@ class VmsDataTable extends DataTable implements ClientArea, AdminArea
|
|
|
$createButton->setRawUrl($url);
|
|
|
$createButton->setIcon('lu-zmdi lu-zmdi-plus');
|
|
|
$createButton->replaceClasses(['lu-btn lu-btn--primary']);
|
|
|
- if($resurceManager->disk()->free() < $resurceManager->disk()->getMin()) {
|
|
|
+ if($resurceManager->disk()->free() < $resurceManager->disk()->getMin() || $resurceManager->vcpus()->free() < $resurceManager->vcpus()->getMin() || $resurceManager->memory()->free() < $resurceManager->memory()->getMin()) {
|
|
|
$createButton->addHtmlAttribute("disabled",true);
|
|
|
}
|
|
|
-
|
|
|
- logModuleCall(
|
|
|
- 'proxmoxCloud',
|
|
|
- __FUNCTION__,
|
|
|
- $resurceManager->vcpus()->free(),
|
|
|
- 'vcpus',
|
|
|
- $resurceManager->vcpus()->getMin()
|
|
|
- );
|
|
|
- logModuleCall(
|
|
|
- 'proxmoxCloud',
|
|
|
- __FUNCTION__,
|
|
|
- $resurceManager->memory()->free(),
|
|
|
- 'memory',
|
|
|
- $resurceManager->memory()->getMin()
|
|
|
- );
|
|
|
- logModuleCall(
|
|
|
- 'proxmoxCloud',
|
|
|
- __FUNCTION__,
|
|
|
- $resurceManager->disk()->free(),
|
|
|
- 'vcpus',
|
|
|
- $resurceManager->disk()->getMin()
|
|
|
- );
|
|
|
-
|
|
|
$this->addTitleButton($createButton);
|
|
|
}
|
|
|
//import
|