| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?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\Text;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\BoxSection;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\HalfPageSection;
- class DiskSpeedSection extends BoxSection implements AdminArea
- {
- protected $id = 'diskSpeedSection';
- protected $name = 'diskSpeedSection';
- protected $title = 'diskSpeedSection';
- /**
- * @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()
- {
- //Read Limit (MB/s)
- $field = new Text('customconfigoption[mbps_rd]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //Write Limit (MB/s)
- $field = new Text('customconfigoption[mbps_wr]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //Read Limit (ops/s)
- $field = new Text('customconfigoption[iops_rd]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //Read Max Burst (ops)
- $field = new Text('customconfigoption[iops_rd_max]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //Write Limit (ops/s)
- $field = new Text('customconfigoption[iops_wr]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //Write Max Burst (ops)
- $field = new Text('customconfigoption[iops_wr_max]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- }
- }
|