mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
- make patterned attribute names display better (LOGSTASH-157)
This commit is contained in:
parent
7454afb9f3
commit
7bf5d5a042
1 changed files with 16 additions and 1 deletions
|
@ -35,6 +35,10 @@ This is what it might look like in your config file:
|
||||||
else
|
else
|
||||||
annotation = "#{config[:validate]}"
|
annotation = "#{config[:validate]}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if setting_name.is_a?(Regexp)
|
||||||
|
setting_name = "/" + setting_name.to_s.gsub(/^\(\?-mix:/, "").gsub(/\)$/, "") + "/"
|
||||||
|
end
|
||||||
annotation += " (required)" if config[:required]
|
annotation += " (required)" if config[:required]
|
||||||
annotation += ", default: #{config[:default].inspect}" if config[:default]
|
annotation += ", default: #{config[:default].inspect}" if config[:default]
|
||||||
-%>
|
-%>
|
||||||
|
@ -47,6 +51,14 @@ This is what it might look like in your config file:
|
||||||
<h3> Details </h3>
|
<h3> Details </h3>
|
||||||
|
|
||||||
<% sorted_settings.each do |setting_name, config| -%>
|
<% sorted_settings.each do |setting_name, config| -%>
|
||||||
|
<%
|
||||||
|
if setting_name.is_a?(Regexp)
|
||||||
|
setting_name = "/" + setting_name.to_s.gsub(/^\(\?-mix:/, "").gsub(/\)$/, "") + "/"
|
||||||
|
is_regexp = true
|
||||||
|
else
|
||||||
|
is_regexp = false
|
||||||
|
end
|
||||||
|
-%>
|
||||||
<h4>
|
<h4>
|
||||||
<a name="setting_<%= setting_name %>">
|
<a name="setting_<%= setting_name %>">
|
||||||
<%= setting_name %><%= " (required setting)" if config[:required] %>
|
<%= setting_name %><%= " (required setting)" if config[:required] %>
|
||||||
|
@ -58,6 +70,9 @@ This is what it might look like in your config file:
|
||||||
<% if config[:deprecated] -%>
|
<% if config[:deprecated] -%>
|
||||||
<li> DEPRECATED WARNING: This config item is deprecated. It may be removed in a further version. </li>
|
<li> DEPRECATED WARNING: This config item is deprecated. It may be removed in a further version. </li>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% if is_regexp -%>
|
||||||
|
<li> The configuration attribute name here is anything that matches the above regular expression. </li>
|
||||||
|
<% end -%>
|
||||||
<% if config[:validate].is_a?(Symbol) -%>
|
<% if config[:validate].is_a?(Symbol) -%>
|
||||||
<li> Value type is <%= config[:validate] %> </li>
|
<li> Value type is <%= config[:validate] %> </li>
|
||||||
<% elsif config[:validate].nil? -%>
|
<% elsif config[:validate].nil? -%>
|
||||||
|
@ -78,4 +93,4 @@ This is what it might look like in your config file:
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
This is documentation from <a href="https://github.com/logstash/logstash/blob/v<%= LOGSTASH_VERSION %>/<%= file %>"><%= file %>
|
This is documentation from <a href="https://github.com/logstash/logstash/blob/v<%= LOGSTASH_VERSION %>/<%= file %>"><%= file %></a>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue