foreman/app/views/compute_resources_vms/form/ovirt/_base.html.erb @ 04ae1269
80963357 | Marek Hulan | <%= javascript_tag("$(document).on('ContentLoad', tfm.numFields.initAll)"); %>
|
|
1f71c494 | Tomer Brisker | <%= text_f f, :name, :label => _('Name'), :label_size => "col-md-3" if show_vm_name? %>
|
|
334d0359 | Amos Benari | <% clusters = compute_resource.clusters %>
|
|
<%= select_f f, :cluster, clusters, :id, :name, { },
|
|||
637da2f2 | Timo Goebel | { :disabled => !new_vm, :'data-url' => cluster_selected_compute_resource_path(compute_resource),
|
|
9234d6c5 | Ohad Levy | :onchange => 'tfm.computeResource.ovirt.clusterSelected(this);',
|
|
a0c1773d | Lukas Zapletal | :help_inline => :indicator,
|
|
aa50ab15 | alongoldboim | :label => _('Cluster'), :label_size => "col-md-2" } %>
|
|
637da2f2 | Timo Goebel | <%= f.hidden_field :cluster if !new_vm %>
|
|
9034d78e | Baptiste | ||
a6474423 | Tom Caspy | <%= select_f f, :template, compute_resource.templates, :id, :full_name, {:include_blank => _("Select template")},
|
|
637da2f2 | Timo Goebel | { :disabled => !new_vm, :'data-url' => template_selected_compute_resource_path(compute_resource),
|
|
9234d6c5 | Ohad Levy | :onchange => 'tfm.computeResource.ovirt.templateSelected(this);',
|
|
89b9ecb0 | Amos Benari | :help_inline => :indicator,
|
|
05f5945e | Lukas Zapletal | :help_block => _("oVirt/RHEV template to use"),
|
|
aa50ab15 | alongoldboim | :label => _('Template'), :label_size => "col-md-2" } %>
|
|
637da2f2 | Timo Goebel | <%= f.hidden_field :template if !new_vm %>
|
|
334d0359 | Amos Benari | ||
9034d78e | Baptiste | <%= select_f f, :instance_type, compute_resource.instance_types, :id, :name, {:include_blank => _("Select instance type")},
|
|
{ :disabled => !new_vm, :'data-url' => instance_type_selected_compute_resource_path(compute_resource),
|
|||
:onchange => 'tfm.computeResource.ovirt.instanceTypeSelected(this);',
|
|||
:help_inline => :indicator,
|
|||
:help_block => _("oVirt/RHEV instance type"),
|
|||
:label => _('Instance type'), :label_size => "col-md-2" } %>
|
|||
<%= f.hidden_field :instance_type if !new_vm %>
|
|||
a27196f0 | Neil Miao | <% selected_cluster ||= params[:host] && params[:host][:compute_attributes] && params[:host][:compute_attributes][:cluster] %>
|
|
06e309e8 | Tomer Brisker | <%= counter_f f, :cores, :disabled => !new_vm, :label => _('Cores'), :label_size => 'col-md-2', :'data-soft-max' => compute_resource.max_cpu_count %>
|
|
04ae1269 | Shira Maximov | ||
<%= counter_f f, :sockets, :disabled => !new_vm, :label => _('Sockets'), :label_size => 'col-md-2', :'data-soft-max' => compute_resource.max_socket_count %>
|
|||
637da2f2 | Timo Goebel | <%= byte_size_f f, :memory, :disabled => !new_vm, :label => _('Memory'), :label_size => "col-md-2", :'data-soft-max' => compute_resource.max_memory %>
|
|
43c4bd72 | Marek Hulan | ||
446fce67 | Dominic Cleal | <% checked = params[:host] && params[:host][:compute_attributes] && params[:host][:compute_attributes][:start] || '1' %>
|
|
637da2f2 | Timo Goebel | <%= checkbox_f f, :start, { :checked => (checked == '1'), :help_inline => _("Power ON this machine"), :label => _('Start'), :label_size => "col-md-2" } if new_vm && controller_name != "compute_attributes" %>
|
|
99527500 | Jimmi Dyson | ||
b3ba9e37 | orrabin | <% unless local_assigns[:hide_image] %>
|
|
<%
|
|||
arch ||= nil ; os ||= nil
|
|||
images = possible_images(compute_resource, arch, os)
|
|||
-%>
|
|||
99527500 | Jimmi Dyson | ||
b3ba9e37 | orrabin | <div id='image_selection'>
|
|
<%= select_f f, :image_id, images, :uuid, :name,{:include_blank => (images.empty? || images.size == 1) ? false : _('Please select an image')},
|
|||
{ :disabled => true, :'data-url' => template_selected_compute_resource_path(compute_resource),
|
|||
9234d6c5 | Ohad Levy | :onchange => 'tfm.computeResource.ovirt.templateSelected(this);',
|
|
b3ba9e37 | orrabin | :help_inline => :indicator,
|
|
:help_block => _("Image to use"),
|
|||
:label => _('Image'), :label_size => "col-md-2"} %>
|
|||
</div>
|
|||
<% end %>
|
|||
99527500 | Jimmi Dyson | ||
5e813fae | elad | <%= compute_specific_js(compute_resource, "nic_info") %>
|