|
<%= javascript 'host_edit' %>
|
|
<%= form_for @hostgroup do |f| %>
|
|
<%= base_errors_for @hostgroup %>
|
|
|
|
<ul class="tabs" data-tabs="tabs">
|
|
<li class="active"><a href="#primary">Primary</a></li>
|
|
<li><a href="#puppet_klasses">Puppet Classes</a></li>
|
|
<% if SETTINGS[:unattended] -%>
|
|
<li><a href="#network">Network</a></li>
|
|
<li><a href="#os">Operating System</a></li>
|
|
<% if !Hypervisor.first.nil? and authorized_for("Hypervisors::Guests", :create) -%>
|
|
<li><a href="#virtual_machine">Virtual Machine</a></li>
|
|
<% end -%>
|
|
<% end -%>
|
|
<li><a href="#params">Parameters</a></li>
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
|
|
<div class="active" id="primary">
|
|
<%= select_f f, :parent_id, accessible_hostgroups, :id, :to_label, {:include_blank => true}, {
|
|
:onchange => 'hostgroup_changed(this);', "data-type" => controller_name,
|
|
:help_inline => image_tag('spinner.gif', :id => 'hostgroup_indicator', :class => 'hide').html_safe } %>
|
|
<%= text_f f, :name %>
|
|
<%= select_f f, :environment_id, Environment.all, :id, :to_label, {:include_blank => true}, {:onchange => 'update_puppetclasses(this);', :"data-type" => controller_name} %>
|
|
|
|
<%= puppet_master_fields f %>
|
|
</div>
|
|
|
|
<div id="puppet_klasses">
|
|
<% if @environment or @hostgroup.environment -%>
|
|
<%= render 'puppetclasses/class_selection', :obj => @hostgroup %>
|
|
<% else -%>
|
|
<p class="alert-message">Please select an Environment first</p>
|
|
<% end -%>
|
|
</div>
|
|
|
|
<div id="network">
|
|
<%= render 'common/domain_subnet', :item => @hostgroup %>
|
|
</div>
|
|
|
|
<div id="os">
|
|
<%= render "common/os_selection/initial", :item=> @hostgroup %>
|
|
<%= password_f f, :root_pass, :label => "Root Password" %>
|
|
</div>
|
|
|
|
<div id="virtual_machine">
|
|
<%= render('common/hypervisor', :item => @hostgroup) %>
|
|
</div>
|
|
|
|
<div id="params">
|
|
<%= render "common_parameters/parameters", { :f => f, :type => :group_parameters } %>
|
|
</div>
|
|
</div>
|
|
|
|
<%= submit_or_cancel f %>
|
|
<% end %>
|