Revision 82e47ae0
Added by Amos Benari about 12 years ago
- ID 82e47ae0f86994702c3a084cc6150250a81034ee
app/views/hosts/_form.html.erb | ||
---|---|---|
<%= form_for @host do |f| %>
|
||
<%= base_errors_for @host %>
|
||
|
||
<ul class="tabs" data-tabs="tabs">
|
||
<li class="active"><a href="#primary">Primary</a></li>
|
||
<li><a href="#puppet_klasses">Puppet Classes</a></li>
|
||
<ul class="nav nav-tabs" data-tabs="tabs">
|
||
<li class="active"><a href="#primary" data-toggle="tab">Primary</a></li>
|
||
<li><a href="#puppet_klasses" data-toggle="tab">Puppet Classes</a></li>
|
||
<% if SETTINGS[:unattended] and @host.managed -%>
|
||
<li><a href="#network">Network</a></li>
|
||
<li><a href="#os">Operating System</a></li>
|
||
<li><a href="#network" data-toggle="tab">Network</a></li>
|
||
<li><a href="#os" data-toggle="tab">Operating System</a></li>
|
||
<% if authorized_for("Hypervisors::Guests", :create) -%>
|
||
<% if @host.new_record? and !Hypervisor.first.nil? -%>
|
||
<li id="libvirt_tab" <%= display? !(params[:host] && params[:host][:hypervisor_id].present?) %>><a href="#virtual_machine">Virtual Machine</a></li>
|
||
<li id="libvirt_tab" <%= display? !(params[:host] && params[:host][:hypervisor_id].present?) %>><a href="#virtual_machine" data-toggle="tab">Virtual Machine</a></li>
|
||
<% end -%>
|
||
<li id="compute_resource_tab" <%= display? !(@host.compute_resource_id || params[:host] && params[:host][:compute_resource_id].present?)%>><a href="#compute_resource">Virtual Machine</a></li>
|
||
<li id="compute_resource_tab" <%= display? !(@host.compute_resource_id || params[:host] && params[:host][:compute_resource_id].present?)%>><a href="#compute_resource" data-toggle="tab">Virtual Machine</a></li>
|
||
<% end -%>
|
||
<% end -%>
|
||
<li><a href="#params">Parameters</a></li>
|
||
<li><a href="#info">Additional Information</a></li>
|
||
<li><a href="#params" data-toggle="tab">Parameters</a></li>
|
||
<li><a href="#info" data-toggle="tab">Additional Information</a></li>
|
||
</ul>
|
||
|
||
<div class="tab-content">
|
||
|
||
<div class="active" id="primary">
|
||
<%= text_f f, :name, :class => "xlarge", :value => name_field(@host) %>
|
||
<div class="tab-pane active" id="primary">
|
||
<%= text_f f, :name, :class => "input-xlarge", :value => name_field(@host) %>
|
||
<% libvirt = Hypervisor.first.nil? ? [] : [OpenStruct.new(:to_label => 'Libvirt')] -%>
|
||
<%= select_f f, :compute_resource_id, libvirt + ComputeResource.all, :id, :to_label,
|
||
{ :include_blank => 'Bare Metal' },
|
||
... | ... | |
<%= puppet_master_fields f %>
|
||
</div>
|
||
|
||
<div id="puppet_klasses">
|
||
<div class="tab-pane" id="puppet_klasses">
|
||
<% if @environment or @hostgroup -%>
|
||
<%= render 'puppetclasses/class_selection', :obj => @host %>
|
||
<% else -%>
|
||
<p class="alert-message">Please select an Environment first</p>
|
||
<p class="alert alert-message">Please select an Environment first</p>
|
||
<% end -%>
|
||
</div>
|
||
|
||
... | ... | |
|
||
<%= render('unattended', :f => f) if SETTINGS[:unattended] and @host.managed -%>
|
||
|
||
<div id="params">
|
||
<div class="tab-pane" id="params">
|
||
<%= render "common_parameters/parameters", { :f => f, :type => :host_parameters } %>
|
||
</div>
|
||
|
||
<div id="info">
|
||
<div class="tab-pane" id="info">
|
||
<% if SETTINGS[:login] -%>
|
||
<%= selectable_f f, :is_owned_by, option_groups_from_collection_for_select(
|
||
[User, Usergroup], :all, :table_name, :id_and_type, :select_title,
|
||
... | ... | |
:help_inline => "Include this host within Foreman reporting"
|
||
%>
|
||
<%= select_f f, :model_id, Model.all, :id, :to_label, { :include_blank => true }, {:label => "Hardware Model"} %>
|
||
<%= textarea_f f, :comment, :help_block => "Additional information about this host", :class => "xxlarge", :rows => "3" %>
|
||
<%= textarea_f f, :comment, :help_block => "Additional information about this host", :class => "input-xxlarge", :rows => "3" %>
|
||
</div>
|
||
</div>
|
||
<%= f.hidden_field :overwrite? %>
|
Also available in: Unified diff
updates UI to bootstrap v2