Project

General

Profile

« Previous | Next » 

Revision c6e02bd3

Added by Joseph Magen over 10 years ago

fixes #3178 - add feature for compute profiles for hostgroups and hosts

View differences:

app/views/compute_resources_vms/form/_vmware.html.erb
<% new = @host ? @host.created_at.nil? : true %>
<%= text_f f, :name, :disabled => !new if controller_name != "hosts" %>
<%= text_f f, :name, :disabled => !new if show_vm_name? %>
<%= selectable_f f, :cpus, 1..compute_resource.max_cpu_count, { }, :class => "col-md-2", :disabled => !new, :label => _('CPUs') %>
<%= text_f f, :memory_mb, :class => "col-md-2", :disabled => !new, :label => _("Memory (MB)") %>
<%= selectable_f f, :cluster, compute_resource.clusters, { }, :class => "col-md-2", :disabled => !new, :label => _('Cluster') %>
......
<!--TODO # Move to a helper-->
<% 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 and controller_name == 'hosts' %>
<%= checkbox_f f, :start, { :checked => (checked == '1'), :help_inline => _("Power ON this machine"), :label => _('Start') } if new and show_vm_name? %>

Also available in: Unified diff