<% arch ||= nil os ||= nil images = possible_images(compute_resource, arch, os) resource_groups = compute_resource.resource_groups compute_resource_id = compute_resource.id %> <% # This view has been modified and refers to the properties wrapper class %> <%= selectable_f f, :resource_group, resource_groups, { :include_blank => true }, { :disabled => resource_groups.empty?, :label => _('Resource Group'), :required => true, :id => 'azure_rm_rg', :help_inline => spinner_button_f(f, _('Reload Images, Sizes, vNets'), 'azure_rm_region_callback();', { :id => 'load_subnets_btn', :spinner_id => 'load_subnets_indicator', :class => 'btn-success', :spinner_class => 'spinner-inverse' }) } %> <%= selectable_f f, :vm_size, compute_resource.vm_sizes.map { |size| size.name }, {}, { :label => _('VM Size'), :required => true, :id => 'azure_rm_size' } %> <%= selectable_f f, :platform, %w(Linux Windows), {}, { :label => _('Platform'), :required => true } %> <%= text_f f, :username, { :label => _('Username'), :required => true } %> <%= password_f f, :password, { :label => _('Password'), :required => true, :placeholder => "********", :value => f.object.password } %> <%= textarea_f f, :ssh_key_data, { :label => _('SSH Key') } %> <%= checkbox_f f, :premium_os_disk, { :checked => f.object.premium_os_disk == "Premium_LRS", :label => _('Premium OS Disk'), :label_size => "col-md-2" }, 'true', 'false' %> <%= selectable_f f, :os_disk_caching, %w(None ReadOnly ReadWrite), {}, { :label => _('OS Disk Caching'), :required => true, :class => "col-md-2" } %> <%= text_f f, :script_command, { :label => _('Custom Script Command'), :help_inline => _("To perform commands as root, prefix it with 'sudo'.") } %> <%= text_f f, :script_uris, { :label => _('Comma seperated file URIs') } %> <% 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 upon creation"), :label => _('Start'), :label_size => "col-md-2" } if new_vm && controller_name != "compute_attributes" %>
<%= select_f f, :image_id, images, :uuid, :name, { :include_blank => (images.empty? or images.size == 1) ? false : _('Please select an image') }, { :disabled => images.empty?, :label => _('Image'), :required => true, :label_size => "col-md-2", :id => 'azure_rm_image_id' } %>