Browse Source

debug additional slider

andre 4 years ago
parent
commit
0c2388d626

+ 11 - 9
app/UI/VmUpdate/Providers/VmUpdateProvider.php

@@ -154,6 +154,17 @@ class VmUpdateProvider extends VmCreateProvider
         $this->getFormDataValues();
         if ($vm instanceof Kvm)
         {
+            //rootDisk
+            $rootDisk = $vm->getMasterHardDisk();
+
+            logModuleCall(
+                'proxmoxCloud',
+                __FUNCTION__,
+                $this->formData,
+                'Debug',
+                $rootDisk
+            );
+            
             //iso
             if ($vm->cdrom())
             {
@@ -313,15 +324,6 @@ class VmUpdateProvider extends VmCreateProvider
         $vm = \ModulesGarden\ProxmoxAddon\Core\Helper\sl('Vm')->getVm();
         $vmModel  = \ModulesGarden\ProxmoxAddon\Core\Helper\sl('Vm')->getVmModel();
         $additonalDiskService = $this->configuration()->isQemu() ? new AdditionalDiskService() : new AdditionalMountPointService();
-
-        logModuleCall(
-            'proxmoxCloud',
-            __FUNCTION__,
-            $this->formData,
-            'Debug',
-            $this->configuration()
-        );
-        
         //Update
         $diskIds=[];
         $resizeTask = null;

+ 2 - 3
app/UI/VmUpdate/Sections/Qemu/GeneralSection.php

@@ -125,11 +125,10 @@ class GeneralSection extends BaseSection
         $this->addField($field);
         if($this->configuration()->isDetailsCombinedView()){
             //disk
-            $field = new Range('disk', $vm->getMasterHddSize(), $this->resourceManager->disk()->free());
-            $field->addValidator(new NumberValidator($vm->getMasterHddSize(), $this->resourceManager->disk()->free(),true));
+            $field = new Range('rootDisk', $vm->getMasterHddSize(), $this->resourceManager->disk()->free());
+            $field->addValidator(new DiskSizeValidator('rootDisk',true));
             $field->setDefaultValue($vm->getMasterHddSize());
             $field->setDescription('description');
-            $field->addHtmlAttribute('@change','submitFormByField($event)');
             $this->addField($field);
         }
         /**