Revision c6e02bd3
Added by Joseph Magen over 10 years ago
app/views/compute_resources_vms/form/_ovirt.html.erb | ||
---|---|---|
<% javascript 'compute_resource', 'lookup_keys' %>
|
||
<%= text_f f, :name if controller_name != "hosts" %>
|
||
<%= text_f f, :name if show_vm_name? %>
|
||
<% new = @host.nil? || @host.try(:new_record?) %>
|
||
<% clusters = compute_resource.clusters %>
|
||
<%= select_f f, :cluster, clusters, :id, :name, { },
|
||
... | ... | |
:help_inline => :indicator,
|
||
:label => _('Cluster') } %>
|
||
<%= f.hidden_field :cluster if !new %>
|
||
<%= select_f f, :template, compute_resource.hardware_profiles, :id, :name, {:include_blank => _("Select template")},
|
||
{ :disabled => !new, :'data-url' => hardware_profile_selected_compute_resource_path(compute_resource),
|
||
:onchange => 'ovirt_hwpSelected(this);',
|
||
<%= select_f f, :template, compute_resource.templates, :id, :name, {:include_blank => _("Select template")},
|
||
{ :disabled => !new, :'data-url' => template_selected_compute_resource_path(compute_resource),
|
||
:onchange => 'ovirt_templateSelected(this);',
|
||
:help_inline => :indicator,
|
||
:help_block => _("Template / Hardware Profile to use"),
|
||
:help_block => _("Template / Compute Profile to use"),
|
||
:label => _('Template') } %>
|
||
<%= f.hidden_field :template if !new %>
|
||
|
||
<div class='hardware_profile'>
|
||
<div class='compute_profile'>
|
||
<%= selectable_f f, :cores, 1..compute_resource.max_cpu_count, { }, :class => "col-md-2", :label => _('Cores') %>
|
||
<%= selectable_f f, :memory, memory_options(compute_resource.max_memory), { }, :class => "col-md-2", :label => _('Memory') %>
|
||
<div class="children_fields">
|
||
... | ... | |
</div>
|
||
</div>
|
||
<% checked = params[:host] && params[:host][:compute_attributes] && params[:host][:compute_attributes][:start] || '1' %>
|
||
<%= checkbox_f f, :start, { :checked => (checked == '1'), :help_inline => _("Power ON this machine"), :label => _('Start') } if new %>
|
||
<%= checkbox_f f, :start, { :checked => (checked == '1'), :help_inline => _("Power ON this machine"), :label => _('Start') } if new && controller_name != "compute_attributes" %>
|
Also available in: Unified diff
fixes #3178 - add feature for compute profiles for hostgroups and hosts