Project

General

Profile

« Previous | Next » 

Revision 7db66baa

Added by Ori Rabin over 9 years ago

Fixes #3260- Allows puppet to manage value of smart class parameter that can be overrided

(cherry picked from commit 8e53b7c915ecab576e5950b20e75552ec6a02edb)

View differences:

app/views/common_parameters/_inherited_parameters.html.erb
<tr>
<th class='col-md-3'><%= _("Scope") %></th>
<th class='col-md-2'><%= _("Name") %></th>
<th class='col-md-7'><%= _("Value") %></th>
<th class='col-md-5'><%= _("Value") %></th>
<th class='col-md-2'><%= _("Use Puppet Default") %></th>
<th><%= _('Actions') %></th>
</tr>
</thead>
<tbody>
<% keys = inherited_parameters.keys.sort %>
<% keys.each do |name| %>
<tr>
<%= "<td class='col-md-3' rowspan='#{keys.size}'>#{_('Global')}</td>".html_safe if name == keys.first%>
<td class='col-md-2'><%= content_tag :span, name, :id=>"name_#{name}", :class => "col-md-2" %></td>
<td class='col-md-7'><%= parameter_value_field inherited_parameters[name] %></td>
<td>
<%= link_to_function(_("override"), "override_param(this)", :title => _("Override this value"),
:'data-tag' => 'override', :class =>"btn btn-default" ) if authorized_via_my_scope("host_editing", "create_params") %>
</tr>
<% if inherited_parameters.present? %>
<tbody>
<% keys = inherited_parameters.keys.sort %>
<% keys.each do |name| %>
<tr>
<%= "<td class='col-md-3' rowspan='#{keys.size}'>#{_('Global')}</td>".html_safe if name == keys.first %>
<td class='col-md-2'><%= content_tag :span, name, :id => "name_#{name}", :class => "col-md-2" %></td>
<td class='col-md-7'><%= parameter_value_field inherited_parameters[name] %></td>
<td>
<%= link_to_function(_("override"), "override_param(this)", :title => _("Override this value"),
:'data-tag' => 'override', :class => "btn btn-default") if authorized_via_my_scope("host_editing", "create_params") %>
</tr>
<% end %>
</tbody>
<% end %>
</tbody>
</table>

Also available in: Unified diff