Ver Fonte

update memory slider

andre há 4 anos atrás
pai
commit
38a7115378
1 ficheiros alterados com 2 adições e 1 exclusões
  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);
         }
         //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->setDefaultValue($this->configuration()->serverMemory->min);
         $field->setDescription('description');
         $this->addField($field);
         if($this->configuration()->isDetailsCombinedView()){