/
_config.html.erb
41 lines (36 loc) · 2.61 KB
/
_config.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<%# Copyright 2018 Tristan Robert
This file is part of ForemanFogProxmox.
ForemanFogProxmox is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ForemanFogProxmox is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
<%= javascript_include_tag 'foreman_fog_proxmox/proxmox_vm_container', "data-turbolinks-track" => true %>
<% container = type == 'lxc' %>
<%= field_set_tag n_("Main option", "Main options", 2), :id => "container_config_options", :class => 'hide', :disabled => !container do %>
<%= textarea_f f, :description, :label => _('Description'), :label_size => "col-md-2" %>
<%= checkbox_f f, :onboot, :label => _('Start at boot') %>
<% end %>
<%= field_set_tag _("CPU"), :id => "container_config_cpu", :class => 'hide', :disabled => !container do %>
<%= select_f f, :arch, proxmox_archs_map, :id, :name, { }, :label => _('Architecture'), :label_size => "col-md-2" %>
<%= counter_f f, :cores, :class => "input-mini", :label => _('Cores'), :label_size => "col-md-2" %>
<%= counter_f f, :cpulimit, :class => "input-mini", :label => _('CPU limit'), :label_size => "col-md-2" %>
<%= counter_f f, :cpuunits, :class => "input-mini", :label => _('CPU units'), :label_size => "col-md-2" %>
<% end %>
<%= field_set_tag _("Memory"), :id => "container_config_memory", :class => 'hide', :disabled => !container do %>
<%= byte_size_f f, :memory, :class => "input-mini", :label => _('Memory'), :label_size => "col-md-2" %>
<%= byte_size_f f, :swap, :class => "input-mini", :label => _('Swap'), :label_size => "col-md-2" %>
<% end %>
<%= field_set_tag _("DNS"), :id => "container_config_dns", :class => 'hide', :disabled => !container do %>
<%= text_f f, :hostname, :label => _('Hostname'), :label_size => "col-md-2", :disabled => true %>
<%= text_f f, :nameserver, :label => _('DNS server'), :label_size => "col-md-2" %>
<%= text_f f, :searchdomain, :label => _('Search domain'), :label_size => "col-md-2" %>
<% end %>
<%= field_set_tag _("Operating System"), :id => "container_config_os", :class => 'hide', :disabled => !container do %>
<%= select_f f, :ostype, proxmox_ostypes_map, :id, :name, { }, :label => _('OS type'), :label_size => "col-md-2" %>
<% end %>