Project

General

Profile

Download (966 Bytes) Statistics
| Branch: | Tag: | Revision:

foreman_docker / app / views / compute_resources_vms / form / _docker.html.erb @ 401c0065

1
<% javascript 'compute_resource', 'lookup_keys' %>
2
<%= text_f f, :name if show_vm_name? %>
3
<% new = @host.nil? || @host.try(:new_record?) %>
4
<%= select_f f, :image, compute_resource.images, :uuid, :name, {},
5
               {:help_inline => :indicator,
6
               :label       => _('Image') } %>
7
<%= f.hidden_field :template if !new %>
8

    
9
<div class='compute_profile'>
10
  <%= selectable_f f, :cores, 1..compute_resource.max_cpu_count, { }, :class => "col-md-2", :label => _('Cores') %>
11
  <%= selectable_f f, :memory, memory_options(compute_resource.max_memory), { }, :class => "col-md-2", :label => _('Memory') %>
12
</div>
13
<%= text_f f, :cmd, :label => _('Command') %>
14
<% checked = params[:host] && params[:host][:compute_attributes] && params[:host][:compute_attributes][:start] || '1' %>
15
<%= checkbox_f f, :start, { :checked => (checked == '1'), :help_inline => _("Power ON this machine"), :label => _('Start') } if new && controller_name != "compute_attributes" %>