foreman/app/views/hostgroups/_form.html.erb @ 82e47ae0
017e1049 | Ohad Levy | <%= javascript 'host_edit' %>
|
|
<%= form_for @hostgroup do |f| %>
|
|||
05ab4c16 | Ohad Levy | <%= base_errors_for @hostgroup %>
|
|
e5d3f34e | Ohad Levy | ||
82e47ae0 | Amos Benari | <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>
|
|||
8dec3f5b | Ohad Levy | <% if SETTINGS[:unattended] -%>
|
|
82e47ae0 | Amos Benari | <li><a href="#network" data-toggle="tab">Network</a></li>
|
|
<li><a href="#os" data-toggle="tab">Operating System</a></li>
|
|||
05ab4c16 | Ohad Levy | <% if !Hypervisor.first.nil? and authorized_for("Hypervisors::Guests", :create) -%>
|
|
82e47ae0 | Amos Benari | <li><a href="#virtual_machine" data-toggle="tab">Virtual Machine</a></li>
|
|
8dec3f5b | Ohad Levy | <% end -%>
|
|
05ab4c16 | Ohad Levy | <% end -%>
|
|
82e47ae0 | Amos Benari | <li><a href="#params" data-toggle="tab">Parameters</a></li>
|
|
05ab4c16 | Ohad Levy | </ul>
|
|
<div class="tab-content">
|
|||
82e47ae0 | Amos Benari | <div class="tab-pane active" id="primary">
|
|
24e55891 | Ohad Levy | <%= select_f f, :parent_id, accessible_hostgroups, :id, :to_label, {:include_blank => true}, {
|
|
:onchange => 'hostgroup_changed(this);', "data-type" => controller_name,
|
|||
017e1049 | Ohad Levy | :help_inline => image_tag('spinner.gif', :id => 'hostgroup_indicator', :class => 'hide').html_safe } %>
|
|
05ab4c16 | Ohad Levy | <%= text_f f, :name %>
|
|
24e55891 | Ohad Levy | <%= select_f f, :environment_id, Environment.all, :id, :to_label, {:include_blank => true}, {:onchange => 'update_puppetclasses(this);', :"data-type" => controller_name} %>
|
|
ace6fbad | Ohad Levy | ||
<%= puppet_master_fields f %>
|
|||
05ab4c16 | Ohad Levy | </div>
|
|
82e47ae0 | Amos Benari | <div class="tab-pane" id="puppet_klasses">
|
|
05ab4c16 | Ohad Levy | <% if @environment or @hostgroup.environment -%>
|
|
<%= render 'puppetclasses/class_selection', :obj => @hostgroup %>
|
|||
<% else -%>
|
|||
82e47ae0 | Amos Benari | <p class="alert alert-message">Please select an Environment first</p>
|
|
1ab261e1 | Ohad Levy | <% end -%>
|
|
05ab4c16 | Ohad Levy | </div>
|
|
e5d3f34e | Ohad Levy | ||
82e47ae0 | Amos Benari | <div class="tab-pane" id="network">
|
|
05ab4c16 | Ohad Levy | <%= render 'common/domain_subnet', :item => @hostgroup %>
|
|
</div>
|
|||
82e47ae0 | Amos Benari | <div class="tab-pane" id="os">
|
|
05ab4c16 | Ohad Levy | <%= render "common/os_selection/initial", :item=> @hostgroup %>
|
|
<%= password_f f, :root_pass, :label => "Root Password" %>
|
|||
</div>
|
|||
bd46fa41 | Ohad Levy | ||
82e47ae0 | Amos Benari | <div class="tab-pane" id="virtual_machine">
|
|
05ab4c16 | Ohad Levy | <%= render('common/hypervisor', :item => @hostgroup) %>
|
|
</div>
|
|||
bd46fa41 | Ohad Levy | ||
82e47ae0 | Amos Benari | <div class="tab-pane" id="params">
|
|
05ab4c16 | Ohad Levy | <%= render "common_parameters/parameters", { :f => f, :type => :group_parameters } %>
|
|
</div>
|
|||
</div>
|
|||
bd46fa41 | Ohad Levy | ||
05ab4c16 | Ohad Levy | <%= submit_or_cancel f %>
|
|
bd46fa41 | Ohad Levy | <% end %>
|