| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- namespace ModulesGarden\Servers\ProxmoxVps\App\UI\Admin\Product\Sections\Qemu;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Interfaces\AdminArea;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Fields\Select;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Fields\Switcher;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Fields\Text;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Fields\Textarea;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\BoxSection;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\HalfPageSection;
- class AdvancedSection extends BoxSection implements AdminArea
- {
- protected $id = 'advancedSection';
- protected $name = 'advancedSection';
- protected $title = 'advancedSection';
- /**
- * @var HalfPageSection
- */
- private $leftSection;
- /**
- * @var HalfPageSection
- */
- private $rightSection;
- public function initContent()
- {
- $this->leftSection = new HalfPageSection('leftSection');
- $this->rightSection = new HalfPageSection('rightSection');
- $this->addSection($this->leftSection)
- ->addSection($this->rightSection);
- $this->initFields();
- }
- private function initFields()
- {
- //Minimum RAM For The VM
- $field = new Text('customconfigoption[balloon]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //Memory Shares
- $field = new Text('customconfigoption[shares]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //Arguments-
- $field = new Textarea('customconfigoption[args]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //Local Time For Real Time Clock
- $field = new Switcher('customconfigoption[localtime]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //Maximum Tolerated Downtime
- $field = new Text('customconfigoption[migrate_downtime]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //Maximum Speed For Migrations [MB/s]
- $field = new Text('customconfigoption[migrate_speed]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //Hardware Watchdog Device
- $field = new Text('customconfigoption[watchdog]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //Initial Date Of The Real Time Clock
- $field = new Text('customconfigoption[startdate]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //Startup
- $field = new Text('customconfigoption[startup]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //Time Drift Fix
- $field = new Switcher('customconfigoption[tdf]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //bwlimit
- $field = new Text('customconfigoption[bwlimit]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //bios
- $field = new Select('customconfigoption[bios]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //machine
- $field = new Select('customconfigoption[machine]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- }
- }
|