ConfigurationSection.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php
  2. namespace ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Admin\Product\Sections\Lxc;
  3. use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Admin\Product\Sections\TwiceColumnSection;
  4. use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\AdminArea;
  5. use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Select;
  6. use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Switcher;
  7. use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Text;
  8. class ConfigurationSection extends TwiceColumnSection implements AdminArea
  9. {
  10. protected $id = 'lxcConfigurationSection';
  11. protected $name = 'lxcConfigurationSection';
  12. protected $title = 'lxcConfigurationSection';
  13. protected function initFields()
  14. {
  15. //Storage
  16. $field = new Select('customconfigoption[storage]');
  17. $field->setDescription('tip');
  18. $this->addField($field);
  19. //OS Architecture Type
  20. $field = new Select('customconfigoption[arch]');
  21. $field->setDescription('tip');
  22. $this->addField($field);
  23. //Console Type
  24. $field = new Select('customconfigoption[cmode]');
  25. $field->setDescription('tip');
  26. $this->addField($field);
  27. //Console
  28. $field = new Switcher('customconfigoption[console]');
  29. $field->setDescription('tip');
  30. $field->setDefaultValue("on");
  31. $this->addField($field);
  32. //OS Type
  33. $field = new Select('customconfigoption[ostype]');
  34. $field->setDescription('tip');
  35. $this->addField($field);
  36. //Start At Boot
  37. $field = new Switcher('customconfigoption[onboot]');
  38. $this->addField($field);
  39. //Add The VM To The Specific Pool
  40. $field = new Select('customconfigoption[pool]');
  41. $field->setDescription('tip');
  42. $this->addField($field);
  43. //Protection
  44. $field = new Switcher('customconfigoption[protection]');
  45. $field->setDescription('tip');
  46. $this->addField($field);
  47. //Startup
  48. $field = new Text('customconfigoption[startup]');
  49. $field->setDescription('tip');
  50. $this->addField($field);
  51. //Amount of tty For The VM
  52. $field = new Text('customconfigoption[tty]');
  53. $field->setDescription('tip');
  54. $this->addField($field);
  55. //Unprivileged
  56. $field = new Switcher('customconfigoption[unprivileged]');
  57. $field->setDescription('tip');
  58. $this->addField($field);
  59. //SSH Key Pairs
  60. $field = new Switcher('customconfigoption[sshKeyPairs]');
  61. $field->setDescription('tip');
  62. $this->addField($field);
  63. //Delete Private Key
  64. $field = new Switcher('customconfigoption[sshDeletePrivateKey]');
  65. $field->setDescription('tip');
  66. $this->addField($field);
  67. //Start after created
  68. $field = new Switcher('customconfigoption[start]');
  69. $field->setDescription('tip');
  70. $this->addField($field);
  71. //featureKeyctl
  72. $field = new Switcher('customconfigoption[featureKeyctl]');
  73. $field->setDescription('tip');
  74. $this->addField($field);
  75. //featureNesting
  76. $field = new Switcher('customconfigoption[featureNesting]');
  77. $field->setDescription('tip');
  78. $this->addField($field);
  79. //featureNfs
  80. $field = new Switcher('customconfigoption[featureNfs]');
  81. $field->setDescription('tip');
  82. $this->addField($field);
  83. //featureCifs
  84. $field = new Switcher('customconfigoption[featureCifs]');
  85. $field->setDescription('tip');
  86. $this->addField($field);
  87. //featureFuse
  88. $field = new Switcher('customconfigoption[featureFuse]');
  89. $field->setDescription('tip');
  90. $this->rightSection->addField($field);
  91. //featureMknod
  92. $field = new Switcher('customconfigoption[featureMknod]');
  93. $field->setDescription('tip');
  94. $this->rightSection->addField($field);
  95. }
  96. }