andre пре 4 година
родитељ
комит
38a7115378
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      app/UI/VmUpdate/Sections/Qemu/GeneralSection.php

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

@@ -117,8 +117,9 @@ class GeneralSection extends BaseSection
             $this->addField($field);
             $this->addField($field);
         }
         }
         //memory
         //memory
-        $field = new Text('memory');
+        $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->addValidator(new NumberValidator($this->resourceManager->memory()->getMin(), $this->resourceManager->memory()->free(),true));
+        $field->setDefaultValue($this->configuration()->serverMemory->min);
         $field->setDescription('description');
         $field->setDescription('description');
         $this->addField($field);
         $this->addField($field);
         if($this->configuration()->isDetailsCombinedView()){
         if($this->configuration()->isDetailsCombinedView()){