Revision 5b3879ff
Added by Amir Fefer over 8 years ago
app/views/common_parameters/_inherited_parameters.html.erb | ||
---|---|---|
<table class="table table-condensed" id="inherited_parameters">
|
||
<thead>
|
||
<tr>
|
||
<th class='col-md-3'><%= _("Scope") %></th>
|
||
<th class='col-md-2'><%= _("Name") %></th>
|
||
<th class='col-md-6'><%= _("Value") %></th>
|
||
<th class='col-md-3'><%= _("Name") %></th>
|
||
<th class='col-md-8'><%= _("Value") %></th>
|
||
<th><%= _('Actions') %></th>
|
||
</tr>
|
||
</thead>
|
||
... | ... | |
<% keys = inherited_parameters.keys.sort %>
|
||
<% keys.each do |name| %>
|
||
<tr class="<%="override-param" if @host.host_parameters.map(&:name).include?(name)%>">
|
||
<%= "<td rowspan='#{keys.size}'>#{_('Global')}</td>".html_safe if name == keys.first %>
|
||
<td><%= content_tag :span, name, :id => "name_#{name}"%>
|
||
</td>
|
||
<td><%= parameter_value_field inherited_parameters[name] %></td>
|
app/views/common_parameters/_parameter.html.erb | ||
---|---|---|
<table class="row">
|
||
<tbody>
|
||
<tr class="form-group <%= 'has-error' if f.object.errors.any? %>">
|
||
<% if controller_name =~ /(host|hostgroup)/ %>
|
||
<td class="col-md-3">
|
||
<%= content_tag(:input, '', :class => "form-control", :disabled => true, :value => _('Global'), :type=> :text ) %>
|
||
</td>
|
||
<% end %>
|
||
<td class="col-md-2">
|
||
<td class="col-md-4">
|
||
<%= f.text_field(:name, :class => "form-control", :disabled => disabled, :placeholder => _("Name")) %>
|
||
</td>
|
||
<td class="col-md-4 value">
|
||
<td class="col-md-5 value">
|
||
<% if f.object.hidden_value? %>
|
||
<%= f.password_field(:value, :class => 'form-control',
|
||
:disabled => disabled,
|
||
... | ... | |
<td class="col-md-1">
|
||
<%= fullscreen_button("$(this).parent().prev().find('textarea')") unless f.object.hidden_value? %>
|
||
</td>
|
||
<td>
|
||
<td class="col-md-2">
|
||
<%= f.check_box(:hidden_value,
|
||
:class => 'hidden_value_textarea_switch',
|
||
:onchange => 'turn_textarea_switch(this)',
|
app/views/common_parameters/_parameters.html.erb | ||
---|---|---|
<table class="table table-condensed" id="global_parameters_table">
|
||
<thead>
|
||
<tr>
|
||
<% if controller_name =~ /(host|hostgroup)/ %>
|
||
<th class='col-md-3'><%= _("Global Parameters") %></th>
|
||
<% end %>
|
||
<th class='col-md-2'><%= _("Name") %></th>
|
||
<th class='col-md-5'><%= _("Value") %></th>
|
||
<th><%= _('Actions') %></th>
|
||
<th class='col-md-4'><%= _("Name") %></th>
|
||
<th class='col-md-6'><%= _("Value") %></th>
|
||
<th class='col-md-2'><%= _('Actions') %></th>
|
||
</tr>
|
||
</thead>
|
||
</table>
|
app/views/common_parameters/_parent_parameter.html.erb | ||
---|---|---|
<% @hostgroup.ancestors.map(&:group_parameters).flatten.each_with_index do |parameter, i| %>
|
||
<% next if @hostgroup.group_parameters.map(&:name).include? parameter.name %>
|
||
<table class="row">
|
||
<thead>
|
||
<tr>
|
||
<td class="col-md-2">
|
||
<%= content_tag(:input, '', :class => "form-control", :disabled => true, :value => _('Global'), :type=> :text ) %>
|
||
</td>
|
||
<td class="col-md-2">
|
||
<th class='col-md-4'><%= _("Name") %></th>
|
||
<th class='col-md-8'><%= _("Value") %></th>
|
||
</tr>
|
||
</thead>
|
||
<tr>
|
||
<td class="col-md-4">
|
||
<%= text_field_tag("parent_parameter_#{i}_key", '', :class => "form-control", :placeholder => parameter.name) %>
|
||
</td>
|
||
<td class="col-md-7">
|
||
<td class="col-md-8">
|
||
<%= text_area_tag("parent_parameter_#{i}_value", '', :class => "form-control", :rows => 1, :placeholder => parameter.value) %>
|
||
</td>
|
||
</tr>
|
app/views/hostgroups/_form.html.erb | ||
---|---|---|
<p/>
|
||
<%= render "common_parameters/puppetclasses_parameters", :f => f %>
|
||
<p/>
|
||
<h4><%= _('Host group parameters') %></h4>
|
||
<h4><%= _('Global host group parameters') %></h4>
|
||
<p/>
|
||
<% if @hostgroup.parent.present? %>
|
||
<%= render "common_parameters/parent_parameter", :f => f %>
|
app/views/hosts/_form.html.erb | ||
---|---|---|
<h4><%= _('Puppet classes Parameters') %></h4>
|
||
<p></p>
|
||
<%= render "puppetclasses/classes_parameters", { :obj => @host } %>
|
||
<h4><%= _('Included Parameters via inheritance') %></h4>
|
||
<h4><%= _('Included global Parameters via inheritance') %></h4>
|
||
<p></p>
|
||
<%= render "common_parameters/inherited_parameters", { :inherited_parameters => @host.host_inherited_params(true) } %>
|
||
<p></p>
|
||
<%= render "common_parameters/puppetclasses_parameters", :f => f %>
|
||
<h4><%= _('Host Parameters') %></h4>
|
||
<h4><%= _('Global Host Parameters') %></h4>
|
||
<p></p>
|
||
<%= render "common_parameters/parameters", { :f => f, :type => :host_parameters } %>
|
||
</div>
|
Also available in: Unified diff
Fixes #11461 - Remove 'global scope' column in host/hostgroup parameters form