| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace ModulesGarden\Servers\ProxmoxVps\App\UI\Admin\Product\Sections;
- 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\Sections\BoxSection;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\HalfPageSection;
- class FirewallSection extends BoxSection implements AdminArea
- {
- protected $id = 'firewallSection';
- protected $name = 'firewallSection';
- protected $title = 'firewallSection';
- /**
- * @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()
- {
- //Interfaces
- $field = new Select('customconfigoption[firewallInterfaces][]');
- $field->setDescription('tip');
- $field->enableMultiple();
- $this->leftSection->addField($field);
- //Firewall Rules Limit
- $field = new Text('customconfigoption[firewallMaxRules]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //IPSet IP Filter
- $field = new Switcher('customconfigoption[ipsetIpFilter]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- }
- }
|