Project

General

Profile

« Previous | Next » 

Revision eabbbeb4

Added by Marek Hulán over 7 years ago

Fixes #2314 - fine grain for RAM selectors

View differences:

app/views/compute_resources_vms/form/ovirt/_base.html.erb
<%= javascript_tag("$(document).on('ContentLoad', tfm.initByteSpinner)"); %>
<% javascript 'compute_resource' %>
<%= text_f f, :name, :label => _('Name'), :label_size => "col-md-3" if show_vm_name? %>
<% clusters = compute_resource.clusters %>
......
<% selected_cluster ||= params[:host] && params[:host][:compute_attributes] && params[:host][:compute_attributes][:cluster] %>
<%= selectable_f f, :cores, 1..compute_resource.max_cpu_count, { }, :class => "col-md-2", :label => _('Cores'), :label_size => "col-md-2" %>
<%= selectable_f f, :memory, memory_options(compute_resource.max_memory), { }, :class => "col-md-2", :label => _('Memory'), :label_size => "col-md-2" %>
<%= byte_size_f f, :memory, :disabled => !new_host, :label => _('Memory'), :label_size => "col-md-2", :'data-soft-max' => compute_resource.max_memory %>
<% 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'), :label_size => "col-md-2" } if new_host && controller_name != "compute_attributes" %>

Also available in: Unified diff