|
@@ -66,6 +66,15 @@ class VmsDataTable extends DataTable implements ClientArea, AdminArea
|
|
|
$createButton->setRawUrl($url);
|
|
$createButton->setRawUrl($url);
|
|
|
$createButton->setIcon('lu-zmdi lu-zmdi-plus');
|
|
$createButton->setIcon('lu-zmdi lu-zmdi-plus');
|
|
|
$createButton->replaceClasses(['lu-btn lu-btn--primary']);
|
|
$createButton->replaceClasses(['lu-btn lu-btn--primary']);
|
|
|
|
|
+
|
|
|
|
|
+ logModuleCall(
|
|
|
|
|
+ 'proxmoxCloud',
|
|
|
|
|
+ __FUNCTION__,
|
|
|
|
|
+ $resurceManager,
|
|
|
|
|
+ 'Debug',
|
|
|
|
|
+ sl("sidebar")->getSidebar("virtualMachinesProxmoxCloudVps")->getChild("vmcreate")
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
//deaktivate createVM Button in case of lack of ressources
|
|
//deaktivate createVM Button in case of lack of ressources
|
|
|
if($resurceManager->disk()->free() < $resurceManager->disk()->getMin() || $resurceManager->vcpus()->free() < $resurceManager->vcpus()->getMin() || $resurceManager->memory()->free() < $resurceManager->memory()->getMin()) {
|
|
if($resurceManager->disk()->free() < $resurceManager->disk()->getMin() || $resurceManager->vcpus()->free() < $resurceManager->vcpus()->getMin() || $resurceManager->memory()->free() < $resurceManager->memory()->getMin()) {
|
|
|
$createButton->addHtmlAttribute("disabled",true);
|
|
$createButton->addHtmlAttribute("disabled",true);
|