theforeman/foreman_fog_proxmox

View on GitHub
app/views/compute_resources_vms/form/proxmox/container/_config.html.erb

Summary

Maintainability
Test Coverage
<%# Copyright 2018 Tristan Robert

This file is part of ForemanFogProxmox.

ForemanFogProxmox is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

ForemanFogProxmox is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>

<%= javascript_include_tag 'foreman_fog_proxmox/proxmox_vm_container', "data-turbolinks-track" => true %>
<% container = type == 'lxc' %>
<%= content_tag :div, :id => "container_advanced_options" do %>
  <%= content_tag :h3, "Main Options"%>
  <div>
    <%= textarea_f f, :description, :label => _('Description'), :label_size => "col-md-2" %>
    <%= checkbox_f f, :onboot, :label => _('Start at boot') %>
  </div>
  <%= content_tag :h3, "CPUs"%>
  <div>
  <%= select_f f, :arch, proxmox_archs_map, :id, :name, { }, :label => _('Architecture'), :label_size => "col-md-2" %>
  <%= counter_f f, :cores, :class => "input-mini", :label => _('Cores'), :label_size => "col-md-2" %>
  <%= counter_f f, :cpulimit, :class => "input-mini", :label => _('CPU limit'), :label_size => "col-md-2" %>
  <%= counter_f f, :cpuunits, :class => "input-mini", :label => _('CPU units'), :label_size => "col-md-2" %>
  </div>
  <%= content_tag :h3, "Memory"%>
  <div>
  <%= text_f f, :memory, :class => "input-mini", :label => _('Memory (MB)'), :label_size => "col-md-2" %>
  <%= text_f f, :swap, :class => "input-mini", :label => _('Swap (MB)'), :label_size => "col-md-2" %>
  </div>
  <%= content_tag :h3, "DNS"%>
  <div>
  <%= text_f f, :hostname, :label => _('Hostname'), :label_size => "col-md-2", :disabled => true %>
  <%= text_f f, :nameserver, :label => _('DNS server'), :label_size => "col-md-2" %>
  <%= text_f f, :searchdomain, :label => _('Search domain'), :label_size => "col-md-2" %>
  </div>
  <%= content_tag :h3, "Operating System"%>
  <div>
  <%= select_f f, :ostype, proxmox_ostypes_map, :id, :name, { }, :label => _('OS type'), :label_size => "col-md-2" %>
  </div>
<% end %>