<?php


namespace ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Admin\Product\Sections;


use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\AdminArea;
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Text;

class CpuPrioritySection extends TwiceColumnSection implements AdminArea
{

    protected $id = 'cpuPrioritySection';
    protected $name = 'cpuPrioritySection';
    protected $title = 'cpuPrioritySection';


    public function initFields()
    {
        //1: very low-> CPU Units 256, CPU Limits 0.2
        $field = new Text('customconfigoption[cpuunitsPriority1]');
        $field->setDefaultValue(256);
        $field->setDescription('tip');
        $this->addField($field);
        //CPU Limits
        $field = new Text('customconfigoption[cpulimitPriority1]');
        $field->setDefaultValue(0.2);
        $field->setDescription('tip');
        $this->addField($field);
        //2: Low -> CPU Units 512, CPU Limits 0.4
        $field = new Text('customconfigoption[cpuunitsPriority2]');
        $field->setDefaultValue(512);
        $field->setDescription('tip');
        $this->addField($field);
        //CPU Limits
        $field = new Text('customconfigoption[cpulimitPriority2]');
        $field->setDefaultValue(0.4);
        $field->setDescription('tip');
        $this->addField($field);
        //3: Normal -> CPU Units 712, CPU Limits 0.6
        $field = new Text('customconfigoption[cpuunitsPriority3]');
        $field->setDefaultValue(712);
        $field->setDescription('tip');
        $this->addField($field);
        //CPU Limits
        $field = new Text('customconfigoption[cpulimitPriority3]');
        $field->setDefaultValue(0.6);
        $field->setDescription('tip');
        $this->addField($field);
        //4: High -> CPU Units 1024, CPU Limits 0.8
        $field = new Text('customconfigoption[cpuunitsPriority4]');
        $field->setDefaultValue(1024);
        $field->setDescription('tip');
        $this->addField($field);
        //CPU Limits
        $field = new Text('customconfigoption[cpulimitPriority4]');
        $field->setDefaultValue(0.8);
        $field->setDescription('tip');
        $this->addField($field);
        //5: Medium -> CPU Units 1280, CPU Limits 1
        $field = new Text('customconfigoption[cpuunitsPriority5]');
        $field->setDefaultValue(1280);
        $field->setDescription('tip');
        $this->addField($field);
        //CPU Limits
        $field = new Text('customconfigoption[cpulimitPriority5]');
        $field->setDefaultValue(1);
        $field->setDescription('tip');
        $this->addField($field);

    }

}