|
|
@@ -107,10 +107,11 @@ class GeneralSection extends BaseSection
|
|
|
$field->addValidator(new NumberValidator($this->resourceManager->vcpus()->getMin(), $this->resourceManager->vcpus()->free(),true));
|
|
|
$field->setDescription('description');
|
|
|
} else {
|
|
|
- $field = new Range('vcpus',$this->resourceManager->vcpus()->getMin(), $this->resourceManager->vcpus()->free());
|
|
|
- $field->addValidator(new NumberValidator($this->resourceManager->vcpus()->getMin(), $this->resourceManager->vcpus()->free(),true));
|
|
|
- $field->setDescription('description');
|
|
|
+ $field = new Range('vcpus',$vm->config(['vcpus']), $this->resourceManager->vcpus()->free());
|
|
|
+ $field->addValidator(new NumberValidator($vm->config(['vcpus']), $this->resourceManager->vcpus()->free(),true));
|
|
|
+ $field->setDescription('Zur Reduzierung der CPUs muß die VM heruntergefahren sein!');
|
|
|
}
|
|
|
+ $field->setDefaultValue($vm->config()['vcpus']);
|
|
|
$this->addField($field);
|
|
|
}
|
|
|
//cpu priority
|
|
|
@@ -143,14 +144,13 @@ class GeneralSection extends BaseSection
|
|
|
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($vm->config()['memory']);
|
|
|
$field->setDescription('description');
|
|
|
} else {
|
|
|
$field = new Range('memory', $vm->config()['memory'], $this->resourceManager->memory()->free());
|
|
|
$field->addValidator(new NumberValidator($vm->config()['memory'], $this->resourceManager->memory()->free(),true));
|
|
|
- $field->setDefaultValue($vm->config()['memory']);
|
|
|
$field->setDescription('Zur Speicherreduzierung muß die VM heruntergefahren sein!');
|
|
|
}
|
|
|
+ $field->setDefaultValue($vm->config()['memory']);
|
|
|
$this->addField($field);
|
|
|
/**
|
|
|
* @deprecated
|