Browse Source

bugfix backupswitcher for root disk, remove debug log calls

andre 4 years ago
parent
commit
4773a4a57c

+ 0 - 1
app/UI/Disk/Forms/UpdateForm.php

@@ -55,7 +55,6 @@ class UpdateForm extends BaseForm implements ClientArea
         }
         $backupSwitcher = $this->getField('backup');
         if ( parent::getFormData()['id'] == 'scsi0') {
-//            $backupSwitcher->addHtmlAttribute(':disabled', true);
             $backupSwitcher->addClass('hidden');
         }
 

+ 1 - 19
app/UI/Disk/Providers/DiskProvider.php

@@ -79,15 +79,6 @@ class DiskProvider extends BaseDataProvider implements ClientArea
         $hdd->setCache($this->configuration()->getAdditionalDiskCache());
         //ssd
         $hdd->setSsd($this->configuration()->isAdditionalDiskSsd() ? 1 : null);
-
-        logModuleCall(
-            'proxmoxCloud',
-            __FUNCTION__,
-            $hdd,
-            'Debug',
-            $hdd->getSsd()
-        );
-
         //replicate
         if ($this->configuration()->isAdditionalDiskReplicate())
         {
@@ -140,7 +131,7 @@ class DiskProvider extends BaseDataProvider implements ClientArea
         }
         $vmModel->save();
         //backup
-        $backup = $this->formData['backup'] == "on" ? 1 : 0;
+        $backup = $this->formData['backup'] == "on" ? null : 0;
         $hdd->setBackup($backup)->update();
 /* thurdata no auto reboot
         if ($vm->isRunning() &&
@@ -174,15 +165,6 @@ class DiskProvider extends BaseDataProvider implements ClientArea
         $hdd->delete();
         unset($this->vm);
         foreach($vm->getUnusedHardDisks() as $hd){
-
-            logModuleCall(
-                'proxmoxCloud',
-                __FUNCTION__,
-                $hd->getName(),
-                'Debug',
-                $hd
-            );
-            
             if($hd->isMaster()){
                 continue;
             }

+ 1 - 10
app/UI/VmUpdate/Sections/Qemu/GeneralSection.php

@@ -125,19 +125,10 @@ class GeneralSection extends BaseSection
             $this->addField($field);
         }
         //memory
-
-        logModuleCall(
-            'proxmoxCloud',
-            __FUNCTION__,
-            $vm->status(),
-            'Debug',
-            $this->configuration()->serverMemory->min
-        );
-
         if(!$vm->isRunning()) {
             $field = new Range('memory', $this->resourceManager->memory()->getMin(), $this->resourceManager->memory()->free());
             $field->addValidator(new NumberValidator($this->resourceManager->memory()->getMin(), $this->resourceManager->memory()->free(),true));
-            $field->setDefaultValue($this->configuration()->serverMemory->min);
+            $field->setDefaultValue($vm->config()['memory']);
             $field->setDescription('description');
         } else {
             $field = new Range('memory', $vm->config()['memory'], $this->resourceManager->memory()->free());