Revision 7db66baa
Added by Ori Rabin over 9 years ago
app/views/lookup_keys/_fields.html.erb | ||
---|---|---|
|
||
<%= show_puppet_class f %>
|
||
<%= checkbox_f(f, :override, :onchange => 'toggleOverrideValue(this)', :size => "col-md-8",
|
||
:help_block => _("Whether the smart-variable should override the Puppet class default value.")
|
||
:help_block => _('Whether the Smart Variable value is managed by Foreman')
|
||
) if is_param%>
|
||
|
||
<%= param_type_selector(f, :onchange => 'keyTypeChange(this)') %>
|
||
<%= textarea_f f, :default_value, :value => f.object.default_value_before_type_cast,:size => "col-md-8", :disabled => (f.object.is_param && !f.object.override), :rows => :auto,
|
||
:help_block => _("Value to use when there is no match") %>
|
||
<%= textarea_f f, :default_value, :value => f.object.default_value_before_type_cast,:size => "col-md-8",
|
||
:disabled => (f.object.is_param && (!f.object.override || f.object.use_puppet_default)),
|
||
:rows => :auto, :help_block => _("Value to use when there is no match") %>
|
||
<%= checkbox_f(f, :use_puppet_default, :size => "col-md-8",
|
||
:help_block => _('Do not send this parameter via the ENC. Puppet will use the value defined in the puppet manifest for this parameter'),
|
||
:onchange=>'toggleUsePuppetDefaultValue(this, "default_value")',
|
||
:disabled => (f.object.is_param && !f.object.override)) if is_param%>
|
||
<div <%= "id=#{(f.object.key || 'new_lookup_keys').to_s.gsub(' ','_')}_lookup_key_override_value" %> style=<%= "display:none;" if (f.object.is_param && !f.object.override) %>>
|
||
<legend><%= _("Optional input validator") %></legend>
|
||
<%= checkbox_f(f, :required, :size => "col-md-8", :disabled => !f.object.override,
|
||
... | ... | |
<legend><%= _("Override value for specific hosts") %></legend>
|
||
<%= checkbox_f(f, :merge_overrides, :onchange => 'mergeOverridesChanged(this)',
|
||
:disabled => !f.object.supports_merge?, :size => "col-md-8",
|
||
:help_block => _("Should the matchers continue to look for matches after first find (only array/hash type).")) %>
|
||
:help_block => _("Should the matchers continue to look for matches after first find (only array/hash type). Note: merging overrides ignores all matchers that use puppet default")) %>
|
||
<%= checkbox_f(f, :avoid_duplicates, :disabled => (!f.object.supports_uniq? || !f.object.merge_overrides), :size => "col-md-8",
|
||
:help_block => _("Should the matched result avoid duplicate values (only array type).")) %>
|
||
<%= textarea_f f, :path, :rows => :auto, :label => _("Order"), :size => "col-md-8", :value => f.object.path,
|
||
... | ... | |
%>
|
||
|
||
<div class="children_fields">
|
||
<%= new_child_fields_template(f, :lookup_values, {:partial => "lookup_keys/value"}) %>
|
||
<%= new_child_fields_template(f, :lookup_values, {:partial => "lookup_keys/value", :form_builder_attrs => {:is_param => is_param}}) %>
|
||
<%= f.fields_for :lookup_values do |lookup_values| %>
|
||
<%= render 'lookup_keys/value', :f => lookup_values %>
|
||
<%= render 'lookup_keys/value', :f => lookup_values, :is_param => is_param %>
|
||
<% end %>
|
||
<%= add_child_link '+ ' + _("Add Matcher-Value"), :lookup_values, { :title => _('add a new matcher-value pair')} %>
|
||
</div>
|
Also available in: Unified diff
Fixes #3260- Allows puppet to manage value of smart class parameter that can be overrided
(cherry picked from commit 8e53b7c915ecab576e5950b20e75552ec6a02edb)